Page 1 of 2

[RC3] Extended Spoiler BBCode Tag

Posted: Thu Jan 19, 2006 5:47 am
by ahwm
MOD Title: Extended Spoiler BBCode Tag
MOD Description: Adds a unique spoiler tag that is a black box with a white (optional) message that is set by the user.
MOD Version: 1.0.4

MOD Download: http://www.thescripters.com/phpBBMods/X ... poiler.zip

Demo Board: http://www.thescripters.com/forum/viewtopic.php?t=18

I haven't tested it with either Opera or Netscape as neither one works on this PC for some reason... But it works with IE 6/Maxthon 1.5.2 Build 21.. Oh and Firefox 1.5... But there's nothing that shouldn't work...

I had a difficult time switching it back to just "spoiler" so it stayed as "x-spoiler" It screwed up our forum in oh so many ways when I tried it :P

Beyond weird it was... :lol: URL: http://www.thescripters.com/phpBBMods/X ... 20test.png

I'm fond of a saying I found online a while back... something about a directory viewer that creates thumbnails of files inside... anyway they said that opening PHP code using this "does ungood things"

First MOD, we needed something and it wasn't online anywhere...

So enjoy...

Posted: Thu Jan 19, 2006 6:07 am
by igorw
When i click on the demo board, the first one only changes when i select the text, the second one is white on black...

Using Firefox 1.5

Posted: Thu Jan 19, 2006 6:12 am
by ahwm
eviL<3 wrote: When i click on the demo board, the first one only changes when i select the text, the second one is white on black...

Using Firefox 1.5


The white text is the custom message the user writes. The black text is below it.

You mean both in that post? Or do you mean the first post?

Without custom message:

Code: Select all

[x-spoiler]Hidden Text[/x-spoiler]

<table bgcolor="black"><tr><td bgcolor="black" width="100%"><span style="color: white">Spoilers (Highlight to read):</span></td></tr><tr><td bgcolor="black" width="100%"><span style="color: black">Hidden Text</span></td></tr></table>
With custom message:

Code: Select all

[x-spoiler=Spoilers]Hidden Text[/x-spoiler]

<table bgcolor="black"><tr><td bgcolor="black" width="100%"><span style="color: white">Spoilers:</span></td></tr><tr><td bgcolor="black" width="100%"><span style="color: black">Hidden Text</span></td></tr></table>

Posted: Thu Jan 19, 2006 5:02 pm
by ahwm
Are there no more issues? :P

Or just that nobody's tried it? ;)

Posted: Thu Jan 19, 2006 8:54 pm
by agent00shoe
Looks good. :D

Posted: Thu Jan 19, 2006 9:00 pm
by ahwm
Thanks.. I've been working on another one.. but it's more for inline spoilers... So it's a lot less complicated than this one was...

Update: added screencap of first screw up with this MOD...

Posted: Fri Jan 20, 2006 6:57 am
by ahwm
Updated first post with new Demo Board link.. allows users to test it out now....

It's also got the other spoiler tag I was working on...

Posted: Fri Jan 20, 2006 4:12 pm
by igorw
Ah, so you're SUPPOSED to hilight it, not just mouseover. Well then it's working perfectly for me

Posted: Fri Jan 20, 2006 4:39 pm
by ahwm
eviL<3 wrote: Ah, so you're SUPPOSED to hilight it, not just mouseover. Well then it's working perfectly for me


I guess you could always add Javascript to it to make it highlight on mouseover... I just haven't done it :)

Simple enough to do though...

If you know Javascript.. Which I don't know enough of it right now...

Posted: Fri Jan 20, 2006 5:28 pm
by igorw
Well this is from a vB Forum that i administrate:

Code: Select all

<table><tr> <td><b>Spoiler:</b></td> <td bgcolor="#000000"><SPAN Class="spoiler style2" onmouseover="this.style.color='white';" onmouseout="this.style.color='black'">Secret Text</span></td></table>
The {Param} is what's between the Tags.

But has a little problem

Try this:

CSS

Code: Select all

/* ***** Spoiler style ***** */
.spoiler { color: #000000; background: #000000; }
/* .spoiler:hover { color: #FFFFFF; background: #000000; } */

Code: Select all

<SPAN Class="spoiler">{Param}</span>

Posted: Fri Jan 20, 2006 5:48 pm
by ahwm
Thanks I'll try it out. That should work really well for at least one. :)

Posted: Fri Jan 20, 2006 6:12 pm
by ahwm
Updated URL points to zip file that contains both versions.. highlight on mouseover and non-highlight on mouseover.

$lang issues

Posted: Tue Jan 24, 2006 10:26 pm
by ahwm
Still having trouble with the $lang variable... It likes to show the variable rather than what it's supposed to be replaced with... It will require further investigation... So right now, "Spoilers (Highlight to read):" is hardcoded... and that shouldn't be a problem on English-speaking boards... But it could cause problems for non-English boards... :P

Posted: Fri Feb 24, 2006 8:59 pm
by ahwm
First post updated with new information for the demo board.

Posted: Mon Mar 13, 2006 6:48 am
by ahwm
Lang variable fixed.

replace in includes/bbcode.php:

--snip--

It works now with that change.

New versions uploaded to link in first post.


EDIT: Code edited out since it's obsolete anyway.