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

Reply
 
Thread Tools
Spoiler search fix Details »»
Spoiler search fix
Version: 1.0, by El_Muerte El_Muerte is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-05-2005 Last Update: Never Installs: 52
Uses Plugins
 
No support by the author.

Quite some forums have a [spoiler] tag to remove content until the user requests it. However, when searching the forum the content within the spoiler will be visible (when results are shown as posts).
This plugin will remove the content of the spoiler with the text " [[spoiler removed]]" (you can change the phrase through the phrase manager, id: spoilerfix_replacement)



And as extra, this is the replacement HTML I use for the spoiler tag on my forum:
HTML Code:
<small><b>Spoiler:</b></small><br />
<div style="border: 1px dashed gray; padding: 1px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">show spoiler</button></div><div id="spoiler" style="display: none;">{param}</div></div>
It will look like this:

Live demo of this spoiler tag

Show Your Support

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

Comments
  #12  
Old 12-01-2005, 06:37 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by aciurczak
This is nice (and needed), but folks can still see the spoiler contents with the mouseover preview ( tooltips ). I don't want to disable those previews; is there any way to blank the content within the spoiler tag from being shown in those?
I checked it out and there is no way to fix the thread previews
There's no way to hook into the processing before the vbtags are removed.
Reply With Quote
  #13  
Old 12-01-2005, 12:26 PM
shovel's Avatar
shovel shovel is offline
 
Join Date: Mar 2002
Location: South Carolina, US
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I personally like the text link instead of the button link. Just do an <a> and use an onClick parameter to send info to the nodes.
Reply With Quote
  #14  
Old 12-16-2005, 04:47 PM
Kwikms Kwikms is offline
 
Join Date: Jul 2004
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice. How about another button? After you clicked "show spoiler" you will see "hide spoiler" and you can hide it again ^^.
Reply With Quote
  #15  
Old 12-19-2005, 11:26 AM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kwikms
Very nice. How about another button? After you clicked "show spoiler" you will see "hide spoiler" and you can hide it again ^^.
This is what I use for that

HTML Code:
<div style="margin:5px 20px 20px 20px">

<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> 

<input type="button" value="Show" style="width:45px;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 class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">

<div style="display: none;">

{param}

</div>

</div>

</div>
Reply With Quote
  #16  
Old 12-21-2005, 10:41 AM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok,
i used SPOILER in my old forum. But now on 3.5.2 he dosn't want to work ? Any ideea ? I don't really understand what this hack do.

EDIT: Actualy, if I create a new spoiler he works. But old spoilers don't want to work. I just see the button, click it and...nothing.
Reply With Quote
  #17  
Old 01-09-2006, 03:58 AM
Fofer Fofer is offline
 
Join Date: Aug 2005
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by flypaper
This is what I use for that

HTML Code:
<div style="margin:5px 20px 20px 20px">

<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> 

<input type="button" value="Show" style="width:45px;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 class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">

<div style="display: none;">

{param}

</div>

</div>

</div>

Okay, that is just WAY cool. It's clean and perfect and my users love it! Thanks.

I love how the button says "Show" when the text is hidden ... and "Hide" when the text is showing. However, this doesn't work on Safari (for Mac.) Any workaround?
Reply With Quote
  #18  
Old 01-09-2006, 08:48 AM
cclaerhout's Avatar
cclaerhout cclaerhout is offline
 
Join Date: Aug 2004
Location: Paris (France)
Posts: 448
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you ! Great bbcode.
Reply With Quote
  #19  
Old 02-05-2006, 10:44 AM
Nigh7mar3 Nigh7mar3 is offline
 
Join Date: Nov 2005
Location: Roma
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one have a cool button to insert spoiler code?

Thanks nice mod
Reply With Quote
  #20  
Old 02-24-2006, 01:35 PM
cerebro's Avatar
cerebro cerebro is offline
 
Join Date: Dec 2001
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, works fine in explorer and firefox
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 12:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04924 seconds
  • Memory Usage 2,302KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_html
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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