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
  • Pages:
  • 1
  • 9
Best BB Tag Code EVER v3.1 [ZB]; Most customisable, can do ANYTHING!; By Xanikseo
Topic Started: Feb 3 2010, 11:53 PM (27,115 Views)
Member Avatar
una trappola!

This topic has been moved from our official support board.

Originally posted by: Xanikseo
Best BB Tag Code EVER v3.1 [ZB
; Most customisable, can do ANYTHING!]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: var1
    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:
<script type='text/javascript' src='http://z1.ifrm.com/0/2/0/p401849/bbtags31_xanik.js'></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.
<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:

(Advanced users) Customising/Creating your own BB Codes
This is the basic layout for the script (users of V1 will recognise the layout):
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.
Edit: To fix the preview function, replace this in your board template:
<script src='http://z3.ifrm.com/217/61/0/p180760/'></script>
with this:
<script type='text/javascript' src='http://z1.ifrm.com/0/2/0/p401849/bbtags31_xanik.js'></script>
and that should do the trick.
Attached to this post:
Attachments: bbtags31_xanik.js (9.04 KB)
Edited by Reid, Jun 19 2010, 03:37 PM.
Offline Profile Quote Post Goto Top
Member Avatar
[ *  *  *  *  * ]
I'd personally recommend keeping it lowercase so it can match the rest of the BBCode, and unfortunately this code makes BBCode case-sensitive (unlike Zeta BBCode). Members are more likely to use lowercase BBCode than uppercase.
Offline Profile Quote Post Goto Top
[ * ]
The code for the floats can no longer be accessed, I get a '4:1' error when clicking on the link.
Offline Profile Quote Post Goto Top
[ * ]
Can the anchor code be used to link separate threads? For example, if my anchor was in post A, could I link post B to that specific spot in post A?

Can it be used to link to other posts within a thread? For example, can post #1 in a thread link to an anchor in post #3 of the same thread?
Edited by Q_Q, Nov 30 2017, 07:00 PM.
Offline Profile Quote Post Goto Top
Member Avatar
[ *  *  *  *  *  *  *  *  * ]
Try this to create an anchor to separate pages:
<script type="text/javascript">
$('td:not(:has(textarea)):contains([/id]), div.search_results:contains([/id])').each(function() {
$(this).html($(this).html().replace(/\[id\](.+?)\[\/id\]/ig, '<span id="$1"></span>'));
Change URL as necessary.
Offline Profile Quote Post Goto Top
1 user reading this topic (1 Guest and 0 Anonymous)
DealsFor.me - The best sales, coupons, and discounts for you
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 9