Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 29th December 2012, 07:58
ndbj's Avatar
ndbj ndbj is offline
Senior Member
 
Join Date: Dec 2012
Portugal
Posts: 35
Default spoiler tag to tbdv 2008
Hi people
anyone with the spoiler tag mod for old tbdev source that could share with us?

thanks in advance.
Reply With Quote
  #2  
Old 2nd January 2013, 17:38
rabtb's Avatar
rabtb rabtb is offline
Senior Member
 
Join Date: Aug 2008
Posts: 39
Default
add to global.php

Code:
        //[spoiler]Text[/spoiler]
    $s = preg_replace("/\[spoiler\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i",
    "<b>Spoiler:</b><table border=1 cellspacing=0 cellpadding=3><tr class=spoiler>
<td style='border: 1px black solid'><font color=#000000>\\1</font></td></tr></table>", $s);
Reply With Quote
  #3  
Old 3rd January 2013, 02:28
ndbj's Avatar
ndbj ndbj is offline
Senior Member
 
Join Date: Dec 2012
Portugal
Posts: 35
Default
thanks for helping.
however, that code is showing spoilers like quotes.

do i need to put something in my default.css?
i would like that spoiler could work with those plus/minus.gifs to show/hide content.
Reply With Quote
  #4  
Old 3rd January 2013, 02:48
rabtb's Avatar
rabtb rabtb is offline
Senior Member
 
Join Date: Aug 2008
Posts: 39
Default
ahh sorry add this to css

Code:
.spoiler {

font-family: "arial";

font-size: 10px;

color: #000000;

background-color: #000000;

}
no show/hide ul need to add that urself
Reply With Quote
  #5  
Old 3rd January 2013, 03:03
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,112
Default
PHP Code:
$s preg_replace("/\[spoiler\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i",
    
"<div class=\"shout\"><div class=\"shout\"><a href=\"#\" onclick=\"n = this.parentNode.parentNode.lastChild; if(n.style.display == 'none') { n.style.display = 'block'; } else {    n.style.display = 'none';    } return false;\">Spoiler (click to show/hide)</a></div><div class=\"spoiler\" style=\"display: none;\">\\1</div></div>"$s); 
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #6  
Old 3rd January 2013, 03:34
ndbj's Avatar
ndbj ndbj is offline
Senior Member
 
Join Date: Dec 2012
Portugal
Posts: 35
Default
Many thanks to both.

@rabtb: joeroberts code is a clever way to show/hide spoiler content.
you should try it.

@joeroberts: I only changed <a href=\"#\" onclick= to <a class=altlink href=\"#\" onclick= but i would like also to add those small icons (minus/plus) before the spoiler link.
my knowledge at java sucks, can you help me on how to add those pics in that function?


Bump: this one here
http://www.bvlist.com/mods-themes/865-spoiler-tag.html
was almost installed with success in my old source.
the function at global.php - ok
the default.css - ok
creation and upload to server of jquery-1.1.1.pack.js - ok
upload of minus/plus.gifs - ok

the only thing i couldn't do was this code here
Quote:
<script language="javascript" type="text/javascript" src="js/jquery-1.1.1.pack.js"></script> <script type="text/javascript"> $(document).ready( function(){ $('div.news-head') .click(function() { $(this).toggleClass('unfolded'); $(this).next('div.news-body').slideToggle('fast'); }); }); </script>
when i put this at my inc/bittorrent.php it gives me error of header already sent...
any guess to solve this?

Last edited by ndbj; 3rd January 2013 at 04:23.
Reply With Quote
  #7  
Old 19th July 2013, 22:41
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
Code:
<script language="javascript" type="text/javascript"  src="js/jquery-1.1.1.pack.js">
</script> 
<script  type="text/javascript"> $(document).ready( function()
{    
$('div.news-head')   .click(function()
{      
$(this).toggleClass('unfolded');      
$(this).next('div.news-body').slideToggle('fast');   }); });  
</script>
better to read now
Reply With Quote
Reply

Tags
2008 , spoiler , tag , tbdv

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 00:09. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2021, vBulletin Solutions Inc.