Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
BBTag Spoiler (hide a text)
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2009-01-13 22:07:30
Let's go, it's so easy!

In functions.php find:

	// 
  • $s = preg_replace("/\[\*\]/", "<li>", $s);
  • Before add:




    	//[spoiler]TEXT[/spoiler]

    $s = preg_replace("/\[spoiler\]((\s|.)+?)\[\/spoiler\]/", "<div style=\"margin:0px 0px 0px 0px\">

    <div class=\"smallfont\" style=\"margin-bottom:0px\">

    <small><b><blink>May have revelations.<br>Click the button to show/hide.</blink><br></b></small><input type=\"button\" value=\"Show\" style=\"width:75px;font-size:10px;margin:0px;padding:0px;\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\">

    </div>

    <div style=\"margin: 0px; padding: 0px; border: 0px inset;\">

    <div style=\"display: none;\">\\1</div></div>", $s);




    How to use...

    Use like this

    [*spoiler]text here[/*spoiler]

    remove the * from the tags!
    Unknown User
    2009-01-14 21:17:13
    what dose this look like? dont know what spoiler is or does. thanks
    Unknown User
    2009-01-14 21:25:54
    It's like a container and every inside is only showed when click the button....

    spoilers are... hmm... revelations of the "file" and can be hidden (hided, hide, don't know rofl)
    Unknown User
    2009-01-14 21:34:24
    [spoiler]this is a spoiler

    [/spoiler]
    Unknown User
    2009-01-14 21:34:25
    [spoiler]this is a spoiler

    [/spoiler]
    Unknown User
    2009-01-15 06:28:18
    Quick edit to the code i made it look a little tider and and box for the hidden text

    //[spoiler]TEXT[/spoiler]

    $s = preg_replace("/\[spoiler\]((\s|.)+?)\[\/spoiler\]/", "<div class=\"smallfont\" align=\"center\">

    <small><b><blink>Click the button to show/hide Spoiler.</blink><br></b></small><input type=\"button\" value=\"Show\" style=\"width:75px;font-size:10px;margin:0px;padding:0px;\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\">

    <div style=\"margin: 10px; padding: 10px; border: 1px inset;\" align=\"left\"><div style=\"display: none;\">\\1</div></div></div>", $s);


    Looks a little better.
    Unknown User
    2009-01-15 14:47:12
    [spoiler]BOO

    [/spoiler]

    nice but i wont find no use for it lol
    Unknown User
    2009-01-25 14:02:31
    "daffy, post: 51652":
    [spoiler]BOO



    nice but i wont find no use for it lol
    [/spoiler]

    The spoiler tag on these forums are different to the one above.   You may think you don't need it but one day you find out you may need it, just add it to the functions.php let your users decide.
    Users online

    No users online

    Search



    Statistics

      Torrents

    • Tracking: 3
    • Todays torrents: 0
    • Seeders: 0
    • Leechers: 0
    • Peers: 0
    • Downloaded: 89.96 GB
    • Uploaded: 9.86 GB

    • Members

    • We have: 838
    • New today: 0
    • Guest today: 9

    • Online

    • Total online: 1
    • Members: 0
    • Guests online: 1
    • Comments: 3
    • Messages: 1,728