[2.0.19] Don't Spoil It!

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
10
67%
Very Good
2
13%
Good
2
13%
Fair
0
No votes
Poor
1
7%
 
Total votes: 15

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28009
Joined: Sat Aug 16, 2003 7:36 am

[2.0.19] Don't Spoil It!

Post by Extensions Robot » Wed Jan 18, 2006 8:06 pm

MOD Name: Don't Spoil It!
Author: darklordsatan
MOD Description: This mod adds a new BBCode ('spoiler') that allows the user to hide text (in both topics and PMs) that can be unveiled/hidden by clicking on it.
The user can embed other bbcodes inside the spoiler tag, and the spoiler works well inside other bbcodes too.


MOD Version: 1.0.1

Download File: Dont_Spoil_It_1_0_1.mod
mods overview page: View
File Size: 7540 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
webmacster87
Former Team Member
Posts: 3758
Joined: Fri Jun 11, 2004 2:30 am
Location: San Mateo, CA
Name: Douglas Bell
Contact:

Post by webmacster87 » Sun Jan 29, 2006 4:44 pm

MOD Validated/Released

Notes:
Adds a [spoiler][/spoiler] BBCode to your forum which allows the text within to be displayed/hidden using JavaScript.

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Post by beggers » Mon Jan 30, 2006 5:48 am

There are about 4-5 spoiler mods in circulation. Can you show us what this one looks like? Any information about browser compatibility? Thanks.

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Mon Jan 30, 2006 6:25 am

beggers wrote: There are about 4-5 spoiler mods in circulation. Can you show us what this one looks like? Any information about browser compatibility? Thanks.

Browser compatibility? Well, I tested it on firefox and opera, and it works fine on both.
Here are two screenies showing what it looks like:

Image

Image

Thanks to the mod team for validating this one :)

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 » Mon Jan 30, 2006 9:58 am

Seems like the best one around, i think i'll install it :)

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 » Mon Jan 30, 2006 1:29 pm

I installed it on my board, but i can't make it look good on the dark template:

Image

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Mon Jan 30, 2006 5:00 pm

eviL<3 wrote: I installed it on my board, but i can't make it look good on the dark template

Ok, first of all, next time be sure to tell the name of the template... I had to go to your board and look around the HTML to find out it was "AcidTech" :P
Im not really a good designer (programmer art(TM) only), but this is the best I could come up with

Image

So, IMHO its pretty descent.
In templates/AcidTech/bbcode.tpl, use this piece of code instead of the provided one

Code: Select all

<!-- BEGIN spoiler_open -->
<div onClick="unveil_spoiler('{SPOILER_ID}')" style="padding: 5px; background-color: #2370B6; border: 2px #090909 solid; font-weight: bold; font-size: 10px;"><b>{L_SPOILER}</b></div>
<div style="padding: 5px; background-color: #434343; border: 1px #090909 solid; display: none;" id="{SPOILER_ID}">
<!-- END spoiler_open -->
<!-- BEGIN spoiler_close -->
</div>
<!-- END spoiler_close -->
Now, tell me, do you have ideas on how to improve this sort of mod to work on a given number of templates?
So far, all I can think of, is to create a control panel in the ACP to allow the admin change the code easily... but thats really dumb since you can just modify the bbcode.tpl file manually anyway :roll:
I dont know though if there is some way to access information about the template and then change accordingly... but I dont think so, since what I need is the template's stylesheets.

Cheers

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 » Mon Jan 30, 2006 7:57 pm

Wow, thanks a lot! I guess i just don't know enough about templates/html then...

Maybe you could give some description, of how to find the code on non-standard templates.

Thanks!

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Tue Jan 31, 2006 5:41 pm

eviL<3 wrote: Maybe you could give some description, of how to find the code on non-standard templates

Ok, first of all, when you reach a certain familiarity with computers, there are some things you do in order to achieve a goal, that, though technically are disgusting, they work :D
Finding the right "codes" as you say is part of this. Not the best way to do it (Im sure there is a "pro" way, but well, Im not a designer as I said before)
The "trick" is actually very simple. First of all, you need to find the hex code of the color you need.
I take a screenshot of some "sample" colors I wanna use.

Image

