Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JAVASCRIPTS:
- <script type="text/javascript">
- (function($) {
- var regex = [/\[css\s*=([^"']+?)\]([\s\S]+?)\[\/css\]/gi, /position\s*:(?:[^;:]+?;|[^;:]+$)?/i];
- $('td.c_post').each(function() {
- var $t = $(this),
- html = $t.html(),
- change = false;
- while (regex[0].test(html)) {
- change = true;
- html = html.replace(regex[0], function(f, o, t, p) {
- return '<div style="' + o.replace(regex[1], '') + '">' + t + '</div>';
- });
- }
- if (change)
- $t.html(html);
- });
- })(jQuery);
- </script>
- ABOVE THE BOARD:
- <br>
- <p style="color:#e77700"><strong><marquee behavior="scroll" direction="left" scrollamount="9" onmouseover="this.stop()" onmouseout="this.start()"> </a></marquee></p></strong>
- BELOW THE BOARD:
- <script type='text/javascript'>
- //Tabs BBCode by Quozzo
- $('.c_post:contains("[/tabs]"):not(:has("textarea"))').each(function(){
- $(this).html($(this).html().replace(/\[tabs(?:=([^'"]+?))?\]([\s\S]+?)\[\/tabs\]/gi, function(tabs,g1,g2) {
- var tabrollheader="",
- tabcount = 2,
- tabrollbody = "";
- g2.replace(/\[tab=(.+?)\]([\s\S]+?)\[\/tab\]/gi, function(tab,h1,h2) {
- tabrollheader += "<td class='tabtab' name='"+tabcount+"' style='cursor:pointer;'>"+h1+"</td>";
- tabrollbody += "<div class='tabdiv' style='display:none;'>"+h2+"</div>";
- tabcount++
- });
- if(g1){tabwidth = " style='width:"+g1+"'";}else{tabwidth = "";};
- tabrollhead = "<table"+tabwidth+" class='posttabs'><tr><td style='width:5px;border-top:0;border-left:0;background:none;'></td>";
- tabroll = "</tr><tr><td colspan='"+tabcount+"'>"+tabrollbody+"</td></tr></table>";
- tabrollheader += "<td style='width:5px;border-top:0;border-right:0;background:none;'></td></tr>";
- return tabrollhead+tabrollheader+tabroll;
- }));
- });
- $('.posttabs').each(function(){
- $(this).find('.tabtab:first').addClass("activetab");
- $(this).find('.tabdiv:first').show();
- });
- $('.tabtab').live('click', function(){
- $(this).parent().parent().find('.activetab').removeClass('activetab');
- $(this).addClass('activetab');
- var tabnum = $(this).attr('name');
- tabnum=tabnum-2;
- $(this).parent().parent().find('.tabdiv').hide();
- $(this).parent().parent().find('.tabdiv:eq('+tabnum+')').show();
- });
- $('#c_bbcode button:last').after(" <button type='button' onClick='gettabs(1)'>Tabs</button>")
- function gettabs(num){
- switch(num){
- case 1:
- tabroll = "";
- gettabs(2)
- break;
- case 2:
- tabtitle = prompt("What is the title of the tab","");
- if(tabtitle){gettabs(3)}else{gettabs(6)};
- break;
- case 3:
- tabcontent = prompt("What are the contents of the tab","");
- if(tabcontent){gettabs(4)}else{gettabs(5)};
- break;
- case 4:
- tabroll += "[tab="+tabtitle+"]"+tabcontent+"[/tab]";
- gettabs(2)
- break;
- case 5:
- conf = confirm("Quit making tabs? You will lose what have done so far.");
- if(!conf){gettabs(2)};
- break;
- case 6:
- if(tabroll.length>0){
- text = $('textarea[name=post]').val();
- $('textarea[name=post]').val(text+"[tabs]"+tabroll+"[/tabs]");
- };
- };
- };
- </script>
- <style type='text/css'>
- .activetab{
- font-weight: 900;
- }
- </style>
- <script type="text/javascript">
- (function($) {
- var regex = [/\[css\s*=([^"']+?)\]([\s\S]+?)\[\/css\]/gi, /position\s*:(?:[^;:]+?;|[^;:]+$)?/i];
- $('td.c_post').each(function() {
- var $t = $(this),
- html = $t.html(),
- change = false;
- while (regex[0].test(html)) {
- change = true;
- html = html.replace(regex[0], function(f, o, t, p) {
- return '<div style="' + o.replace(regex[1], '') + '">' + t + '</div>';
- });
- }
- if (change)
- $t.html(html);
- });
- })(jQuery);
- </script>
- <script type="text/javascript" src="http://z3.ifrm.com/63/1/0/p476647/BBCode_in_Topic_Titles.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement