vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   BB Code Enhancements - Spoiler BB Code with Show/Hide Button (https://vborg.vbsupport.ru/showthread.php?t=184855)

Deadly Stream 07-08-2008 10:00 PM

Spoiler BB Code with Show/Hide Button
 
Due to this I have decided to leave the vBulletin community and no longer wish to have my work associated with it.

Apologies to those who use this work.

Q-v-n-s-Q 07-09-2008 08:02 PM

not bad, another bbcode tag??, thank you for the mod

Karri 07-09-2008 09:24 PM

Um.... Did you "decided to make [your] own" or did you lift this bb code off my forum (which happens to be well established and the same subject as yours) and pass it off as your own work? The code you posted is identical to the BB Code on my site.

Charlie98902 07-09-2008 11:36 PM

Sorry to hear it is identical code but is there a screen shot of it hidden and unhidden? I have been looking for something like this.

sava700 07-10-2008 01:06 AM

Ok, i've got a code similar to this for my youtube wraps but I've got a button to add the code around the text I highlight.....is there a button for this to use other than typing [spoiler] etc around the text?

pab 07-10-2008 09:20 PM

For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).

What am I doing wrong?

sava700 07-10-2008 11:57 PM

Quote:

Originally Posted by pab (Post 1572290)
For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).

What am I doing wrong?

nothing, I have the same problem with it too.... something is missing or whatever from the code.

Suggestions to fix and suggestions to my question earlier please?

Tulsa 07-11-2008 12:27 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=110598" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=110598</a>

Works perfectly on 7.2 and I've been using this one since 3.5

KatieG 07-11-2008 05:51 AM

Quote:

Originally Posted by Tulsa (Post 1572400)
https://vborg.vbsupport.ru/showthread.php?t=110598

Works perfectly on 7.2 and I've been using this one since 3.5


Me also

cclaerhout 07-11-2008 07:46 AM

This kind of code had already been posted a long time ago on vbulletin.com ^^

Skyrider 07-11-2008 11:46 AM

Quote:

Originally Posted by pab (Post 1572290)
For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).

What am I doing wrong?

Same for me, and I'm using 3.7.1

agitated 07-11-2008 06:23 PM

find:
Code:

<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> Hide Text </div> </div> </div>

replace with:

Code:

<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;">{param}</div> </div> </div>
or replace Hide Text with {param}

HTH

Zacarias 07-11-2008 10:26 PM

Works like a charm with agitated's edit. :D

agitated 07-12-2008 09:58 AM

Quote:

Originally Posted by Karri (Post 1571406)
Um.... Did you "decided to make [your] own" or did you lift this bb code off my forum (which happens to be well established and the same subject as yours) and pass it off as your own work? The code you posted is identical to the BB Code on my site.

It would appear as if that may be true Karri.
Certainly is one reason why {param} is missing as it would not show on the page source.

students_forum 09-22-2008 06:48 PM

this won't work for firefox 3, am I the only to realise?

Seshat Diva 12-31-2008 04:55 PM

Easy to follow, successfully installed.

My members will enjoy having this feature.

Thanks so much for creating easy to follow steps!

Vaupell 12-31-2008 09:51 PM

tx for the fix,, the param at the end needs to be closed to work missing a } at the end of param. else works fine,

marked installed

VargTimmen 01-04-2009 01:58 PM

This is the fixed replacement code:
HTML Code:

<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px"> <u>Spoiler</u>: <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>

giankar 01-13-2009 04:46 PM

Can I hide spoiler content from being viewed by visitors?

JαρŘα?σoζ 11-06-2009 03:10 AM

Nice modification...
Anyway, how about if I want to add a custom header?

The code:
Quote:

[spoiler="Test"]1 2 3[/spoiler]
The result:
Quote:

Spoiler for Test:
<--The Text-->
Can anyone help me with this? Thanks...

JαρŘα?σoζ 11-06-2009 03:17 AM

Quote:

Originally Posted by JαρŘα?σoζ (Post 1910838)
Nice modification...
Anyway, how about if I want to add a custom header?

The code:
Quote:

[spoiler="Test"]1 2 3[/spoiler]
The result:
Quote:

Spoiler for Test:
<--The Text-->
Can anyone help me with this? Thanks...

Got it !!!

HTML Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b> for <i>{option}</i>: <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>


Gator Bite 12-08-2009 11:56 PM

Just installed this. It works just the way I was hoping.

Your code is missing the closing } after "{Param". Just a heads up.

Nook_Neformat 03-21-2010 11:06 PM

anyone knows how to make spoiler work with rss?


All times are GMT. The time now is 12:41 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.05516 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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