Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=573)
This mod will add a simpler version of a spoiler tag, it'd simply create a box where the text is the same colour as the background.
VERSION 1.5 RELEASED!
With version 1.5 a button to Post.template.php has been added so be sure to upload spoiler.gif into your BBC images folder for your theme (a classic variation is provided)
There are two different methods of displaying this.
1.5a is a block level box just like the quote and code tags.
1.5b is an inline black box with the rest of your text.
Languages Supported:
English American
English British
Swedish (Thanks to Veidit for the translation)
Attached to this post is the Classic Theme's BBC button.
-AwwLilMaggie
I've tested it out and it applies correctly, however it doesn't create the box to match with the text.
Basically it all looks like pretty normal text to me, example:
Spoiler (Highlight to read)
wow this is awesome
That's pretty much what happens, the [spoiler] tags made that nice heads up about spoiler, but the spoiler within is as if it were typed normally. No matching colour box at all. I am not using the default theme. Also is there a way to add a BBC button for this [spoiler][/spoiler] tag?
You'll need to edit style.css by adding:
/* Simpson I order you to buy those shoes*/
.spoiler
{
color: #CCCCFF;
background-color: #CCCCFF;
border: 1px solid #000000;
margin: 1px;
padding: 1px;
font-size: x-small;
line-height: 1.4em;
}
to the end.
To add a button create an image for it in a graphics program, then add it to the other buttons in Post.template.php
-AwwLilMaggie
I added it to the end of style.css nothing happened.
There are a bunch of different colour options for my theme, so I've been adding the code to the end of the style_thecolour.css that I'm using, still no good though.
try ctrl f5 (make sure the css file is being updated and not stuck in the cache)
I think that did the trick, thank you!
I installed teh mod but all I get is
//Spoiler Tag $txt['spoiler'] = 'Spoiler (Highlight to read)';
along the top of my forum.
It's probably after the closing ?> in Modifications.english.php, open that file up and move it to before the closing ?>
-ALM
Thank you for that simple but great mod :D
Hmm
I only get:
Spoiler (Highlight to read)
test
but would it be possible for an option of the mod to only black out the text and not add Spoiler (Hilight to read) and not add any form of linebreaks?
You could code it that way yes. The style is set in style.css and the actual layout is in Subs.php on how its displayed.
-ALM
Version 1.5 released. This includes English British and Swedish translations (thanks to Veidit for the Swedish) it also includes a button for your users to click on.
If you want a block level box for spoilers use 1.5a, if you want it inline, use 1.5b
-ALM
Quote from: Emperium on February 25, 2007, 01:14:28 AM
I've tested it out and it applies correctly, however it doesn't create the box to match with the text.
Basically it all looks like pretty normal text to me, example:
Spoiler (Highlight to read)
wow this is awesome
That's pretty much what happens, the [spoiler] tags made that nice heads up about spoiler, but the spoiler within is as if it were typed normally. No matching colour box at all. I am not using the default theme. Also is there a way to add a BBC button for this [spoiler][/spoiler] tag?
same here...it doesn't actually create the spoiler...
You have to add the CSS to your style.css file. Depending on which one you installed 1.5a or 1.5b. But either way, it'll go on the end. A button has also been added in 1.5.
-ALM
I'd been using this mod with no problems until today when I upgraded it. Now it just displays [spoiler] text [/spoiler] around all the posts where it previously worked.
Help? I'm on SMF 1.1.2 and don't have any other packages installed other than Rename Topic.
Which version did you upgrade to 1.5a or 1.5b? You should've uninstalled the old one first.
For 1.5a make sure that something like
array(
'tag' => 'spoiler',
'before' => '<div class="spoilerheader">' . $txt['spoiler'] . '</div><div class="spoiler">',
'after' => '</div>',
'block_level' => true,
),
is included in there somewhere.
-ALM
Error in Package Installation
Execute Modification ./Sources/Subs.php Test failed
same here..
This is great and admin can post them but regular members get this message
Sorry - you don't have the proper permissions to post spoilers.
Is there a fix for this as I can't see anything in permissions to change?
martina: That doesn't have anything to do with this mod. You must've installed one of the other Spoilers.
fangweile, janitro: There must be a conflicting mod somewhere. Take a look at the modification.xml file to see what to do and install manually.
-ALM
Oh right ok thank you x.
I did have another one in my cpanel but not active on the forum. I have deleted it now but it is still the same. Do I need to delete the spoiler and re upload it?
I have got no idea how to install this (or any mod). I'm using version 1.1.3. Could anyone give me some quick instructions? Thanks.
(I read through the general mod instillation instructions, but am still unsure what to do. What file do I edit? Where exactly do I make this edit, etc).
To quote myself
Quote from: ALM on May 20, 2007, 07:23:18 PM
Download the mod, then go Admin > Packages > Download Packages > Upload a Package > [Browse] > Upload and follow the intructions.
-ALM
-ALM
ok, I tried to download 1.5a which shows on the download/zip file but when I upload it, it shows as version 1.5b. any ideas on what to do here? I downloaded both 1.5a and 1.5b and they both show as 1.5b when I upload the file.
Ignore it, its an error on my part.
That or use the new 1.5a package.
-ALM
Will you please tell me which part of code shoud I change so the spoiler mod works with
[x] and [/x] tags
instead of
[spoiler] and [/spoiler]
I want to do this because all spoilers on my board are tagged with x and /x (in square brackets, ofc.), from some other spoiler mod that I used on the SMF version 1.0.9.
Thank you very much!
Btw, you may also wanna add an extra CSS rule if you want your spoilers to be revealed by hovering your mouse over spoiler div (works fine with Opera 9.22, Firefox 2.0.6 and Netscape 8, but not in IE6).
.spoiler:hover
{
color: #FFFFFF;
}
For either 1.5a or 1.5b change:
array(
'tag' => 'spoiler',
to
array(
'tag' => 'x',
and on Post.template.php change
'spoiler' => array('code' => 'spoiler', 'before' => '[spoiler]', 'after' => '[/spoiler]', 'description' => $txt['spoiler_post']),
'x' => array('code' => 'x', 'before' => '[x]', 'after' => '[/x]', 'description' => $txt['spoiler_post']),
-ALM
Thank you very much for the quick answer and, of course, for this very useful mod. :)
I'm running SMF 1.1.3 with TinyPortal v0.9.8
When I installed the original simplespoiler I had to eddit the CSS, and then ctrl F5 to refresh my browser, and then it worked.
But the 1.5 A&B version doesn't install. They both say
Quote./Sources/Subs.php Test failed
I want to use the 1.5 version because it comes with a button (or so I've heard).
It does come with a button, which version do you want, 1.5a and 1.5b each have different code to add into Subs.php
-ALM
Quote from: ALM on September 12, 2007, 08:44:26 AM
It does come with a button, which version do you want, 1.5a and 1.5b each have different code to add into Subs.php
-ALM
The 1.5a and 1.5b have the bbc button image, but the original one doesn't.
I've uploaded the spoiler.gif from the 1.5 and manually put it in my /images/bbc/ folder. But it seems to be lacking the protocol to pull it up.
as for which one I want 1.5a or 1.5b, I guess the inline one. But I've tried to install both of them and I get an installation error
QuoteInstalling this package will perform the following actions:
Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english_british.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.swedish.php Test successful
4. Execute Modification ./Sources/Subs.php Test failed
5. Execute Modification ./Themes/default/Post.template.php Test successful
6. Execute Modification ./Themes/default/style.css Test failed
7. Extract File ./Themes/default/images/bbc/spoiler.gif
Interesting, now it gives me two errors. The style.css is the new error. I guess maybe because I already entered the block of text in the css file to make it recognize the first one?
Well, the first version works.. I just have to manually type in
[spoiler] text [/spoiler]
Sure wish I had a handy dandy button for it though :(
If it's already installed, then do you have a custom theme with its own Post.template.php?
-ALM
yes
Quote from: ALM on September 12, 2007, 10:02:09 AM
If it's already installed, then do you have a custom theme with its own Post.template.php?
-ALM
Yes. I have SMF Default, Classic, and two skins I am customizing that are copies of SMF Default. Those are the only ones with the post.template.php
Then the reason it isnt appearing on your themes (except the default) is because it doesnt modify those themes, you'll need to add the code to those themes manually. (style.css too actually)
This will help out: http://sleepycode.com/PackageParser/index.php
-ALM
QuoteThen the reason it isnt appearing on your themes (except the default)
Actually, it's not appearing on the default. It's not appearing on any theme.
I got the same error as other people.
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english_british.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.swedish.php Test successful
4. Execute Modification ./Sources/Subs.php Test failed
5. Execute Modification ./Themes/default/Post.template.php Test successful
6. Execute Modification ./Themes/default/style.css Test successful
7. Extract File ./Themes/default/images/bbc/spoiler.gif
Tried to add it manually but it just gives an error on line XXX and my forum wouldn't load.
I looked at it more deeply and found that the search criteria isn't in the Subs.php
But now for the next question. Where to add it manually ^^
i get an error in subs
and i cant manually install as the parsers wont read it and i cant read XML or the like
Which one are you trying to install? 1.5a or 1.5b?
-ALM
umm
which ever was on the bottom..
it was a lol
Find:
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),
and add before
array(
'tag' => 'spoiler',
'before' => '<div class="spoilerheader">' . $txt['spoiler'] . '</div><div class="spoiler">',
'after' => '</div>',
'block_level' => true,
),
-ALM
were you replying to me?
which file am i looking in?
:|
Yes, the file you need to look in is Subs.php as that's what you said the failure was. :P
-ALM
it doesnt work now
the post comes up showing what it was supposed to hide :|
and i did check the coding of the post and it still had the spoiler code written in it lol
Is the package installed in the package manager? (If not, do so anyway, ignoring any errors on Subs.php)
Are you using a custom theme? (If so, post and I'll give you further instructions)
-ALM
lol its showing up
but it doesnt hide the text between the codes :S
http://www.jades-world.com/forums/index.php?topic=231.0
oh wait :D
it works on the core theme!!
(i forgot i was using the core theme i modify and play with codes on lol)
how do i fix it to work with my other themes? (theres three, and their all copies of the core theme)
(and thankyou, i know im blonde, but your still here *hands bat* there you go, knock some sense into me ;))
All you need to do is now make a change to your theme's style.css file.
Find:
.quoteheader, .codeheader
and add
, .spoilerheader
after it.
and then at the end of the file add:
/* Simpson, I order you to buy those shoes */
.spoiler
{
color: #CCCCFF;
background-color: #CCCCFF;
border: 1px solid #000000;
margin: 1px;
padding: 1px;
font-size: x-small;
line-height: 1.4em;
}
You can also tweak the colours if you wish.
-ALM
IT WORKS PERFECTLY!!
THANKYOU SO MUCH!! :D
HOMER: And thats the end of that chapter. :P
-ALM
hi all, can someone explain to me what's the use of this mod? i don't understand the descriptions in the download page.
TIA
It will allow people to hide text from view unless another person highlights over the spoiler box/area (depending on 1.5a or 1.5b) with the syntax of [spoiler][/spoiler]
-ALM
Ok, I feel very stupid, I have downloaded the 1.5 version (the a and b version gave me errors on the sub file). It works on the default theme but when I go to edit the style to ANY of my other themes, the spoiler doesn't change color.
Any ideas? I'm using version 1.1.4
Hello there.
I would like to install package 1.5b on my forum; inline spoilers are just what I need. However, I get the "./Sources/Subs.php Test Failed" error when I attempt to install it. Could you please tell me how I should edit the Subs.php file in order to install 1.5b? Also, once I do so, do I still need to edit the css file or any other file?
Thanks very much for your help!
-kirax2
Oops........wrong thread......ignore me. :-[
I just added the spoiler mod and it looks like it loaded 5a (kinda) :-[
i copied the .gif file and it appears and clicks to add the spoiler tags
but i just get the spolier brackets with the actual text showing in the middle of them
what is the manual edit that would fix that problem
thanks
i am using dilbert theme
is 5a the one where there would be a clickable spoiler button ?
is anybody still looking at this thread ?
:)
help
anybody got any 'spolier' help or advice
it partially loaded ... now what
anybody got any 'spolier' help