vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   New Posting Features - bbSpoiler (https://vborg.vbsupport.ru/showthread.php?t=112376)

hambil 04-06-2006 10:00 PM

bbSpoiler
 
Keywords: bbcode, hidden, spoiler

Description:
A simple but effective [spoiler] bbcode. All the ones I've seen so far fall short for some minor reason or another - so I've created my own :)

Features:
  • Hides/Unhides with cross browser javascript (tested with latest IE and Firefox)
  • No template edits or file edits required.
  • Uses the colors of the current style.
  • Spoiler text does not show in thread preview.
Install
  • Download the bbSpoiler_1.0.zip file.
  • Follow instructions in install.txt

Silvio 04-07-2006 08:24 AM

*Installed

ty man! :banana:

*oooppss! 1st post

ciao!

Shack Networks 04-07-2006 08:49 AM

Cheers Hambil, I spent the best part of my life trying to avoid the answer to who shot JR and you go and spoil it in one foul swoop with a screenshot lol.

Nice hack and I will be adding it as soon as I sort my site out, Ive just tested on my dev site and it works fine.

H

hambil 04-07-2006 09:41 AM

Fixed a bug that caused some forum threads to display funcky in forum view. Grab the latest zip. Since there's only one install so far, I only screwed up one person. I'll try harder next time :)

Shack Networks 04-07-2006 09:48 AM

2 Installs now m8

Thanks for the update.

hambil 04-07-2006 09:58 AM

Ah crap, I broke the thread-preview in my last upload. My only excuse is that it's 4am here. All fixed now, but you may need to download again.

Snake 04-07-2006 07:44 PM

Thanks man, works just fine!

VViper 04-07-2006 10:04 PM

Very good, thankyou for sharing,
i noticed in the install.txt

The image path is .images

I put it into forum/images

the path then was just images/spoiler with no full stop

Hope that helps someone else out.
Thanks again for the hack.

Kihon Kata 05-03-2006 04:33 PM

Hambil,

Awesome hack!!! installed onmy 3.5.4! One problem, it doesn't work LOL Tried Firefox/IE and nothin'

The click to show spoiler table shows up, but it won't click down to show the spoiled text. Any ideas?

hambil 05-03-2006 04:45 PM

Quote:

Originally Posted by Kihon Kata
Hambil,

Awesome hack!!! installed onmy 3.5.4! One problem, it doesn't work LOL Tried Firefox/IE and nothin'

The click to show spoiler table shows up, but it won't click down to show the spoiled text. Any ideas?

The only reason I can think of that it wouldn't work is if you don't have "headinclude" in your SHOWTHREAD template - do to another hack, or some custom style.

Kihon Kata 05-03-2006 05:01 PM

check it out

Quote:

Originally Posted by hambil
The only reason I can think of that it wouldn't work is if you don't have "headinclude" in your SHOWTHREAD template - do to another hack, or some custom style.


hambil 05-03-2006 05:03 PM

Hmmm...

Can you show me your bbcode for the spoiler tag?

Kihon Kata 05-03-2006 05:05 PM

sure...

Code:

<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">&nbsp;<b>click to show</b></div><div id="idSpoiler" style="display: none;">{param}</div></div>
and

Code:

[spoiler]The butler did it![/spoiler]
is that what you mean?



Quote:

Originally Posted by hambil
Hmmm...

Can you show me your bbcode for the spoiler tag?


hambil 05-03-2006 05:23 PM

It looks like the replace isn't working for some reason. Try taking the javascript and editing into the SHOWTHREAD template.

add after "headinclude"
Code:

                <script language='JavaScript' type='text/javascript'>
                <!--
                        function spoiler(obj)
                        {
                                  for (var i = 0; i < obj.childNodes.length; i++)
                                  {
                                            if (obj.childNodes[i].id == 'idTitle')
                                                    titleRow = obj.childNodes[i];
                                    if (obj.childNodes[i].id == 'idSpoiler')
                                    {
                                            if (obj.childNodes[i].style.display != 'none')
                                            {
                                                    obj.childNodes[i].style.display = 'none';
                                                    titleRow.innerHTML = '&nbsp;<b>click to show</b>';
                                            }
                                            else
                                            {
                                                    obj.childNodes[i].style.display = 'block';
                                                    titleRow.innerHTML = '&nbsp;<b>click to hide</b>';
                                            }
                                    }
                                }
                        }
                //-->
                </script>


