vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - Spoiler Tag (https://vborg.vbsupport.ru/showthread.php?t=243384)

ChopSuey 05-26-2010 10:00 PM

Spoiler Tag
 
1 Attachment(s)
Title: Spoiler Tag

BBCode Tag Name: spoiler

Replacement:
HTML Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right> 
<input type="button" value="Show Spoiler" style="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]testing testing[/spoiler]

Descpription: Hide large images or just text.

Set all options to NO (If any options have yes selected, it will not work. Enjoy!

---------------------------------------------------------------------------------------------------------------------
It at first says, "Show Spoiler" - "Hide" - After clicking it just says "Show"

Boofo 05-27-2010 08:57 AM

Any pics of this in action, both open and closed?

sulasno 05-27-2010 09:19 AM

tagged and thanks

edit

untag and installed

ChopSuey 05-27-2010 03:03 PM

I'll post up pics later.

ChopSuey 05-27-2010 06:25 PM

We have discussed it in PM already. You and some other anonymous person are accusing me of stealing code, which myself would never do.

Bigj85 05-27-2010 06:35 PM

your code

Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right> 
<input type="button" value="Show Spoiler" style="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>


code from this spoiler https://vborg.vbsupport.ru/showthrea...hlight=spoiler

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>


a tiny difference in the style is all I see
Code:

<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right>
I'm just saying :rolleyes:

ChopSuey 05-28-2010 04:14 AM

I didn't edit out my first post to change it. Told you already i have talked to the person who made the "other" code.

hqlman 05-30-2010 03:49 PM

Says show spoiler even after opening the spoiler, somethings not right in the code

210665 05-30-2010 07:40 PM

Quote:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right>
<input type="button" value="Show Spoiler" style="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>
how can I center on this product

ChopSuey 06-01-2010 03:45 AM

I will update the code....sorry.

ChopSuey 06-01-2010 04:01 AM

Code updated, have all options set to NO!

Example in a thread http://forum.vbdiscussions.com/showthread.php?t=7701

http://forum.vbdiscussions.com/showthread.php?t=8262

http://www.urbanreply.com/showthread.php?t=3272

Works perfect! Just make sure any options are set to no.

hqlman 06-01-2010 09:39 AM

The last URL you gave still has the same problem, when you click the button to show spoiler, shouldnt the text change to hide spoiler? instead of still saying show spoiler :confused:

ChopSuey 06-01-2010 10:46 AM

It works fine in FF.

MRGTB 06-08-2010 10:49 PM

All you've done is copy this hack from MyBB

http://community.mybb.com/thread-703...hlight=spoiler

Compare the main code and see.

I used that hack before when I ran MyBB 1.4, so spotted this as looking the same right off. You've made a few changes that's all to suit vbulletin, but the main Spoiler Code used is exactly the same.

Your code:

Code:

<input type="button" value="$1" style="width:auto;font-size:12px;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 = '$3'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$1'; }" />
MyBB Code:

Code:

<input type="button" value="Show Spoiler" style="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'; }">

ChopSuey 06-08-2010 11:56 PM

I didn't copy it from MyBB, (i have no reason to go over there either) i don't copy things. If i we're to do that why would i even bother posting my work. Why you accusing me of such things? If thats what you think than idgaf anyways. I didn't copy it from anyone, made it long ago on my gaming site and decided to post it.

Dr.osamA 06-14-2010 01:41 AM

installed

thanxxx

Gero50 06-25-2010 07:54 AM

Worker perfect thanks a lot for the code help.

LatinoCheats 07-08-2010 01:33 PM

And how do I change the background of the Spoiler? That is, change the background where writing the occult? Thanks!

bozonessinc 08-02-2010 12:55 PM

Quote:

Originally Posted by LatinoCheats (Post 2066342)
And how do I change the background of the Spoiler? That is, change the background where writing the occult? Thanks!

Unfortunately, ChopSuey and the writer of this thread, has passed away in a suicide, there is a memorial thread in the main section.

I would assume this mod is no longer supported.

RIP ChopSuey

ndut 08-02-2010 11:50 PM

nice.. thank you

homanhtruong 08-03-2010 02:31 AM

thanks. installed

BirdOPrey5 08-07-2010 10:19 PM

Quote:

Originally Posted by LatinoCheats (Post 2066342)
And how do I change the background of the Spoiler? That is, change the background where writing the occult? Thanks!

To remove the background color delete the class="alt2" from the code.

To change to a different color add a background color to the style attribute... such as:

Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right> 
<input type="button" value="Show Spoiler" style="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 style="margin: 0px; padding: 6px; border: 1px inset; background: red;">
<div style="display: none;">
{param}
</div>
</div>
</div>

The only line changed was the second to last <div> tag... in this case from:
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
to:
<div style="margin: 0px; padding: 6px; border: 1px inset; background: red;">

PreciseDemise 08-11-2010 10:35 PM

We've been using this for some time without problem, but it has recently it has stopped working, possibly due to the latest update of vB(4.0.5)
Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color=#bb0000><b>&nbsp;</b></font></right> 
<input type="button" value="Show Spoiler" style="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>

Any advice?

BirdOPrey5 08-11-2010 11:07 PM

BB Code is just HTML, as long as {param} is there it should work in any VB version... I would try deleting the code and re-adding it, maybe something got corrupted along the way but it should work just fine.

ZEHH 08-12-2010 11:07 AM

Spoiler tag is not working in Firefox browser, any solution?

PreciseDemise 08-12-2010 01:08 PM

Quote:

Originally Posted by ZEHH (Post 2082616)
Spoiler tag is not working in Firefox browser, any solution?

So it's not just us then ...

BirdOPrey5 08-12-2010 04:16 PM

It's working fine for me in Firefox-
http://www.juot.net/forums/showpost....36&postcount=2

Does it work for you guys on my site/link?

PreciseDemise 08-13-2010 12:37 PM

Code:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working

Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\

your24hourstore 08-13-2010 04:21 PM

Quote:

Originally Posted by PreciseDemise (Post 2083203)
Code:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC
 
 
Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working
 
 
Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working

Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\

the author is no longer with us as of last month , there will be no updates to chop sueys mods as he is deceased

BirdOPrey5 08-13-2010 05:43 PM

Quote:

Originally Posted by PreciseDemise (Post 2083203)
Code:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working

Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\

1) BB Codes work exactly the same in 3.8 as 4.0
2) I have a test install of 4.0.4 and it also works fine with FF on that

