vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Spoiler search fix (https://vborg.vbsupport.ru/showthread.php?t=97728)

El_Muerte 10-05-2005 10:00 PM

Spoiler search fix
 
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)

https://vborg.vbsupport.ru/attachmen...id=35361&stc=1

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:
https://vborg.vbsupport.ru/attachmen...id=35362&stc=1
Live demo of this spoiler tag

Nutz 10-06-2005 05:25 PM

Very nice.

Thanks,
Mat

fly 10-07-2005 04:48 PM

Does this also include the [spoiler] code itself for threads? I need that too...

edit: It doesn't. Can that be added or can you not do replacement stuff in plugins/products?

Blam Forumz 10-07-2005 05:24 PM

Yes, please include the spoiler tag code

El_Muerte 10-07-2005 09:29 PM

vbcodes can't be included in products (well, not easily)

all you've got to do is create a new vbcode with the tag name "spoiler" and use the replacement HTML I posted above.

wolfyman 10-08-2005 03:57 PM

very nice, thanks :)

MetalAges 11-01-2005 08:58 PM

Just a quick question. Say a guy has a 5meg video clip in his spoiler tag...will it only load if someone clicks to "show" ?

El_Muerte 11-02-2005 04:26 AM

Quote:

Originally Posted by MetalAges
Just a quick question. Say a guy has a 5meg video clip in his spoiler tag...will it only load if someone clicks to "show" ?

I doubt it. It's up to the plugin and browser settings I guess.

Pvtiste 11-30-2005 11:35 AM

very nice ! thx

aciurczak 11-30-2005 05:52 PM

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?

El_Muerte 12-01-2005 06:37 AM

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.

shovel 12-01-2005 12:26 PM

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.

Kwikms 12-16-2005 04:47 PM

Very nice. How about another button? After you clicked "show spoiler" you will see "hide spoiler" and you can hide it again ^^.

fly 12-19-2005 11:26 AM

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>


PET 12-21-2005 10:41 AM

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.

Fofer 01-09-2006 03:58 AM

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?

cclaerhout 01-09-2006 08:48 AM

Thank you ! Great bbcode.

Nigh7mar3 02-05-2006 10:44 AM

No one have a cool button to insert spoiler code?

Thanks nice mod

cerebro 02-24-2006 01:35 PM

Thanks, works fine in explorer and firefox


All times are GMT. The time now is 04:52 PM.

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.02453 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete