[RC3] Extended Spoiler BBCode Tag

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

[RC3] Extended Spoiler BBCode Tag

Post 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...
Last edited by ahwm on Thu Jul 06, 2006 4:12 am, edited 9 times in total.
"I'm not lazy, I'm motivationally challenged"
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post 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
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post 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>
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post by ahwm »

Are there no more issues? :P

Or just that nobody's tried it? ;)
"I'm not lazy, I'm motivationally challenged"
agent00shoe
Registered User
Posts: 373
Joined: Sat Feb 12, 2005 9:39 pm

Post by agent00shoe »

Looks good. :D
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post 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...
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post 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...
"I'm not lazy, I'm motivationally challenged"
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Ah, so you're SUPPOSED to hilight it, not just mouseover. Well then it's working perfectly for me
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post 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...
"I'm not lazy, I'm motivationally challenged"
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post 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>
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post by ahwm »

Thanks I'll try it out. That should work really well for at least one. :)
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post by ahwm »

Updated URL points to zip file that contains both versions.. highlight on mouseover and non-highlight on mouseover.
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

$lang issues

Post 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
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post by ahwm »

First post updated with new information for the demo board.
"I'm not lazy, I'm motivationally challenged"
ahwm
Registered User
Posts: 60
Joined: Thu Jan 19, 2006 5:17 am
Location: Idaho
Contact:

Post 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.
Last edited by ahwm on Thu Jul 06, 2006 4:14 am, edited 1 time in total.
"I'm not lazy, I'm motivationally challenged"
Post Reply

Return to “[2.0.x] MODs in Development”