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)

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...


All times are GMT. The time now is 10:15 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.01222 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete