|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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); |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
ahh sorry add this to css
Code:
.spoiler { font-family: "arial"; font-size: 10px; color: #000000; background-color: #000000; } |
#5
|
||||
|
||||
PHP Code:
__________________
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/ |
#6
|
|||
|
|||
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:
any guess to solve this? Last edited by ndbj; 3rd January 2013 at 04:23. |
#7
|
|||
|
|||
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> |
Tags |
2008 , spoiler , tag , tbdv |
|
|