vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Creating a Hide/Show (Spoiler) Feature (https://vborg.vbsupport.ru/showthread.php?t=97691)

OrangeFlea 10-06-2005 01:51 AM

Creating a Hide/Show (Spoiler) Feature
 
As shown in this person's signature:

http://boards1.wizards.com/showpost....00&postcount=1

How does one make it look exactly like that?

Blindchild02 10-06-2005 02:22 AM

yeah thats pretty nice.

OrangeFlea 10-06-2005 08:52 PM

Bump.

Come on. Will no one even attempt this?

Oblivion Knight 10-06-2005 09:39 PM

I may look in to this one later if nobody else does.. :)

Paul M 10-06-2005 09:55 PM

Just view the source .........

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;">

HIDDEN TEXT HERE

</div>

</div>

</div>


Funchiestz 10-06-2005 10:19 PM

can u teach me how to implement that one in my 3.5 ?

utw-Mephisto 10-06-2005 10:40 PM

gimme 5 minutes ... can be done by bbcode ...one sec

Go to your BBCode Manager :

with these settings :

http://ut2007world.com/images/bb.jpg

As replacement code you can use the one Paul posted instead of HIDDEN TEXT HERE, you use {param}.

Preview should be then :

http://ut2007world.com/images/bb2.jpg

Of course you can use anything, you don't have to call it spoiler2

and since bbcode can be used in signatures, you'll get that result

Chris M 10-06-2005 10:51 PM

Very nice spoiler code :)

Chris

utw-Mephisto 10-06-2005 10:58 PM

Another spoiler code would be

http://img246.imageshack.us/img246/9062/16tw.jpg

And when you mouseover :

http://img246.imageshack.us/img246/6361/28hn.jpg

Settings :

http://img246.imageshack.us/img246/9435/untitled1xd.jpg

COBRAws 10-07-2005 01:10 AM

There's a spoiler hack just released: https://vborg.vbsupport.ru/showthrea...threadid=97728

At least its something

PamelaE 10-14-2005 06:10 PM

I have to say the hide/show button is much more sophisticated than the usual outdated highlighted text approach.

I think its great. Thanks for shareing this, I have just implemented it.

Thanks :)

Alviker 01-08-2006 05:18 PM

Quote:

Originally Posted by Paul M
Just view the source .........

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;">

HIDDEN TEXT HERE

</div>

</div>

</div>


Don't run in my vB 3.5.1!!! :( :( Help please!!! :( :( How Can I add totally this BBCode??? Sorry for my bad english :( :(. Help please. Very thanks.

Atte. Alviker

simalert 01-20-2006 05:31 PM

Quote:

Originally Posted by Alviker
Don't run in my vB 3.5.1!!! :( :( Help please!!! :( :( How Can I add totally this BBCode??? Sorry for my bad english :( :(. Help please. Very thanks.

Atte. Alviker

It works great for me, I have the following

TITLE : Hide

TAG : hide

REPLACEMENT :

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

<div class="smallfont" style="margin-bottom:2px"><b>{option}:</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('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[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>


Example : [hide=Spoiler]Simalert.com is the best[/hide]

Description : Allows you to hide text until someone presses the button.

Ideal for large code or spoilers.

USE OPTION : Yes



I added {option} in there so you can specify the title.

To use this you type [hide=TITLE HERE] TEXT HERE [/hide]

It works great on my 3.5.3 board (still getting ready to switch to it from PHPBB)

Cutulus 02-16-2006 05:21 PM

Right now your current code has it say --> {option}:
When they use the script tags. What if I wanted to do [script=$$] How would you change the code to show $$?

yumyumcat 02-23-2006 05:16 PM

What if you want to just use this in posts and not your signature?

How do you install it? Help! I really would love this for my Board :D
Thanks in advance.

I just installed this, made a button for my Board and thought I had it figured out, but it's not working ~ :(

Someone out there that can advise?

Cutulus 02-24-2006 03:26 PM

If you use simalert's instructions it should work out just fine. Verify that you it installed as they posted first. If you do not want it used in the signatures you can just use a usergroup's Signature permissions to not allow it.

Just to make sure you know where to put it...
Admin panel
BBcode Manager
Click the Add new BB code

yumyumcat 02-24-2006 06:12 PM

I did that hon ~ and it's working, but only if I modify it when I post ~ see it shows it's supposed to work in my admin panel, but when I go to use it on my Board it looks totally different!

Check this out: http://www.thecatarena.com/forum/sho...236#post168236
Now, this is how it looks when I press my spoiler button
I'm going to put spaces in the code here cause on my board I can't show the code to others without doing this *beats me*!

[ hide= "this is wrong" ] [ / hide ]

now all I have to do to correct it while posting, which is a pain in the arse is this:

[ hide= Spoiler ] this is correct [ / hide]

see? It's really strange! I didn't modify anything that Simalert posted

How do I get that to include SPOILER close it up and not use the quotation marks as well as that other tag closure on the comment?~

Oh, and it works in my admin panel, but not on the Board! Now that's Weird!

Cutulus 02-27-2006 04:09 PM

Try leaving out the =**** in the code and see if that works. I was having the same problem and we are looking for the same thing here.
What you currently get:
Spoiler: Show

What you want:
Look at my cat: Show

This is what I am looking for, and by the code you list that is what it looks like you want also.

yumyumcat 02-27-2006 07:14 PM

Quote:

Originally Posted by Cutulus
Try leaving out the =**** in the code and see if that works. I was having the same problem and we are looking for the same thing here.
What you currently get:
Spoiler: Show

What you want:
Look at my cat: Show

This is what I am looking for, and by the code you list that is what it looks like you want also.

Thanks Cutulus and I'll let ya know how it goes! :D


All times are GMT. The time now is 02:57 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.01145 seconds
  • Memory Usage 1,764KB
  • 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
  • (3)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