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 (3,832 Views)
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
For InvisionFree version, click here.
Mod name: Best BB Tag Code EVER v3 (BBBTCE)
Preview: http://s1.zetaboards.com/xaniktest3/topic/943307/1/
Features: Create/Add any BB code you want to your board, whether it be like [this], [this][/this] or [this=something]something else[/this] or even [this=something1,something2,something3...etc]something else[/this]. Normal ZB style buttons added to forum posting page for easy insertion to post, even with capability of step-by-step explanation to a newbie how each BB code is used. Some pre-made BB Codes can be used as well (below).
New in v3.1:
  • BB can be enabled/disabled in blogs, topic titles, PMs, and user descriptions/titles as well
  • NEW (05/Jul/09) - Less lag on posting pages, and now faster than v2.1 in every way
  • Less space is used in the board wrappers
  • Buttons added to posting pages are better integrated (same row as ZB BB buttons)
  • Fixed bug where if you have two BB codes with the same tag name, but two different amounts of variables they would interfere. E.g [code=var1,var2]code[/code] and [code=var1]code[/code] will now not interfere anymore (both codes need different BB tag codes as they are treated as different, and the BB code with the more variables has to be mentioned first in the Board Wrappers)
New in v2.1:
  • Previewing post works properly now (doesn't load new page)
  • BB Codes displayed properly when looking at a single post
  • BB Codes displayed properly on other pages (e.g. search results, profile). All pages should have BB code working now.
  • Even faster (it's now at least 4 times faster than v1)
New in v2:
  • Faster, noticeable speed increase in slow browsers (i.e. FF, IE).
  • BB Codes work in signatures and polls.
  • You can disable certain BB codes in the signatures and/or polls.
  • Can disable buttons to be shown on the posting page
  • Buttons added to signature editing page (as long as the certain BB Code is allowed in signatures)
  • Can change the name of the button on the posting page
  • Works in ZB

Installation: (3 Steps) (If "upgrading" from v2 or v2.1, please go over the same steps again, many things are different)
1. Put this in the top of the "below the board" section of the board template page in the ACP:
Code:
 
<script src='http://209.85.62.24/217/61/0/p180760/'></script><script>
Go to ACP->Themes->Edit Theme Layout
make sure there is a <div id="wrap"> before the <!-- NAV --> and a </div> after the <!-- BOARD -->. E.g.
Code:
 
<div id="wrap"><!-- NAV --><!-- BOARD --></div>
This should only be necessary if you have a custom skin which doesn't use the '<div id="wrap"></div>' (naughty). (Note to early [pre 05/Jul/09] v3 users: this is a faster version of v3 than you may be using now, these two things are the only things that need to be changed if "upgrading" from v3)
2. Choose one or more BB tags to have on your forum, and insert it/them into the "below the board" section, just under the code mentioned above (don't forget step 3 afterwards): (you can also create your own BB Codes, see at the bottom of this post). Most popular BB codes are in a red font.


  • Simple ZB codes in topic titles - click here - bold, italic, underline, bigger, smaller, image, colour, url
  • Hidden message - reply to see - Specific discussion thread
  • Embed YouTube videos - (Needs only YouTube page URL, not video URL)
  • Media Embed - Embed media (e.g. music, videos, flash (not just flash unlike ZB) etc)
  • You (display member logged in name in post)
  • PM - Display a message only to specific user(s) chosen when you enter the BB code into the post. E.g. [pm=Xanikseo,testy,user3,user5]message[/pm] shows the message when Xanikseo, testy, user3, or user5 are looking at the post
  • IE Only - Display Text visible to only Internet Explorer Users (optional extra BB code to specify certain IE versions) - by firestrife2
  • Any browser but IE - Display Text visible to only non-Internet Explorer Users - by firestrife2
  • Table - Put a table into a post with ability to merge rows/columns/boxes - How to use it - Doesn't work in Chrome
  • Anchor - Put a named anchor into a post (place to jump to), put a link to jump to a named anchor into post
  • Spoiler - Same as ZB spoiler, but can specify title of spoiler each time
  • Code with title by theschoot - Same as ZB code BBC tag, but can specify title of code - Disabled in signatures and polls, button disabled
  • Add background image to text (not just text) by firestrife2
  • Marquee - Make text scroll across the page
  • Google - Create a link pointing to a Google search you specify
  • Yahoo - Create a link pointing to a Yahoo search you specify
  • YouTube search - Create a link pointing to a YouTube search you specify - by obxbiker
  • Forum search - Create a link pointing to the forum search query you specify by obxbiker
  • Note - Put a note in your message that only you can see while editing the post
  • Note - Put a note in your message that only you can see while editing the post. Can be seen by admins even when not editing the post
  • Date - Put the date on the post (always updates) - by theschoot
  • Left float - right float - Write on the left side something and in the same row on the right side. - click for code - theschoot
  • Scroll - add a text which would add a scroll bar if the height is too big! - click for code - theschoot
  • Style - put your own custom css styles on text through UBB. - by Viral.
  • Rainbow flash - Make text glow the colour of the rainbow
  • 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")
  • Offtopic - Declare something as offtopic
  • Symbol - Embed a symbol into your post (e.g. "0222" = "Þ")
  • 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)
Click the spoiler to show the codes which need to be put into the "below the board" section for the BB codes which you want.
Spoiler: click to toggle



3. NOW HAVING CHOSEN YOUR CODES enter this just underneath the codes you have just entered:
Code:
 
</script>
THAT'S IT!








(Advanced users) Customising/Creating your own BB Codes
This is the basic layout for the script (users of V1 will recognise the layout):
Quote:
 
ubb_tag("Name of BB Code","Tag name of BB code","What you want the BB Code in the post to be converted into",Number of variables in the BB Code,"What the code does||Instruction for inner variable||Instruction for first variable||Instruction for second variable .... etc","(Optional) Options (where to enable/disable BB code and posting button options","(Optional) Different name of button (can include HTML)");


Name of BB Code - Self explanatory. e.g. enter "Hyperlink".

Tag name of BB code - E.g. [link][/link] would equate to "link"

What you want the BB Code in the post to be converted into - This is where it gets complicated. Enter the HTML which should replace the whole tag, but enter "<% INNER %>" for where you want the inner variable to go ([bbtag]inner variable[/bbtag]), and "<% VAR %>" or "<% VAR[1] %>" for the first variable ([bbtag=first variable]inner variable[/bbtag]) and "<% VAR[2] %>" for the second variable ([bbtag=first variable,second variable]inner variable[/bbtag]), if necessary, and so on. E.g:
If one used the code

"<a href='<% VAR %>' style='color: <% VAR[2] %>;'><b><% INNER %></b></a>"
and you name the BB Tag "link" and a user entered the following:
[link=http://www.google.co.uk/,red]Google UK[/link]
The following would be shown in the post:
Google UK.
If don't need to use <% INNER %> (eg if you just want a bb code only like "[this]") or <% VAR %> (e.g. if you want a code only like "[this][/this]"), you don't have to enter them as long as they aren't part of the BB Code.

Number of variables in the BB Code
Enter -1 for a code just like [this].
Enter 0 for a code just like [this]...[/this].
Enter the number of variables you have if you have a code like [this=var,var2]...[this]. (e.g [this=var,var2]...[this] would be 2)

"What the code does||Instruction for inner variable||Instruction for first variable||Instruction for second variable .... etc"
If you entered -1 and above for Number of variables, put the description of the BB Code (e.g. Embeds media).
If you entered 1 and above for Number of variables, add an "||" and put the instruction for entering the BB Code (e.g. Enter source of media file). 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").
e.g. for [link=url,colour]name[/link]
"Puts a coloured link into the post||Enter name of link||Enter full URL of link||Enter colour of link"
Make sure all of this is in quotes

"(Optional) Options (where to enable/disable BB code and posting button options"
Here is a list of options (you can use as many as you want and in any order). The default value of not using one of the options is the opposite of what entering that option does (e.g. not using p in the options means that the BB code is allowed in polls):
  • p - disable in poll
  • s - disable in sig
  • m - disable in private messages
  • l - disable in blog entry
  • u - enable in username title
  • t - enable in topic title
  • b - disable button
  • n - newline after button
  • z - put button below zetaboards button row
  • f - if bb code is use in conjunction with a fuction, call the function after the bb has been parsed, also used for previewing bb code (the function must be called xbb_ followed by the tag name, e.g. [reply][/reply] would be xbb_reply() )
E.g. "psut" disables use the BB code in polls, signatures, but enables it's use in username titles (the description under the username) and topic titles.

"(Optional) Different name of button (can include HTML)" - Enter if you want to change the name of the button (e.g. "URL"). Can include HTML.
Edited by Xanikseo, Jul 22 2009, 11:19 AM.
Offline Profile Quote Post Goto Top
 
theschoot
Member Avatar
Member
[ *  * ]
:D :D yihahaha now it's here ;) ;) i will use it ofc... :P
Offline Profile Quote Post Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
Nice work bud :)
Offline Profile Quote Post Goto Top
 
Pilla
Member
[ * ]
i realized all the steps, but, when we open a post (old or new) nothing appears (even the old posts!)

Posted Image
Edited by Pilla, Jun 3 2009, 06:27 PM.
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
That doesn't appear to be happening anymore as far as I can see.
http://s1.zetaboards.com/MafiaOtaku/topic/1375647/1/ works for me...
Edited by Xanikseo, Jun 15 2009, 08:00 AM.
Offline Profile Quote Post Goto Top
 
Pilla
Member
[ * ]
Xanikseo
Jun 4 2009, 10:52 AM
That doesn't appear to be happening anymore as far as I can see.
http://s1.zetaboards.com/MafiaOtaku/topic/1375647/1/ works for me...
I talked with shion, and he said he changed the code for the version 2 again.

I'm installing version 3 again, hopefully works fine this time.




Hi again.

I have installed again the version 3, and stills do the same as before.

what can i do?
we removed it and replaced for version 2.1. Also, we installed the version 3 in this forum:

http://s1.zetaboards.com/motest

it don't works :'(
Edited by Pilla, Jun 5 2009, 01:01 PM.
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
EDIT: I have added a cool new BB code: hide a message to everyone apart from the user(s) (1 or more users seperated by commas if necessary) you choose when you enter the BB code.




Pilla: In your source code for motest you have

Code:
 
<script>if(window.location.href.match(/\/topic\//)) { document.write('<span id="board-hidden-area" style="display:none;">'); }</script>

and
Code:
 
<script>if(window.location.href.match(/\/topic\//)) { document.write('<span id="board-hidden-area" style="display:none;">'); }</script>


which will hide the thread when you view it.
So after your replytosee tag code you will need to add
Code:
 
if(window.location.href.match(/\/topic\//)) { document.getElementById('board-hidden-area').style.display='';}

So your new v3 replytosee tag should be:
Code:
 
ubb_tag("Reply to see","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",'sm',"Reply");if(window.location.href.match(/\/topic\//)) { document.getElementById('board-hidden-area').style.display='';}</script><script src='http://209.85.62.24/179/115/0/p70819/reply2seez.'></script><script>
Edited by Xanikseo, Jun 6 2009, 05:48 PM.
Offline Profile Quote Post Goto Top
 
Pilla
Member
[ * ]
It's Working!!!!!

THANK YOU VERY MUCH!!!!!!!!!!!!!

(and sorry for the inconveniences :P)
Offline Profile Quote Post Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
Xanikseo
Jun 6 2009, 04:25 PM
EDIT: I have added a cool new BB code: hide a message to everyone apart from the user(s) (1 or more users seperated by commas if necessary) you choose when you enter the BB code.

How exactly would we input that in a message for example?
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
[pm=LagerLout,Xanikseo]Hidden message[/pm]
This only shows "Hidden message" to LagerLout or Xanikseo, but is hidden for everyone else.
[pm=LagerLout]Hidden message[/pm]
Only shows to LagerLout.
[pm=LagerLout,Pilla,Xanikseo]Hidden message[/pm]
Shows only to LagerLout, Pilla and Xanikseo.
You can put spaces between the commas if you want, it will also work. e.g.
[pm=LagerLout, Pilla, Xanikseo]Hidden message[/pm]
still works

That's the "PM" tag code btw.
Edited by Xanikseo, Jun 10 2009, 10:04 AM.
Offline Profile Quote Post Goto Top
 
tammster
Member
[ * ]
Okay is there something I have to do to use the BBcodes in topic titles? Because I am trying to use it and I can not ;)
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
At the bottom of the first post there are instructions on where to enable BB codes
"(Optional) Options (where to enable/disable BB code and posting button options"
basically add a t to the options to enable it in the topic titles.

If that's too complicated, just reply with the codes you want to enable in the topic title, and I will give you the new codes to use to enable them in the topic title.
Offline Profile Quote Post Goto Top
 
tammster
Member
[ * ]
I just want to do basic ones like bold, italics, underline ;)
Offline Profile Quote Post Goto Top
 
Xanikseo
Member Avatar
Xanik Says "Oh"
[ *  *  * ]
Ahh I see :P ...

Code:
 
ubb_tag("Bold","b","<strong><% INNER %></strong>",0,0,'btpsm');
Code:
 
ubb_tag("Italic","i","<em><% INNER %></em>",0,0,'btpsm');
Code:
 
ubb_tag("Underline","u","<u><% INNER %></u>",0,0,'btpsm');
Code:
 
ubb_tag("Image","img","<img src='<% INNER %>' />",0,0,'btpsm');
Code:
 
ubb_tag("Bigger","big","<big><% INNER %></big>",0,0,'btpsm');
Code:
 
ubb_tag("Smaller","small","<small><% INNER %></small>",0,0,'btpsm');
Code:
 
ubb_tag("Color","color","<span style='color:<% VAR %>'><% INNER %></span>",1,0,'btpsm');
URLs in topic titles

If you need anything else just tell me and I'll add it.
Edited by Xanikseo, Jun 26 2009, 09:45 AM.
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
Xanikseo: Use <em></em> not <i></i> ;) .
Online 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