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 Code Ever [Opera,IE,FF]; Most customisable, can do ANYTHING!; By Xanikseo
Topic Started: Jan 23 2010, 12:50 AM (121 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Xanikseo
Best BB Code Ever [Opera,IE
FF
; Most customisable, can do ANYTHING!]NOTE: Code now redundant, replaced by Best BB Code EVER v2 (compatible with all v1 codes).



Mod Name: Xanikseo BB
Preview: http://z3.invisionfree.com/xaniktest5/index.php?showtopic=3
Description: This is really the best BB script I have ever seen (I'm not being bais). You can set it to "[this]" or "[this][/this]" or "[this=(as many commas as you want to seperate different variables)][/this]". There are even some preset BB Codes.

Installation:

Put this in your footer:
Quote:
 
<script src="http://i1.ifrm.com/6877/58/upload/p1640564.ibf"></script>


Then follow the steps below to either create your own BB Codes, or to use preset ones.

If you want to CREATE your own BB Codes, look here (look even further down to see some preset ones):


And to add BB Codes put this under (I'll explain it later):
Quote:
 
<script>
ubb_tag("Name","Begining tag (without square brackets)","End tag (without square brackets)","How you want it to end up (according to what was entered by the poster)",Number of variables,"Description (separated by '||'s)"); </script>


Now to explain:

"Name":
Enter the name of the BB tag, eg Strikeout.

"Begining tag (without square brackets)":
What you want in the begining square brackets, eg "strike" would become "[strike]".

"End tag (without square brackets)"
What you want in the ending square brackets, eg "strike" would become "[/strike]".

"How you want it to end up (according to what was entered by the poster)"
Now, this is complicated. This is basically the stuff that will be shown instead of the code. If you wanted it to end up as a single image (not a good idea, unless you want to have just one opening BB tag) you would put "<img src='blah.png' border='0'>". That's not that great, but it get's better. What if you wanted the stuff between the opening and closing tags ("[this]" and "[/this]") to be outputted as well? Well that is simple, just add <% INNER %> to your code. Eg if someone entered "[bold]hello[/bold]", and you put "<b><% INNER %></b>" into your code, the text "hello" would become bold. What if you wanted the variables ([bbtag=This is the variable,This is another variable]This is the inner[/bbtag]), well just insert this into your <% VAR[Number of the variable, the first one being 0, the second being 1 and so on] %>. So if a poster entered "[hello=my first variable,my second variable]b[/hello]" and your code is "<span style='color:red'><<% INNER %>><% VAR[0] %></<% INNER %>></span><BR><span style='color:blue'><<% INNER %>><% VAR[1] %></<% INNER %>></span>". This would be outputted:

my first variable
my second variable

Impressive eh?

Number of variables
If you want a BB Code like "[this]" enter -1.
If you want a BB Code like "[this][/this]" enter 0.
If you want a BB Code like "[this=blah][/this]" enter 1 (even if you have 100 variables).

"Description (separated by '||'s)"
If you entered -1 and above for Number of variables, put the description of the BB Code (e.g. Embeds media).
If you entered 0 and above for Number of variables, add an "||" and put the instruction for entering the BB Code (e.g. Enter source of media file).
If you entered 1 for Number of variables, for every variable, add an "||" and type in the instruction for each variable, one by one, in order (e.g. "Width of media file||Height of media file").

THAT'S IT!



If you can't be bothered to create your own, don't know how, or just want some templates, look below


Here is a list of the current preset BB Codes (add some more if you want, just post)



  • Hidden message - reply to see - Specific discussion thread

  • Media Embed - Embed media (e.g. music, videos, flash etc)

  • You (display member logged in name in post)

  • Marquee - Make text scroll across the page

  • Rainbow flash - Make text glow the colour of the rainbow

  • Highlight text - Highlight text in any colour you want

  • Reverse text - Writes the text you specify backwards (e.g. "Hello" becomes "elloH")

  • Alpha2Num (turns letters into numbers - A=1,B=2 etc, "Hello" would be "8 5 11 11 14")

  • Google - Create a link pointing to a Google search you specify

  • Yahoo - Create a link pointing to a Yahoo search you specify

  • Note - Put a note in your message that only you can post

  • Offtopic - Declare something as offtopic

  • Spoiler 1 - Hide text

  • Spoiler 2 - A bit more stable than Spoiler 1

  • Symbol - Embed a symbol into your post (e.g. "0222" = "Þ")

  • SuperScript (adds button)

  • SubScript (adds button)

  • Strikeout (adds button)

  • Align (adds button)

  • HR - Horizontal line across page (adds button)

  • Glow - Make text glow any colour you want (only works in IE)

  • Wave - make text wave (only works in IE)

  • X-Ray (only works in IE)

  • Transparency - makes text transparent (only works in IE)

  • Shadow - Give text a coloured shadow (any colour you want) (only works in IE)

  • Blur - Blur text (only works in IE)



Here are the actual codes (add them to your footer, underneath the code at the top)
Hidden message - reply to see - NOTE: This only works for members of your forum, and anyway, this would be a pointless code if it worked for guests as well. - Specific discussion thread
Quote:
 
<script>ubb_tag("Reply to see","reply","reply","<span id='reply_to_see_section'><span><font color='red'>HIDDEN MESSAGE! REPLY TO SEE!</font></span><span style='display: none;'>Hidden message:<br /><% INNER %></span></span>",0,"Hide a message until user replies||Enter message to hide");</script>
<script src='http://i1.ifrm.com/6877/58/upload/p3104418.ibf'></script>


Media Embed - Embed media (e.g. music, videos, flash etc)
Quote:
 
<script>ubb_tag('Media','emb','emb','<EMBED SRC="<% INNER %>" HEIGHT=<% VAR[1] %> WIDTH=<% VAR %>>',1,'Embed a media file into the post||Source of the media file||Width of the media file||Height of the media file');</script>


You (display member logged in name in post)
Quote:
 
<script>function getMember() {
var x = document.getElementById('userlinks');
if(x.innerHTML.match('Logged')) {
return x.getElementsByTagName('a')[0].innerHTML;
} else {
return 'Guest';
}
}

ubb_tag("You","you","",getMember(),-1,"Display member logged in");</script>


Marquee - Make text scroll across the page
Quote:
 
<script>ubb_tag("Marquee","marq","marq","<marquee direction=<% VAR %>><% INNER %></marquee>",1,"Make text scroll (move)||Enter the text you want to move across the page||Enter the direction you want the text to move");</script>


Rainbow flash - Make text glow the colour of the rainbow
Quote:
 
<script>var rainbow_colors = new Array('Red','Orange','Yellow','Green','Blue','Indigo','Violet','Indigo','Blue','Green','Yellow','Orange');

function change_rainbow_color() {
var x = document.getElementsByTagName('span');
for(i=0;i<x.length;i++) {
if(x.className == 'rainbow_text') {
if(x.id==11) {
x.style.color = 'red';
x.id = "-1";
}
x.style.color = rainbow_colors[parseInt(x.id)+1];
x.id = parseInt(x.id)+1;
}
}
setTimeout("change_rainbow_color()",100);
}

change_rainbow_color();

ubb_tag("Rainbow","rflash","rflash","<span id='-1' class='rainbow_text'><% INNER %></span>",0,"Make text blink the colors of the rainbow||Enter the text you want to flash the colors of the rainbow");</script>


Highlight text - Highlight text in any colour you want.
Quote:
 
<script>ubb_tag("Highlight","hl","hl","<span style='background-color:<% VAR %>;'><% INNER %></span>",1,"Highlight text a certain color||Enter the text to be highlighted||Enter the color of the highlight");</script>


Reverse text - Writes the text you specify backwards (e.g. "Hello" becomes "elloH".
Quote:
 
<script>ubb_tag("Reverse Text","revt","revt","<span id='reverse_text'><% INNER %></span>",0,"Reverse text||Enter the text to be Reversed");
var x = document.getElementsByTagName('span');
for(a=0;a<x.length;a++) {
if(x[a].id == 'reverse_text') {
var return_str = '';
var text = x[a].innerHTML
for (i = 0; i <= text.length; i++) {
return_str = text.substring(i, i+1) + return_str;
}
x[a].innerHTML = return_str;
}
}</script>


Alpha2Num (turns letters into numbers - A=1,B=2 etc, Hello would be "8 5 11 11 14".
[/i][/i]
Quote:
 
<script>ubb_tag("Alpha2Num","aplh2num","aplh2num","<span id='alpha_2_num'><% INNER %></span>",0,"Change letters to numbers||Enter the text to be changed to numbers");
var alpha_bet = 'a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z';
alpha_bet = alpha_bet.split(',');
var x = document.getElementsByTagName('span');
for(i=0;i<x.length;i++) {
if(x.id == 'alpha_2_num') {
var text = x.innerHTML;
text = text.toLowerCase();
for(a=0;a<alpha_bet.length;a++) {
text = while_replace(text,alpha_bet[a],a+1 + ' ');
}
x.innerHTML = text;
}
}</script>


Google - Create a link pointing to a Google search you specify
Quote:
 
<script>ubb_tag("Google","google","google","<a href='http://www.google.com/search?q=<% INNER %>' target='_blank'>\"<% INNER %>\" on Google</a>",0,"A link to Google search||Write Google search");</script>


Yahoo - Create a link pointing to a Yahoo search you specify
[/i][/i]
Quote:
 
<script>ubb_tag("Yahoo","yahoo","yahoo","<a href='http://search.yahoo.com/search?ei=UTF-8&fr=sfp&p=<% INNER %>' target='blank'>\"<% INNER %>\" on Yahoo</a>",0,"A link to Yahoo search||Write Yahoo search");</script>


Note - Put a note in your message that only you can post.
[/i]
Quote:
 
<script>ubb_tag("Note","note","note","<!-- <% INNER %> -->",0,"Add notes to post (only seen when editing)||Type in the notes you want to add to your post");</script>


Offtopic - Declare something as offtopic
[/i]
Quote:
 
<script>ubb_tag("Off Topic","offtopic","offtopic","<i><b><font color='#114499'>Offtopic:</font></b> <font color='#2277DD'><% INNER %></font></i>",0,"Mark text as off topic||Type in the text you want to be marked as off topic");</script>


Spoiler 1 - Hide text
[/i]
Quote:
 
<script>ubb_tag("Spoiler","spoil","spoil","<div><a href='javascript:;' onclick='this.parentNode.getElementsByTagName(\"div\")[0].style.display=\"\";'>
Spoiler: click to toggle
Spoiler: click to toggle
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Join the millions that use us for their forum communities. Create your own forum today.
Learn More · Register for Free
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply