vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   spoiler tags? (https://vborg.vbsupport.ru/showthread.php?t=71847)

9mmPrincess 11-17-2004 12:14 AM

spoiler tags?
 
like they have here: http://forums.televisionwithoutpity....=3111875&st=45

if you scroll down and read the page a bit you'll see bits of texted that are blacked out-but if you use your mouse to highlight them, it suddenly becomes readable. is there any kind of mod/hack that would do that for vb3?

Michael Morris 11-17-2004 12:28 AM

First off, this isn't the forum for this. second, it's a fairly simple bb tag you can make

<span style="color=#000000; background=#000000;">{param}</span>

Brad 11-17-2004 12:40 AM

Moved to Modification Requests forum.

sabret00the 11-17-2004 09:32 PM

the best spoiler tags i've seen are on the animesuki forums

Koutaru 11-20-2004 08:51 PM

How is their's different?

sabret00the 11-21-2004 01:50 PM

check this out: http://forums.animesuki.com/showpost...5&postcount=44

and then they got the ability to have [spoiler=blah blah] check it here: http://forums.animesuki.com/showpost...0&postcount=47

it's a marvelous spoiler tag.

Natch 11-21-2004 08:53 PM

Bear with me:

[high]* Natch heads to his forum for this BBcode...
[/high]
OK: I'm back :D

That animesuki forum is using this BBcode: I think I found it on vbt, or here, some somewhere ...
Spolier BBcodes
Name: Spoiler Tags
Tag: spoiler
Replacement:
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>

Example: [spoiler]Darth Vader is Luke Skywalker's Father[/spoiler]

Simple as that :D it's a ver' sexy DOM manipulation, and it's pretty bulletproof...

Code Monkey 11-21-2004 10:13 PM

That's pretty cool. I did have a problem with it though. When I used preview post, the submit post button no longer worked. :( Looks like a form conflict.

sabret00the 11-21-2004 10:36 PM

works perfectly, anyway to get it to work with and without the {option} mine only works one way or the other :(

just encountered that bug but it took alot for me to ge there, but it's there :(

Natch 11-21-2004 11:21 PM

Above is edited with the bug fixed: I had not noticed that bug before... the form tags are not required for htis to work...

Natch 11-21-2004 11:24 PM

Quote:

Originally Posted by sabret00the
works perfectly, anyway to get it to work with and without the {option} mine only works one way or the other :(

just encountered that bug but it took alot for me to ge there, but it's there :(

How or when would you use the option tag, sabe?

EDIT: just re-read your post... I'll have a crack at it...

Natch 11-21-2004 11:36 PM

I think that maybe you have to have two tags? one with option on, and one with it off?

It's wierd that it won't behave just like other tags in that way?

sabret00the 11-22-2004 12:23 AM

is a shame, i'm wondering if they hardcoded it also? maybe might be the way to fix it, i'll look at the include bbcode file see what i come up with :)

Michael Morris 11-22-2004 12:48 AM

This is kinda neat - I'll give it a trial run see how the users react.

Code Monkey 11-22-2004 04:13 AM

Then there is this one.

Freezerator 11-22-2004 05:59 AM

This is the one i use :

Spoiler
[spoiler]Your message in a message text here[/spoiler]

<center><table width="80%"><TR><TD bgcolor="#FFFFFF"><font color="black" size="1">Spoiler: (select this text to read it)</font><br><font color="#FFFFFF" size="2"><blockquote>Your message in a message text here</blockquote></font></td></TR></TABLE></center>

Spoiler: (select this text to read it)

Your message in a message text here

N/A [Edit] [Delete]

Code Monkey 11-23-2004 08:46 PM

I've played with the code a bit. I think this looks nicer than having an empty box. Plus it has less divs.

Code:

    <div>
        <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')[2].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')[2].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler'; }" />

        <div id="spoiler" style="display: none;margin: 0px; padding: 6px; border: 1px inset;width:560px">
          {param}
        </div>

        <div style="display:block; font-style:italic;font-size:x-small;">
            Click the "Show Spoiler" Button to reveal hidden text.
        </div>
    </div>


sabret00the 11-29-2004 07:10 AM

Quote:

Originally Posted by sabret00the
is a shame, i'm wondering if they hardcoded it also? maybe might be the way to fix it, i'll look at the include bbcode file see what i come up with :)

hardcoded it, if anyones interested in it, then let me know and i'll release it :)

Gaim Mastr 12-24-2004 04:18 PM

Thanks for the animesuki used spoiler code, Natch !!

It's the best one I've ever seen; and I've implemented it onto the 3DGamers.com forums just now. :up:

Sin City 02-19-2005 08:49 AM

thanks for sharing the code Natch... best spoiler code i have seen yet

Die2Night 08-30-2006 12:05 PM

I was looking for something likw this ....installed

R1lover 09-18-2006 03:21 AM

Sweet,very nice, but if there are two in the same post it causes an issue.

Example:

Quoting someone who used the spoiler code and then you using it too.

it would look like this.

Quote:

Quote:

Originally Posted by R1LOVER (Post 312287)
Sweet Rinn, [spoiler]I also changed the style a bit... I like this better[/spoiler]


123456789

[spoiler]test double quote[/spoiler]
Here is what I used because it will work with multiple tags in one post.

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:45;font-size:10px;margin:0px;padding:0px; height:21" 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: 0px; border: 0px inset;">
                <div style="display: none;">
                {param}
                </div>
        </div>
</div>


rowlandc 02-06-2007 12:09 PM

I'm not very experianced with the codes yet. Could someone please tell me where I'm supposed to add this code to get it to work.

Thank You

dahdoh 02-06-2007 12:51 PM

so i wanna it without viewing the hide icon after i press on

how can i make it like that i wanna olny 1 button ?(show)

rowlandc 02-09-2007 10:17 AM

Sorry I thought I had done it but then i realized it was the wrong thing. Could someone please tell me where I should put this code to get it to work.

Thank You

Cyricx 02-09-2007 12:42 PM

Go to your Admincp -> Custom BB Codes -> Add New BBCode

Then follow Natches instructions above to fill out for the various fields :)

rowlandc 02-12-2007 10:09 AM

I've found this code in a source code on www.narutofan.com:

What would I have to change so I can use it?

Quote:

<div style="margin:20px; margin-top:5px">
<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('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>


<div style="display: none;">
Its pretty much Hannibal having a tragic past in WWII against the Nazis. A tale about his love for his baby sister, revenge against those that killed her through cannibalism. His early methods of killing, taste for human flesh, his early days of interest in the human body as a student. With a sprinkle of Japanese background taught by his aunt. He goes revenge ninja style on one guy.
</div>
</div>
</div></div>
The source code come from http://forums.narutofan.com/showthre...50#post6980150


All times are GMT. The time now is 01:56 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.01125 seconds
  • Memory Usage 1,796KB
  • 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_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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