View Full Version : New Posting Features - bbSpoiler
hambil
04-06-2006, 10:00 PM
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
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
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...
<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%;"> <b>click to show</b></div><div id="idSpoiler" style="display: none;">{param}</div></div>
and
The butler did it!
is that what you mean?
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"
<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 = ' <b>click to show</b>';
}
else
{
obj.childNodes[i].style.display = 'block';
titleRow.innerHTML = ' <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
It looks like the replace isn't working for some reason. Try taking the javascript and editing into the SHOWTHREAD template.
add after "headinclude"
<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 = ' <b>click to show</b>';
}
else
{
obj.childNodes[i].style.display = 'block';
titleRow.innerHTML = ' <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.
Been using this for some time now .. simply add it as a new BB 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
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
Been using this for some time now .. simply add it as a new BB 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
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
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
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
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
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
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
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
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
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
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/showthread.php?t=113776&highlight=spoiler
I think that one looks great, but doesn't function as good as this one.
hambil
05-11-2006, 11:05 PM
Is there anyway to make it looks nice like the other spoiler hacks?
Something like this one? https://vborg.vbsupport.ru/showthread.php?t=113776&highlight=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?
hambil
08-28-2006, 01:17 AM
Any chance this works for 3.6?
I don't know. I'll test it this week.
ZombieAndy
09-07-2006, 04:02 PM
installed and working on 3.6.0 :)
R1lover
09-18-2006, 02:28 AM
I used that, and the button works, but all it shows is "Spoilertext" and not what i typed.
I have the same issue....... I like the button better but not if it doesn't work lol
an yes the text still shows up on "mouse over" in forum view.
Renae
01-03-2007, 07:35 PM
This install was extremely simple and easy. I encountered NO problems. This was great, thank you.
I was writing something about a book, realized I needed this, searched for it. Saw many, this one looked easy. Downloaded and in about 5 minutes after I decided that I needed this, I was already using it.
Great Job!
Kinneas
01-17-2007, 01:31 PM
I have the same issue....... I like the button better but not if it doesn't work lol
an yes the text still shows up on "mouse over" in forum view.
Replace "Spoilertext" with "{param}".
klinsek
02-01-2007, 01:56 PM
Ah, nice work. Thanks much. Perfect for my game guild forum.
L-Mane
02-11-2007, 04:20 PM
It works, but I got a error.
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT COUNT(*) AS `num` FROM post WHERE `userid` = 1 AND `threadid` =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number : 1064
Date : Sunday, February 11th 2007 @ 01:19:58 PM
Script : http://www.wordofsouth.com/myblock/admincp/bbcode.php?do=modify
Referrer : http://www.wordofsouth.com/myblock/admincp/index.php?do=nav
odie3
04-09-2007, 01:49 AM
hmm, kind of wanted to install this on my 3.6.5 board... guess not. :(
hambil
04-09-2007, 02:02 AM
I have it installed on my 3.6.5 with no problems.
Tact7626
04-17-2007, 12:45 AM
installed on 3.6.5. works great. just having trouble customizing it's look. like i changed the 100% widths to 80% and it doens't respond correctly. the inside div response correctly but not the outside div. it still takes up 100% of the table width. i could specify exact size but...whatever. it's all aesthetics.
great spoiler. thanks.
edit: ok i figured it out. i noticed you placed the width of the outside div inside quotes OUTSIDE the style thingy. div width="whatever"
while on the inside div it's set properly inside the style (style=width:whatever%; )
so i put it in the right place and now it works perfectly and actually adheres to my sizes. thanks again. ^^
I have this installed.
It works great except it's not exactly what I want.
How do I make it so that what appears on the spoiler tab is the same as the "option" that I type into the box?
Right now the spoiler tab says "Click to show" and is very very long.
What I'm wanting is for it to be shorter and have it be what I type as the "option" when I'm setting up the spoiler.
Does this exist some place else?
Floob
04-29-2007, 10:42 PM
installed on 3.6.5. works great. just having trouble customizing it's look. like i changed the 100% widths to 80% and it doens't respond correctly. the inside div response correctly but not the outside div. it still takes up 100% of the table width. i could specify exact size but...whatever. it's all aesthetics.
great spoiler. thanks.
edit: ok i figured it out. i noticed you placed the width of the outside div inside quotes OUTSIDE the style thingy. div width="whatever"
while on the inside div it's set properly inside the style (style=width:whatever%; )
so i put it in the right place and now it works perfectly and actually adheres to my sizes. thanks again. ^^
Can you expand on that - how/where do you change the width of the spoiler info?
hambil
04-30-2007, 06:29 PM
Ownership of this hack is being transfered to Dismounted. Thank you for everyone who used, enjoyed, and made suggestions for this hack.
Tact7626
04-30-2007, 07:35 PM
Can you expand on that - how/where do you change the width of the spoiler info?
there's a part where the guy put <div width="100%" >
and it doesn't work well. instead, you should use <div style="width:100%;">.
he used the second method on the second div, but the first method on the other div. and that's why i was having trouble setting my own sizes to it. after i realized this, i changed the "incorrect" one and it works. :p
Floob
04-30-2007, 07:58 PM
Nice thanks.
I use this now
<div style="width:20%;" 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%;"> <b>Click to show spoiler</b></div>
<div id="idSpoiler" style="display: none;">The butler did it!</div></div>
Dismounted
05-01-2007, 09:01 AM
Ownership of this hack is being transfered to Dismounted. Thank you for everyone who used, enjoyed, and made suggestions for this hack.
Thanks, I'll be making a new thread soon :).
gutterboy
05-28-2007, 06:34 PM
OK.. I installed this I wanted to change the text "click to show" slightly. My new updated text only shows if I click on it first to show it & then click again to hide it; but if I refresh the page it won't show my custom text anymore.
I made the changes in the code that has the hook "showthread_complete" as that was the only place I could find that text; I even searched the templates for it &...... nothing.
Any help here?
Thanks!
GuaRRand
06-15-2007, 12:32 PM
can you make it so that the cursor becomes an arrow instead of the default line ... it would give it a more "clickable" feeling to it.
And it doesnt show up on the quickreply or edit windows, in the menubar i mean.
I see the button in a normal new post, but not in the quickreply or edit windows...
thanks
GuaRRand
06-19-2007, 08:00 AM
*bump*
gutterboy
06-19-2007, 08:27 AM
Could we please get an update here?
Thx!
jags2ooo
06-29-2007, 06:05 PM
Great man I love how easy it is to use and Edit. Thanks this is perfect.
The Best thing about this MOD is there is NO more Highlighting needed :P
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.