Kihon Kata 05-03-2006 05:28 PM

Yep that worked. Does that slow the showthread down? We have many users that will probably NOT use this feature

hambil 05-03-2006 05:29 PM

No. It's just javascript. It's only called when spoiler 'show/hide' button is clicked.

Kihon Kata 05-03-2006 05:31 PM

cool! We'll use this for our movie review forum

Kihon Kata 05-05-2006 02:05 AM

Hambil! Reporting a problem that I found! :) or I mean :(

When you hover over threads' titles in forumdisplay, showthread, today's posts, new posts, the little popup for the thread preview text is now dead and is NOT working. I disable the product and they work. Looks like the spoiler tags are breaking the tooltips.

Remember, I'm the one that had to manually put the javascript into showthread. (I think that is where I had to put it)

Any ideas?

zombie_rem 05-05-2006 05:01 AM

Quote:

Originally Posted by hambil
It looks like the replace isn't working for some reason. Try taking the javascript and editing into the SHOWTHREAD template.

add after "headinclude"
Code:

                <script language='JavaScript' type='text/javascript'>
                <!--
                        function spoiler(obj)
                        {
                                  for (var i = 0; i < obj.childNodes.length; i++)
                                  {
                                            if (obj.childNodes[i].id == 'idTitle')
                                                    titleRow = obj.childNodes[i];
                                    if (obj.childNodes[i].id == 'idSpoiler')
                                    {
                                            if (obj.childNodes[i].style.display != 'none')
                                            {
                                                    obj.childNodes[i].style.display = 'none';
                                                    titleRow.innerHTML = '&nbsp;<b>click to show</b>';
                                            }
                                            else
                                            {
                                                    obj.childNodes[i].style.display = 'block';
                                                    titleRow.innerHTML = '&nbsp;<b>click to hide</b>';
                                            }
                                    }
                                }
                        }
                //-->
                </script>



I was having the same problem with the "Click to Show" not working.... but i cant find where to add the script.. i cant find "headinclude" anywhere..:cry:

hambil 05-05-2006 06:10 AM

Post your FORUMHOME template.

TTG 05-05-2006 08:31 AM

Been using this for some time now .. simply add it as a new BB code :-

HTML Code:

<div class="spoiler"> <input type="button" class="button" onClick="this.nextSibling.nextSibling.style.display='block';this.parentNode.removeChild(this);" value="Show spoiler"> <span class="content" style="display:none">Spoilertext</span> </div>
Produces a single click button.

Kihon Kata 05-05-2006 12:42 PM

Quote:

Originally Posted by hambil
Post your FORUMHOME template.

who you talkin' to Hambil? please use the quote option so we know. :)

zombie_rem 05-06-2006 02:47 PM

Quote:

Originally Posted by TTG
Been using this for some time now .. simply add it as a new BB code :-

HTML Code:

<div class="spoiler"> <input type="button" class="button" onClick="this.nextSibling.nextSibling.style.display='block';this.parentNode.removeChild(this);" value="Show spoiler"> <span class="content" style="display:none">Spoilertext</span> </div>
Produces a single click button.


I used that, and the button works, but all it shows is "Spoilertext" and not what i typed.

hambil 05-06-2006 03:52 PM

Quote:

Originally Posted by zombie_rem
I was having the same problem with the "Click to Show" not working.... but i cant find where to add the script.. i cant find "headinclude" anywhere..:cry:

Post your FORUMHOME template.

hambil 05-06-2006 03:53 PM

Quote:

Originally Posted by Kihon Kata
Hambil! Reporting a problem that I found! :) or I mean :(

When you hover over threads' titles in forumdisplay, showthread, today's posts, new posts, the little popup for the thread preview text is now dead and is NOT working. I disable the product and they work. Looks like the spoiler tags are breaking the tooltips.

Remember, I'm the one that had to manually put the javascript into showthread. (I think that is where I had to put it)

Any ideas?

I've been sick for a couple days. I'm looking at this now.

Kihon Kata 05-06-2006 08:18 PM

Quote:

Originally Posted by hambil
I've been sick for a couple days. I'm looking at this now.

Great. Thanks. Oh I have been deathly ill also. Fever/throat :(

zombie_rem 05-07-2006 07:33 AM

Quote:

Originally Posted by hambil
Post your FORUMHOME template.


I found it. I clicked the wrong file. :speechless:

But it still doesn't work.

da420 05-10-2006 06:02 AM

Quote:

Originally Posted by Kihon Kata
Hambil! Reporting a problem that I found! :) or I mean :(

When you hover over threads' titles in forumdisplay, showthread, today's posts, new posts, the little popup for the thread preview text is now dead and is NOT working. I disable the product and they work. Looks like the spoiler tags are breaking the tooltips.

Remember, I'm the one that had to manually put the javascript into showthread. (I think that is where I had to put it)

Any ideas?


Great hack, but am having this same problem. I have to disable it until a fix was released.

Thanks for the hack, and can't wait to see this fixed.

hambil 05-10-2006 03:51 PM

Quote:

Originally Posted by da420
Great hack, but am having this same problem. I have to disable it until a fix was released.

Thanks for the hack, and can't wait to see this fixed.

Hmmm. All it does is modify the tooltip. Are you using any other hacks, like improved thread preview?

da420 05-10-2006 07:15 PM

Quote:

Originally Posted by hambil
Hmmm. All it does is modify the tooltip. Are you using any other hacks, like improved thread preview?

Nope not improved thread preview, I disable your hack and it comes back no problems. Love this hack, but can't use it until that is fixed.

hambil 05-10-2006 07:53 PM

Okay, I made a patch that should get the tooltips to show again. However, the spoilers will show in thread preview. This only effects the few of you who have this problem. Everyone else should notice no difference and doesn't need to update.

I'll need access to one of the boards of the people having this problem to figure it out further.

cavyspirit 05-10-2006 09:28 PM

This would be good as a warning for graphic content/photos.

da420 05-10-2006 11:03 PM

Quote:

Originally Posted by hambil
Okay, I made a patch that should get the tooltips to show again. However, the spoilers will show in thread preview. This only effects the few of you who have this problem. Everyone else should notice no difference and doesn't need to update.

I'll need access to one of the boards of the people having this problem to figure it out further.

Works flawlessly so far! Thanks for the hack man!! This is super!

Kihon Kata 05-11-2006 03:08 AM

Quote:

Originally Posted by hambil
Okay, I made a patch that should get the tooltips to show again. However, the spoilers will show in thread preview. This only effects the few of you who have this problem. Everyone else should notice no difference and doesn't need to update.

I'll need access to one of the boards of the people having this problem to figure it out further.

Thanks Bill for this patch.

I have a few questions:
I see that it has the same version number, is this right?
How do we install this, import product with overwrite...or uinstall first?
Do we have to delete and re-add the bbcode?

hambil 05-11-2006 09:43 AM

Quote:

Originally Posted by Kihon Kata
Thanks Bill for this patch.

I have a few questions:
I see that it has the same version number, is this right?
How do we install this, import product with overwrite...or uinstall first?
Do we have to delete and re-add the bbcode?

Just import product with overwrite. I didn't change the version # because it's a very tiny change. I've got a couple more changes coming up and it will likely get put in with those as version 1.1.

wdlove 05-11-2006 09:11 PM

Is there anyway to make it looks nice like the other spoiler hacks?

Something like this one? https://vborg.vbsupport.ru/showthrea...hlight=spoiler

I think that one looks great, but doesn't function as good as this one.

hambil 05-11-2006 11:05 PM

Quote:

Originally Posted by wdlove
Is there anyway to make it looks nice like the other spoiler hacks?

Something like this one? https://vborg.vbsupport.ru/showthrea...hlight=spoiler

I think that one looks great, but doesn't function as good as this one.

It's all exposed in the spoiler bbcode. I'm not a designer, but if someone wants to make it look better I'm all for it.

Olli460 05-16-2006 01:11 AM

Great job man. This spoiler is really simple and a good one to use too.

obmob 06-19-2006 05:04 PM

Oh, seems to be the most simple spoiler tag out there... i'll test it, thanks.

Zelos 08-09-2006 11:31 PM

Any chance this works for 3.6?


All times are GMT. The time now is 02:45 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.01529 seconds
  • Memory Usage 1,846KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_html_printable
  • (17)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