Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Better Spoiler bb code Details »»
Better Spoiler bb code
Version: 1.00, by Ezo Ezo is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 11-10-2007 Last Update: Never Installs: 63
Template Edits
 
No support by the author.

Hello, i had to post this for a friend,
Enjoy it.


Code made by ilT

My site:
http://somewhereyoubelong.com

No Title
Title: Spoiler (No Title)
Tag: spoil
Replacement:

Code:
<div id="spoiler"><div><input type="button" value="Show Spoiler!" style="width:100px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" />
<div id="show" style="background-image:url(http://img37.picoodle.com/img/img37/5/11/7/f_backgroundm_872c796.png); display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
{param}</div>
<div id="hide"></div></div></div>
Example: [spoil]Some text[/spoil]
Use Option: No

With Title
Title: Spoiler (With Title)
Tag: spoil
Replacement:
Code:
<div id="spoiler"><div><font size="4">{option}</font><input type="button" value="Show Spoiler!" style="width:100px;font-size:12px;margin-left:10px;margin-bottom:3px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" />
<div id="show" style="background-image:url(http://img37.picoodle.com/img/img37/5/11/7/f_backgroundm_872c796.png); display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
{param}</div>
<div id="hide"></div></div></div>
Example: [spoil=Title Text]Some Text[/spoil]
Use Option: Yes

Screenshot

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-01-2007, 02:15 AM
SamuraiNigel SamuraiNigel is offline
 
Join Date: May 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, this looks like something I want, but I don't know what to do with the code. Do I throw this into a template? Which one? Do I replace what's in the template or add to it? There aren't any instructions here that i can see...

Edit: Nevermind, I figured it out.
Reply With Quote
  #13  
Old 12-01-2007, 11:14 AM
superthang superthang is offline
 
Join Date: Aug 2007
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by techgsmnet View Post
you about backgrount picture?
Just change picture link to you.
no, i mean like can we supply each with different image so user can click on that image and it show something related to that image

example
[spoiler=http://vbulletin.com/car.gif]content content content about car[/spoiler]

[spoiler=http://vbulletin.com/boat.gif]content content content about boat[/spoiler]

and so on.

also got this error: style is not "null" or an object
Reply With Quote
  #14  
Old 01-02-2008, 05:43 PM
vasek vasek is offline
 
Join Date: Jun 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

added custom title on button:
add new BB code:

Title: Spoiler with custom text on button
Tag: spoiler2
Code:
<div id="spoiler"><div><input type="button" value="{option}" style="width:160px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') 
{ 
 this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = '';
 this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none';
 this.innerText = '';
} else 
{ 
 this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; 
 this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = '';
 this.innerText = '';
}" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
{param}</div>
<div id="hide"></div></div></div>
sample: [spoiler2=text on button]hidden text[/spoiler2]
use option: On
Reply With Quote
  #15  
Old 01-03-2008, 07:30 AM
steve1966 steve1966 is offline
 
Join Date: Dec 2007
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i managed to figure out how to install but when i click on my custom button on the tool bar I a get a pop up same as insert an image

and when i post the what i have inserted into the box i cannot get the hid show to show up
please can someone tell me what i have done wrong
Reply With Quote
  #16  
Old 01-03-2008, 09:40 AM
tintructo's Avatar
tintructo tintructo is offline
 
Join Date: Apr 2007
Location: Junin, BA, Argentina!
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by steve1966 View Post
hi can someone tell me what template to add this code to thanks

or if i have to add this mod code somewhere else please can you give me a an instruction how to install

thanks
AdminCP -> Custom BB Codes -> Add New BB Code

in the title input , put something like "Spoiler"
in the tag input, put something like "spoiler" so you will have the bbcode like this : [spoiler]text[/spoiler]
in the replacement textarea, put the code of the spoiler that you can see on the thread

and that's all
Reply With Quote
  #17  
Old 01-03-2008, 10:25 AM
steve1966 steve1966 is offline
 
Join Date: Dec 2007
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its ok i have sorted it now and got it working
Reply With Quote
  #18  
Old 03-28-2008, 12:15 PM
mikkitine's Avatar
mikkitine mikkitine is offline
 
Join Date: Oct 2007
Location: London
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Multiple spoiler tags won't open after the first spoiler tag has been open regardless of whether they were used in the same post or not. This happens on IE/Safari browsers afaik.
Reply With Quote
  #19  
Old 04-04-2008, 01:07 AM
tjsrachel tjsrachel is offline
 
Join Date: Apr 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vasek View Post
added custom title on button:
add new BB code:

Title: Spoiler with custom text on button
Tag: spoiler2
Code:
<div id="spoiler"><div><input type="button" value="{option}" style="width:160px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') 
{ 
 this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = '';
 this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none';
 this.innerText = '';
} else 
{ 
 this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; 
 this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = '';
 this.innerText = '';
}" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
{param}</div>
<div id="hide"></div></div></div>


sample: [spoiler2=text on button]hidden text[/spoiler2]
use option: On
I am using this one for the custom text on the button but after you press the button the text disappears and does not come back. Anyone have any ideas how I can get the text to stay after selected?
Reply With Quote
  #20  
Old 04-22-2008, 09:06 AM
gibigbig gibigbig is offline
 
Join Date: Jul 2007
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works nicely
i customized it for my site
Reply With Quote
  #21  
Old 05-05-2008, 06:45 PM
Coldhands's Avatar
Coldhands Coldhands is offline
 
Join Date: Oct 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found a bug!


Spoilers can be used to lure people to phishing sites.

Allow me to demonstrate:

If you have spoilers on your forum, post this and click on the spoiler.

PHP Code:
[B]Ohhh WowsCheck this out yous guys!!1[/B]
[
spoiler]Okaynow click it and watch [URL="http://www.vbulletin.org.forum.google.com/omgwhatisurpword"][COLOR=Black][spoiler]j/k! :)[/spoiler][/COLOR][/URL][/spoiler

Any suggestions on how to fix this lil bug?
Reply With Quote
Reply


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. The time now is 08:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04528 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete