Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Best BB Tag Code EVER v3.1 [ZB]; Most customisable, can do ANYTHING!
Topic Started: Jun 3 2009, 08:42 AM (4,281 Views)
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
Thanks Viral! I forget ZB uses em :lol:
Edited by Xanikseo, Jun 15 2009, 08:00 AM.
Offline Profile Quote Post Goto Top
 
Nemomon
Member Avatar
Go Dizzy, Go!
[ *  *  *  *  * ]
Random thought, is

Code:
 
ubb_tag("Color","color","<span style='color:<% VAR %>'><% INNER %></span>",1,0,'btpsm');


using the RGB at the board too? Or just the hex and name?
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
You can use it as yellow, #FFFF00 or rgb(255,255,0). They would all work.

EDIT:

[color=yellow]hey[/color]
[color=#FFFF00]hey[/color]
[color=rgb(255,255,0)]hey[/color]

They would all show the same thing by the looks of it (unless it's been coded to looks for commas, under which condition the last example won't work).
Edited by Viral., Jun 15 2009, 08:20 AM.
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
It works with hex and name and RGB, it's essentially the same as the ZB tag.
EDIT: Beat me to it Viral :rolleyes: .

EDIT: I can confirm RGB definitely works in the title.
Edited by Xanikseo, Jun 15 2009, 08:46 AM.
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
Does this code look for commas for the variables? If it does, you might want to tweak that a bit for RGB to work - other than that the code is really good :) .
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
The commas in RGB won't interfere with the BB tag, because when only 1 variable is to be used, commas are included after the =.
(Infact, with any number of variables to be used, on the last variable, any commas are included in the last variable).
Offline Profile Quote Post Goto Top
 
firestrife2
Member Avatar
sƃuıʞ ɟo poƃ
[ *  * ]
I thought this was useful.

IE Only - Display Text visible to only Internet Explorer Users
Code:
 
ubb_tag("IE Only","ie","<!--[if IE]><span style='color:red'><% INNER %><br/><em><small>(only Internet Explorer users can see this message.)</small></span></em><![endif]-->",0,"Display text only viewable by Internet Explorer users||Enter the text");


Any browser but IE - FF was the only thing I could come up with for the tag :/...You can change it if you want.
Code:
 
ubb_tag("Not IE","noie","<comment><span style='color:red'><% INNER %><br/><em><small>(All browsers except for IE can view this message.)</small></em></span></comment>",0,"All browsers except for IE can view this message||Enter the text");
Edited by firestrife2, Jun 16 2009, 04:06 PM.
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
Very good! I thought about having something like that but never got round to it, besides your way of detecting IE is much better than I would have done. I did not know you could to <!--[if iE]>.
How about [noie][/noie] for the tag name?
Edited by Xanikseo, Jun 16 2009, 03:54 PM.
Offline Profile Quote Post Goto Top
 
firestrife2
Member Avatar
sƃuıʞ ɟo poƃ
[ *  * ]
Why not xD. I thought of the idea when I was making a browser notice for my forum(which is best viewed in FF).

Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
I've added them to the first post (and changed the button names).
Offline Profile Quote Post Goto Top
 
firestrife2
Member Avatar
sƃuıʞ ɟo poƃ
[ *  * ]
I thought about doing this one. In this IE Only tag you can choose which version of IE.

[ie=5] Internet Explorer 5 only [/ie]

[ie=6] Internet Explorer 6 only [/ie] and so on...

Code:
 
ubb_tag("IE Only","ie","<!--[if IE <% VAR %>]><span style='color:red'><% INNER %><br/><i><small>(only Internet Explorer <% VAR %> users can see this message.)</small></i></span><![endif]-->",1,'b');


I tried making another one that also allowed you to add in the "lt" or "lte" variables in it but it interfered with that one.
Offline Profile Quote Post Goto Top
 