You open the screenshot in an image editing app, then you use the usual "eyedropper" tool (the one in the screenie is taken from paint)
Now lets look at the "original" code contained in the mod
<!-- BEGIN spoiler_open -->
<div onClick="unveil_spoiler('{SPOILER_ID}')" style="padding: 5px; background-color: #DEE3E7; border: 2px #006699 solid; font-weight: bold; font-size: 10px;"><b>{L_SPOILER}</b></div>
<div style="padding: 5px; background-color: #FAFCFE; border: 1px #000000 solid; display: none;" id="{SPOILER_ID}">
<!-- END spoiler_open -->
<!-- BEGIN spoiler_close -->
</div>
<!-- END spoiler_close -->


You can see in bold, the four places where a color is used. In this case, you need some CSS/HTML knowledge (basic really) in order to understand what each color corresponds to, or you can always make some trial and error :wink:

So, the first color (#DEE3E7) is meant to be used in the upper div, aka the "Click here to see the hidden message (It might contain spoilers)" area. And the "background-color:" thing before the color, is well, pretty obvious CSS even for the absolute beginner. I wanted the background color to be the same color of the "quote" message (that light blue), so I take the eyedropper tool, select that color, and depending on the editing application you are using, you will find the hex code, which is "#2671B6" in this case (I actually changed it a little bit, and it ended up being "#2370B6".

The second color (#006699) is for the same upper div, but this time, its being used in the borders of that area. I used "#090909" which is actually black (well, a little more gray than black), but I guess there shouldnt be much difference with "#000000" (hex code for totally black)

The third and fourth color, are meant to be used in the lower div tag, aka the area that contains the spoiler itself, so I followed a similar approach for them.
For the third color BTW, all I can say is that I followed a trial and error approach, by picking the gray background you can see by default, then moving the values up and down till I got a clearer gray tone :P

And thats all, as you can see, not very technical nor professional, but it works in the end :lol:
As I said before, CSS/HTML knowledge not required, but nice things to know.

PD: The screenshot was taken on a "modified" version of my mod, as I was playing around with the stylesheets to improve it (no luck so far), so you know, pretend the spoiler tag looks like the one in your screenshot (almost invisible)

Cheers

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 » Tue Jan 31, 2006 6:41 pm

You're the best! Thanks! <3

groundfighter
Registered User
Posts: 1909
Joined: Sat Nov 08, 2003 2:15 am
Location: Las Vegas, NV
Contact:

Post by groundfighter » Sun Feb 05, 2006 1:38 am

Cool mod, changed a few hex codes and away shes goes. 8)

soulreaver99
Registered User
Posts: 5
Joined: Wed Jan 04, 2006 3:17 pm

Post by soulreaver99 » Thu Feb 09, 2006 4:50 pm

The tags work and it hides the text but when I click on it, I get an "Error On Page" in my web browser when using this mod and it does't reveal the text.

soulreaver99
Registered User
Posts: 5
Joined: Wed Jan 04, 2006 3:17 pm

Post by soulreaver99 » Thu Feb 09, 2006 5:38 pm

Nevermind, I figured it out! Didn't add in the javascript part into the tpl file 8)

niksa
Registered User
Posts: 612
Joined: Mon Sep 08, 2003 7:20 pm
Location: Future birthplace of James T. Kirk
Contact:

Post by niksa » Fri Feb 10, 2006 6:18 am

Very cool.. I like it more than the other spoiler mods! Very easy to install too. :) Is there any way to add a background image in the bbcode.tpl part?

Something like: background-image: url(images/background.jpg); is what I would normally do, but it's not working. Should I try something else?

edit: oh! I just noticed... when I do a search for something and a post comes up with a spoiler tag, the contents show in the search post field. Is there any way to make it not shown in the search results (the contents)? I guess this happens because, apparently.. in search results, it doesn't show bbcodes. Hmm.. I'm going to see if I can find a mod that will fix this.. if I do, I'll post.. because it's silly to have the spoilers covered up everywhere & then visible in the search results. :(

DennyCrane
Registered User
Posts: 86
Joined: Mon Oct 17, 2005 3:47 am

Post by DennyCrane » Mon Feb 13, 2006 7:37 pm

oh! this is EXACTLY what i want!

but i get it cant find these lines in bbcode.php:

$EMBB_widths = array('') ;
$EMBB_values = array('') ;


I had the same problem when i tried to install another spoiler mod.. i dont understand why, i just uploaded the original bbcode.php and those lines just arent there

:?:

Post Reply

Return to “[2.0.x] MOD Database Releases”