Can you try it with the default style- maybe something in a custom style is conflicting

Also can you post line 1344 (and neighboring lines) from the page source that generated that error? (or whatever lines around the error the next time you go to that page).

Michlerish 08-14-2010 06:20 AM

Stopped working for me as well, I can see the spoiler (closed), but can't open it once post is submitted. Nothing happens when I click on the spoiler button.

BirdOPrey5 08-14-2010 12:53 PM

Quote:

Originally Posted by Michlerish (Post 2083574)
Stopped working for me as well, I can see the spoiler (closed), but can't open it once post is submitted. Nothing happens when I click on the spoiler button.

Is this after upgrading to 4.0.6?

ZEHH 08-14-2010 02:01 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2083703)
Is this after upgrading to 4.0.6?


Would complete the bbcode to work perfectly in Firefox?

My version is 4.0.5

BirdOPrey5 08-14-2010 02:07 PM

For me it's working fine in all browsers in 4.0.4- while I wold be surprised if upgrading to 4.0.6 breaks it, nothing with vbulletin shocks me anymore... I will try and upgrade my test install and check it.

cloferba 08-14-2010 06:34 PM

when there is more than 1 spoiler...you can see only one...and the other doesnt expand itself

BirdOPrey5 08-14-2010 06:54 PM

Quote:

Originally Posted by cloferba (Post 2083879)
when there is more than 1 spoiler...you can see only one...and the other doesnt expand itself

I'm just not having these issues... just tried a page with 3 spoilers on it in IE/FF/Chrome and they all worked fine. :confused: Are you on 4.0.6 also? I'm using 4.0.4 to test.

chocothunda 08-14-2010 07:06 PM

Where do you type that code in?

BirdOPrey5 08-14-2010 08:11 PM

Admin CP-> BB Code Manager -> Add New BB Code

Zombo 08-21-2010 09:10 AM

yeah im pretty sure upgrading to 4.0.6 breaks it,

i just upgraded and it broke.

BirdOPrey5 08-21-2010 10:37 AM

I upgraded to 4.0.6 and it's still working fine for me... I have the default style though, everything very basic.

To those have say it broke in 4.0.6 are you using the forum only or the suite? I'm testing on forum only.


All times are GMT. The time now is 02:39 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.01530 seconds
  • Memory Usage 1,841KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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