tammster
Member
[ * ]
Xanikseo thank you for adding those for me ;)
I also have another question lol. With this code can you make a topic title a redirect link?

Like how you can have redirect forums... can topic titles be redirect links?
Edited by tammster, Jun 25 2009, 02:46 PM.
Offline Profile Quote Post Goto Top
 
Laurence
Member
[ * ]
Thank you for the code Xanikseo

Anyway, can I bother you for a bit? I tried the "Advanced users" thingy to achieve a certain BB code effect but to no luck. Can you make a BB code similar to the "Spoiler" one except you can replace it with any word/phrase/sentence?

Thanks in advance :)
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
tammster
Jun 25 2009, 02:36 PM
Xanikseo thank you for adding those for me ;)
I also have another question lol. With this code can you make a topic title a redirect link?

Like how you can have redirect forums... can topic titles be redirect links?
Yes, you can do that :P
Code:
 
ubb_tag("URL","url","<a href='<% VAR %>'><% INNER %></a>",1,0,'btpsm');
will open the link in the same window/tab
Code:
 
ubb_tag("URL","url","<a href='<% VAR %>' target='_blank'><% INNER %></a>",1,0,'btpsm');
will open the link in a new window/tab.

This will have the same usage as the normal ZB BB Code ([url=url]name[/url])

This is if you want [url][/url] as well:
Code:
 
ubb_tag("URL","url","<a href='<% INNER %>'><% INNER %></a>",1,0,'btpsm');
will open the link in the same window/tab
Code:
 
ubb_tag("URL","url","<a href='<% INNER %>' target='_blank'><% INNER %></a>",1,0,'btpsm');
will open the link in a new window/tab.

EDIT: FireFox does not allow these codes to work though, when you click the link, it will persist on going to the topic, instead of the link inside the link. It works on Chrome though... And Internet Explorer (damnit) doesn't even parse the BB code at all. So it will not be feasible to use these codes :( ....

Quote:
 
Thank you for the code Xanikseo

Anyway, can I bother you for a bit? I tried the "Advanced users" thingy to achieve a certain BB code effect but to no luck. Can you make a BB code similar to the "Spoiler" one except you can replace it with any word/phrase/sentence?

Thanks in advance :)

Do you mean a spoiler type thing that doesn't have "Spoiler: " infront of it?
That would be
Code:
 
ubb_tag("Spoiler","spoiler",'<div class="spoiler_toggle"><% VAR %></div><div class="spoiler" style="display: none;"><% INNER %></div>',1,"Hide some text||Enter text to be hidden||Enter title of spoiler");
Edited by Xanikseo, Jun 26 2009, 04:03 PM.
Offline Profile Quote Post Goto Top
 
Laurence
Member
[ * ]
Thanks Xanikseo I finally got it working. 1 last question though.

So what I'm trying to do is make an "Offtopic" code which behaves similar to the "Spoiler" code. I managed to complete it and make it work. However, when I tried to add a new CSS so the Offtopic will look different than the Spoiler, it stopped "Toggling"... I made a new code out of the spoiler_toggle and spoiler to offtopic_toggle and offtopic. The class "offtopic" works well but when I added the "offtopic_toggle", it did change the background color but when you click on it, nothing happens.

Here are the codes I used:
Code:
 
Offtopic Code:
ubb_tag("Offtopic","offtopic",'<div class="offtopic_toggle">Offtopic</div><div class="offtopic" style="display: none;"><% INNER %></div>',0,"Hide some text||Enter text to be hidden||Enter title of spoiler");

The CSS:
div.offtopic {
border:1px solid #888;
border-top:0;
padding:5px 7px;
}

div.offtopic_toggle {
background: #474747;
border:1px solid #888;
color:#fff;
cursor:pointer;
font-weight:700;
padding:2px 4px;
}


What's wrong with those?
Edited by Laurence, Jun 27 2009, 05:54 AM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code & Modification Database · Next Topic »
Add Reply