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

At ZetaScript, you will be able to access codes and modifications for your ZetaBoards and InvisionFree Forum. Register today or log in to see these great features!


Username:   Password:
[✓] bbcode
Topic Started: May 2 2011, 11:19 AM (471 Views)
Oracle
Member Avatar

Forum Software: Zetaboards
Type of Code: bbcode
Your Board Link: poketime.cjb.net
Screenshots:
Priority: High

Code Description: I'm using this tab bbcode by Quozzo:

Code:
 
<script type='text/javascript'>

// Tab BBCode by Quozzo

$('.c_post').each(function () {

$(this).html($(this).html().replace(/\[tabs\](.+?)\[\/tabs\]/gi, function(tabs,g1) {

tabrollheader="<table><tr><td style='width:5px;'></td>"

tabcount = 2

tabrollbody = ""

g1.replace(/\[tab=(.+?)\](.+?)\[\/tab\]/gi, function(tab,h1,h2) {

tabrollheader += "<td class='tabtab' name='"+tabcount+"' style='cursor:pointer;'>"+h1+"</td>"

if(tabcount==2){tabrollbody += "<div class='tabdiv'>"+h2+"</div>"}else{tabrollbody += "<div class='tabdiv' style='display:none;'>"+h2+"</div>"};

tabcount++

});

tabroll = "</tr><tr><td colspan="+tabcount+">"+tabrollbody+"</td></tr></table>"

tabrollheader += "<td style='width:5px'></td></tr>"

return tabrollheader+tabroll

}));

});



$('.tabtab').live('click', function(){

tabnum = $(this).attr('name')

tabnum=tabnum-2

$(this).parent().parent().find('.tabdiv').hide();

$(this).parent().parent().find('div:eq('+tabnum+')').show();

});

</script>


However, it breaks if there is more than 6 tabs. Could someone either repair this or make a new one? Thanks.
Offline
 
Alam
Member Avatar

What is the function you want the bbcode to accomplish?
Offline
 
Oracle
Member Avatar

It's like a [tab][/tab]. Here's the topic: http://resources.zetaboards.com/topic/5111978/1/
Offline
 
Alam
Member Avatar

Ohh, that kind of tabs. :P Hopefully we can complete this for you shortly.

Your zPoints have been deducted from your zBank. Please make sure to be in contact with the member doing this request.

Alam | ZetaScript Staff
Offline
 
Oracle
Member Avatar

Thanks Alam. :)
Offline
 
Oracle
Member Avatar

I don't need this anymore. :)
Offline
 
Alam
Member Avatar

Okay. I refunded your zPoints.

Request Complete!

Your code request has been completed. If you want another code or feel that you need this one changed a little, please post a new Code Request topic. If this code does not work, please post a Code Repair Request topic in Code Repair. Thanks for choosing ZetaScript as your code provider!

Alam | ZetaScript Staff
Offline
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed · Next Topic »

Theme design by Flying Whales and coded by Gabriel. of Outline.