Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ciberwing on February 05, 2008, 12:25:19 AM

Title: Spoiler Show & Hide
Post by: ciberwing on February 05, 2008, 12:25:19 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1082)

Simple and customisable (through language files and stylesheets)

This modification will create a new BBCODE tag called 'spoiler'; the Whole content that is in it will be hidden by a button that, on having been pressed, will show or hide the content.

Also adds a Spoiler button in edit-post area

Has Spanish, Spanish-utf8, English, English-utf8, English_british, English_british-ut8 languages.

A few screenshots:
Before click:
(http://i275.photobucket.com/albums/jj285/ciberwing/ScreenShot001.jpg)
After Click:
(http://i275.photobucket.com/albums/jj285/ciberwing/ScreenShot002.jpg)
Title: Re: Spoiler Show & Hide
Post by: dico on February 05, 2008, 09:57:45 PM
how do i make the button look different

(http://img509.imageshack.us/img509/5486/captureiu4.jpg)
Title: Re: Spoiler Show & Hide
Post by: perro88 on February 06, 2008, 12:56:59 AM
Quote from: dico on February 05, 2008, 09:57:45 PM
how do i make the button look different

(http://img509.imageshack.us/img509/5486/captureiu4.jpg)
:P odviously you're not using the default theme. try to copy the gif file of the mod(will be probably on the themes/default/images/bbc) and copy it to themes/thethemeyou'reusing/images/bbc. this will work for every bbc tag you add.
Title: Re: Spoiler Show & Hide
Post by: ciberwing on February 06, 2008, 05:49:29 PM
Quote from: dico on February 05, 2008, 09:57:45 PM
how do i make the button look different

(http://img509.imageshack.us/img509/5486/captureiu4.jpg)

Only copy the spoiler.gif from the package file to your folder themes/MYTHEME/images/bbc
Title: Re: Spoiler Show & Hide
Post by: ameo on February 07, 2008, 11:16:15 AM
I tried installing despite error [test failed] but it doesn't work.

when I write [spoiler]text[/spoiler] it stays that way. nothing happens.

p.s. By the way, does it look like on the picture, or it can look like normal buttons here

- ROUND white and cute I mean.

Title: Re: Spoiler Show & Hide
Post by: ciberwing on February 07, 2008, 03:55:03 PM
Ok, i think you have installed a mod that have modified ur subs.php and then, this one canno't find the exactly line to paste...

Do u can paste here your subs.php? or attach it.

Quotep.s. By the way, does it look like on the picture, or it can look like normal buttons here

Of course it looks like normal buttons, but the image of th ebutton is copied only in the default theme (fixed in 2.x series), then you MUST copy the gif from the default theme folder to the theme you want to use...

It look like this:
Title: Re: Spoiler Show & Hide
Post by: n3tw0rk on February 11, 2008, 02:00:42 PM
edit.---- its works"---
Title: Re: Spoiler Show & Hide
Post by: wooptoo on February 11, 2008, 04:19:59 PM
I think i found a bug:

If you quote a spoiler, anything you write under the quote will also get quoted.

try something like this:

[ quote ]
    [ spoiler ] ... [ /spoiler ]
[ /quote ]
some text

"some text" will also get quoted, although it shouldn't.
Title: Re: Spoiler Show & Hide
Post by: n3tw0rk on February 12, 2008, 12:21:38 PM
hey guy... i fix them..

can use this.. mod.. using the manual method!!.. works ok!!

http://www.smfhelper.info/forum/package.php5 <-- this is the links! se ya
Title: Re: Spoiler Show & Hide
Post by: DarioBros on February 16, 2008, 05:08:34 AM
Quote from: wooptoo on February 11, 2008, 04:19:59 PM
I think i found a bug:

If you quote a spoiler, anything you write under the quote will also get quoted.

try something like this:

[ quote ]
    [ spoiler ] ... [ /spoiler ]
[ /quote ]
some text

"some text" will also get quoted, although it shouldn't.

I should have fixed it.

Here is my changelog:

-Changed modification.xml adding a </div>:

'after' => '</div></div></div>',

-Added the Italian language.

In attachment there is the new package I made, so you can try it.
Pay attention, i'm not one of the developers, so try it at your own risk! :)
Title: Re: Spoiler Show & Hide
Post by: ameo on February 16, 2008, 03:43:49 PM
I wonder about this - can you enhance it so this could be done:

[spoiler]in sixth sense[spoiler]there is a twist in the end[/spoiler].[/spoiler]

So, basically, NESTED spoilers - spoiler inside of a spoiler.

Title: Re: Spoiler Show & Hide
Post by: DarioBros on February 17, 2008, 08:50:55 AM
Quote from: ameo on February 16, 2008, 03:43:49 PM
I wonder about this - can you enhance it so this could be done:

[spoiler]in sixth sense[spoiler]there is a twist in the end[/spoiler].[/spoiler]

So, basically, NESTED spoilers - spoiler inside of a spoiler.



Did you try my package?
I can do it.
Title: Re: Spoiler Show & Hide
Post by: wooptoo on February 19, 2008, 06:57:25 PM
Thanks very much DarioBros, it works now. Nested spoilers work too.
Title: Re: Spoiler Show & Hide
Post by: MinasC on February 20, 2008, 02:01:58 AM
that's a great one , gonna try it out as soon as i get my home internet connection back ! thnx !
Title: Re: Spoiler Show & Hide
Post by: ciberwing on February 25, 2008, 09:04:26 PM
Thanks for all, Guys  :-*

Now I've been released an OFFICIAL update (1.0.3):
-Fixed validation problem (and nested spoilers)
-Added full text in button
-Added French and Italian Languages

Again, Thanks for all.
Title: Re: Spoiler Show & Hide
Post by: Basie on February 25, 2008, 11:48:30 PM
Thanks for updating this. Great mod. :)
Title: Re: Spoiler Show & Hide
Post by: Lotis on February 26, 2008, 06:53:38 PM
Thanks for this mod, it installed very easily and a spoiler button does appear among the other edit buttons above the text window.

However, when used it does not create a button in the post. Instead it reads "Spoiler (highlight to read)" above a blue quote box-like area. When the text in the box is  highlighted, it still cannot be read (I'm using the SMF default template) and loaded v1.0.3. Am I misunderstanding how it's suppose to work? I thought it would create a button in the post that, when pressed, would reveal the text "underneath".

:o  ???
Title: Re: Spoiler Show & Hide
Post by: ciberwing on February 27, 2008, 08:58:55 AM
Hehe, i think you have an error with the package that you have installed, because my package doesn't have the text "Spoiler (highlight to read)"...

Be sure to uninstall  all the spoiler related packages and delete the installer packages (not only unistall, delete also....) from the server, then re download the package from here:
http://custom.simplemachines.org/mods/index.php?mod=1082

Good Luck!

I have tested it and works perfect =)



TIPS


Add these lines to the stylesheet (css) of your theme for improve the appearance of the spoiler.


/*

BOTON SPOILER

*/
div.spoiler-wrapper {
border:solid 1px #ccc;
padding:4px;
margin:3px;
}
div.spoiler-wrapper input[type=button],div.spoiler-wrapper input[type=submit] {
padding:3px;
margin:3px;
background:#E7F2F8;
border-top:solid 1px #cccccc;
border-left:solid 1px #cccccc;
border-right:solid 1px #666666;
border-bottom:solid 1px #666666;
outline:none;
}
div.spoiler-wrapper input[type=button]:hover,div.spoiler-wrapper input[type=submit]:hover {
padding:3px;
margin:3px;
background:#CDDFE9;
border-top:solid 1px #666666;
border-left:solid 1px #666666;
border-right:solid 1px #cccccc;
border-bottom:solid 1px #cccccc;
}

Title: Re: Spoiler Show & Hide
Post by: ameo on March 02, 2008, 04:11:32 PM
ciberwing, is it possible to replace text "Show spoiler" with "spoiler" only?

&

is it possible to have different codes for spoiler instead of [spoiler]text[/spoiler]

i'd like something like [šap]text[/šap]

it's like [whisper]text[/whisper] only in Croatian.
Title: Re: Spoiler Show & Hide
Post by: ciberwing on March 03, 2008, 12:52:50 PM
Yes & Yes...

But you must edit the package before installing it:

==========================================
How to replace the text 'show spoiler' for 'spoiler' (for 1.03):
==========================================

-In the file modifications.xml inside the package, search something like this (depending on the language that you want to change)
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[
/* Spoiler Show & Hide */
$txt['spoiler_posting'] = 'Spoiler - hide the content';
$txt['spoiler_show'] = 'Show hidden content (spoiler)';
$txt['spoiler_hide'] = 'Hide this content (spoiler)';
/* END Spoiler Show & Hide */]]></add>
</operation>
</file>


and edit it like you want...

PLUS:

for adding more translations only duplicate that piece of code and change on it the language dir / filename for the language that you want to add...

=======================
How to add more tags (for 1.03):
=======================

In the same file modifications.xml, you must search something like this:
<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),]]></search>
<add><![CDATA[
/* Spoiler Show & Hide */
array(
'tag' => 'spoiler',
'before' => '<div class="spoiler-wrapper"><div class="smallfont"><input type="button" value="' . $txt['spoiler_show'] . '" onclick="if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';this.innerText = \'\'; this.value = \'' . $txt['spoiler_hide'] . '\'; } else { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\'; this.innerText = \'\'; this.value = \'' . $txt['spoiler_show'] . '\'; }" /></div><div class="spoiler-content"><div style="display: none;">',
'after' => '</div></div></div>',
'block_level' => true,
),
/* END Spoiler Show & Hide */]]></add>
</operation>
</file>


and before the:</add>

ADD the following text (you must edit this text, this is only an example, replacing the text THISISMYNEWTAG for the tag that you want...):

/* Spoiler Show & Hide (PLUS!!! CUSTOM VERSION) */
array(
'tag' => 'THISISMENEWTAG',
'before' => '<div class="spoiler-wrapper"><div class="smallfont"><input type="button" value="' . $txt['spoiler_show'] . '" onclick="if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';this.innerText = \'\'; this.value = \'' . $txt['spoiler_hide'] . '\'; } else { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\'; this.innerText = \'\'; this.value = \'' . $txt['spoiler_show'] . '\'; }" /></div><div class="spoiler-content"><div style="display: none;">',
'after' => '</div></div></div>',
'block_level' => true,
),
/* END Spoiler Show & Hide */]]>


Please, do NOT touch anymore if you don't know what you are doing =)

I hope this help!

NOTE: I'm not native english speaker :P
Title: Re: Spoiler Show & Hide
Post by: ameo on March 03, 2008, 02:27:32 PM
Thanks. I'll try to modify it.

NOTE: Neither am I. lol :)
Title: Re: Spoiler Show & Hide
Post by: ambideXtrous on March 14, 2008, 01:02:42 AM
Thanks for this mod!  I was getting tired of waiting for the author of the other to reupload a non corrupted version.  This works perfectly!
Title: Re: Spoiler Show & Hide
Post by: Lotis on March 15, 2008, 11:16:44 PM
Quote from: ciberwing on February 27, 2008, 08:58:55 AM
Hehe, i think you have an error with the package that you have installed, because my package doesn't have the text "Spoiler (highlight to read)"...

Be sure to uninstall  all the spoiler related packages and delete the installer packages (not only unistall, delete also....) from the server, then re download the package from here:
http://custom.simplemachines.org/mods/index.php?mod=1082

Good Luck!

I have tested it and works perfect =)

Thanks. I don't have another spoiler tag installed, however I went through my packages and noticed that I do have something called "Hide Tag 1.6.1" that's installed. When I went to uninstall it, I got an error message that reads, "Unable to find package file!"

So then I went to my list of packages and sure enough there is no such package listed. But there must have been at one point. I don't see that same file in the Mods section and I'm not sure how to go about removing it manually. I would think this is what the problem is with using the spoiler tag (????).

Anyone have any suggestions?
Title: Re: Spoiler Show & Hide
Post by: ciberwing on March 16, 2008, 08:15:20 PM
Quote from: Lotis on March 15, 2008, 11:16:44 PM
Quote from: ciberwing on February 27, 2008, 08:58:55 AM
Hehe, i think you have an error with the package that you have installed, because my package doesn't have the text "Spoiler (highlight to read)"...

Be sure to uninstall  all the spoiler related packages and delete the installer packages (not only unistall, delete also....) from the server, then re download the package from here:
http://custom.simplemachines.org/mods/index.php?mod=1082

Good Luck!

I have tested it and works perfect =)

Thanks. I don't have another spoiler tag installed, however I went through my packages and noticed that I do have something called "Hide Tag 1.6.1" that's installed. When I went to uninstall it, I got an error message that reads, "Unable to find package file!"

So then I went to my list of packages and sure enough there is no such package listed. But there must have been at one point. I don't see that same file in the Mods section and I'm not sure how to go about removing it manually. I would think this is what the problem is with using the spoiler tag (????).

Anyone have any suggestions?


OK... then, your problem is that you have installed another mod related with the spoiler tag and you haven't unistalled it yet... you should try to unistall manually if your smf can't do it by himself (trough the admin area)... ensure to search in your smf folder for backups...

another solution if u don't have installed another mods, is to download a fresh copy of smf (latest version) and replace from it the source file Subs.php to your smf folder...

Good Luck!
Title: Re: Spoiler Show & Hide
Post by: Ikhsan4488 on April 04, 2008, 04:34:50 PM
great.. :D installed on my forum
Title: Re: Spoiler Show & Hide
Post by: Audion on April 05, 2008, 06:22:10 PM
Nice little mod, thanks for writing it.
Title: Re: Spoiler Show & Hide
Post by: Ikhsan4488 on May 01, 2008, 02:24:18 PM
can i use this mod for smf 1.1.5?
Title: Re: Spoiler Show & Hide
Post by: daysleeper on May 04, 2008, 09:38:59 AM
sorry, can anybody help me? i got a problem with the spoiler tag in another Theme (enterprise).

i made the Modification for other themes (see aboth), but it dont works:
the spoiler-text is still to see (but not the tag itself)  :-[

greetz
christian
Title: Re: Spoiler Show & Hide
Post by: daysleeper on May 13, 2008, 03:31:37 PM
Yeah, but in the standard-theme it works!  :-\
Title: Re: Spoiler Show & Hide
Post by: ameo on May 13, 2008, 04:26:30 PM
OK, I'm not actually a support guy, but there are couple of things you could do, daysleeper.

1. give the link to your forum with enterprise theme, so we could see what's the problem. it seems unclear to me.
2. you could contact ciberwing - who made this mod - through e-mail; click on mail icon under his avatar. i'm sure he won't mind.


Title: Re: Spoiler Show & Hide
Post by: shadyds on June 02, 2008, 03:20:35 PM

I like the bigger button?
why not leave me the letters I have the forum in Spanish and do not leave
Title: Re: Spoiler Show & Hide
Post by: buzzzz on June 14, 2008, 07:46:11 AM
great mod! I have installed it on my smf 1.1.5 and my members are enjoying it.

one question, is there a way i can disable clicking spoiler tag form guests?


thanks
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on July 21, 2008, 08:27:50 PM
works well on smf 1.1.5 :D
Title: Re: Spoiler Show & Hide
Post by: Azhtek on October 15, 2008, 07:46:16 AM
Hi. I've been having some inexplicable trouble with this mod as of late. It's been interfering with my AJAX chat system and I've got no idea what's goin' on.

Anyway, what's happening is when I open the chat while the mod is installed, I see

Notice:  Undefined index:  spoiler_show in /home/azhtek1/public_html/Sources/Subs.php on line 1619


This refers to the section of the mod in Subs.php,

/*
Spoiler Show & Hide
*/

array(
'tag' => 'spoiler',
'before' => '<div class="spoiler-wrapper"><div class="smallfont"><input type="button" value="' . $txt['spoiler_show'] . '" onclick="if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';this.innerText = \'\'; this.value = \'' . $txt['spoiler_hide'] . '\'; } else { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\'; this.innerText = \'\'; this.value = \'' . $txt['spoiler_show'] . '\'; }" /></div><div class="spoiler-content"><div style="display: none;">',
'after' => '</div></div></div>',
'block_level' => true, ),

/*
END Spoiler Show & Hide
*/


Apparently, it's the 'before' statement that's causing the issue, since it's the little blighter on line 1619, but I don't know.

I didn't have this problem till about an hour ago, and I haven't changed anything in Subs.php as of late. Anyone have any ideas?
Title: Re: Spoiler Show & Hide
Post by: ChackanPT on October 16, 2008, 03:26:47 PM
I installed this mod and it works just fine! But i wanted to add the button so that its not required to insert the code all the time, it's not even in the default theme :S

Any manual way to do it?

Edit: Okay, i added it. How do i position it?
Title: Re: Spoiler Show & Hide
Post by: ylianor on October 29, 2008, 11:59:26 AM
Hello, I istalled this mod on my forum, and it works great :D

Anyway, is there any means to have a customizable and variable text on the button?

I'll made an example based on the "quote" tag.

If I write [quote]Salve[/quote] with no arguments... it will show like that:

QuoteSalve

but I can also put:[quote="My friend July"]Salve[/quote]

Quote from: My friend JulySalve

I'd like something like that on the button... how can I pass the variable text?

Thank you! :)
Title: Re: Spoiler Show & Hide
Post by: Goatie on November 13, 2008, 07:41:29 AM
Just tested it with SMF 1.1.7 and it works.

I've added the danish language so here's an unofficial update for the danes out there ;)
Spoiler - Show and Hide 1.0.3.1

@ylianor
Open your Subs.php file and search for 'tag' => 'quote',
Take a look at all the arrays starting with 'tag' => 'quote', and see if you can get anything out of them.
Title: Re: Spoiler Show & Hide
Post by: Titanio Verde on November 23, 2008, 06:41:01 AM
Is there still space for some support?

I updated to SMF 1.1.7 the week before, and since then my log errors are getting full of:
Quote8: Undefined index: spoiler_show
Archivo: /home/www/ibizads.atwebpages.com/Sources/Subs.php
Línea: 1596

Yes! The same error as Azhtek. And I think that the Subs.php respective line is exactly the same.
Quote/* Spoiler Show & Hide */
         array(
            'tag' => 'spoiler',
            'before' => '<div class="spoiler-wrapper"><div class="smallfont"><input type="button" value="' . $txt['spoiler_show'] . '" onclick="if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';this.innerText = \'\'; this.value = \'' . $txt['spoiler_hide'] . '\'; } else { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\'; this.innerText = \'\'; this.value = \'' . $txt['spoiler_show'] . '\'; }" /></div><div class="spoiler-content"><div style="display: none;">',
            'after' => '</div></div></div>',
            'block_level' => true,
         ),
         /* END Spoiler Show & Hide */

I reinstalled the mod many times, but it doesn't make any difference. And my free hosting allows me only 10 MB of database size, and after four days the error log's table is very big, unabling access to my forum. -.-

Here is my forum: http://ibizads.atwebpages.com

Thanks beforehand!

EDIT: Fixed. I remembered that there was no text for Modifications.php on spanish_es (my forum's language).
So I just copypasted the respective text from Modifications.spanish.php to Modifications.spanish_es.php. No more heroes error logs.

Maybe Azhtek has the same trouble than me.

Ciberwing, anda, añade el idioma spanish_es para la próxima versión (si es que la hay).
Por si no lo he dicho antes, gracias por este mod. Todos los foros deberían tener algo así.
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on December 02, 2008, 02:05:49 AM
am i the only one getting this error? (saw this on my error logs)

8: Undefined index: spoiler_show
File: /home/MYNAMEHERE/public_html/forum/Sources/Subs.php
Line: 1596

8: Undefined index: spoiler_hide
File: /home/MYNAMEHERE/public_html/forum/Sources/Subs.php
Line: 1596
Title: Re: Spoiler Show & Hide
Post by: Goatie on December 02, 2008, 02:49:51 AM
Quote from: pinoypetfinder on December 02, 2008, 02:05:49 AM
am i the only one getting this error? (saw this on my error logs)

8: Undefined index: spoiler_show
File: /home/MYNAMEHERE/public_html/forum/Sources/Subs.php
Line: 1596

8: Undefined index: spoiler_hide
File: /home/MYNAMEHERE/public_html/forum/Sources/Subs.php
Line: 1596
Try to have a look at Titanio Verde's post (http://www.simplemachines.org/community/index.php?topic=220864.msg1811264#msg1811264) and see if you need to fix the same thing as he did.
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on December 03, 2008, 01:54:21 AM
thanks goatie, will check it out :)
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on December 03, 2008, 01:59:53 AM
Quote from: Titanio Verde on November 23, 2008, 06:41:01 AM

EDIT: Fixed. I remembered that there was no text for Modifications.php on spanish_es (my forum's language).
So I just copypasted the respective text from Modifications.spanish.php to Modifications.spanish_es.php. No more heroes error logs.


i checked the modification and it seems it has my forum language (i'm using english or english-utf8 i think? anyways, both language are included on the xml file.

more help pls? :) hehe
Title: Re: Spoiler Show & Hide
Post by: Goatie on December 03, 2008, 03:13:54 AM
Can you submit your SS&H code from your subs.php file? I can try to compare it with my own and see if there's any difference.
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on December 03, 2008, 08:23:23 AM
here's the spoiler show/hide taken from my subs.php file

/* Spoiler Show & Hide */
array(
'tag' => 'spoiler',
'before' => '<div class="spoiler-wrapper"><div class="smallfont"><input type="button" value="' . $txt['spoiler_show'] . '" onclick="if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';this.innerText = \'\'; this.value = \'' . $txt['spoiler_hide'] . '\'; } else { this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\'; this.innerText = \'\'; this.value = \'' . $txt['spoiler_show'] . '\'; }" /></div><div class="spoiler-content"><div style="display: none;">',
'after' => '</div></div></div>',
'block_level' => true,
),
/* END Spoiler Show & Hide */
);


i'm not sure, but the ");" after the end spoiler show/hide, is it really supposed to be there too?
thanks in advance :)
Title: Re: Spoiler Show & Hide
Post by: Goatie on December 03, 2008, 09:40:45 AM
Hmm, I can't see any difference between my code and yours. It seems I can't figure out what causes the error in your error log. I don't think I can give you any further support because I haven't played with PHP in a while :/
I hope somebody else can find the cause of, and a solution to, the error.

And yes, the ); has to be there. It closes the $codes = array( at line 1078 which holds all the BBC tags.
Title: Re: Spoiler Show & Hide
Post by: pinoypetfinder on December 03, 2008, 09:44:13 AM
ooh okay.. still, thanks for trying out. i appreciate it :)
Title: Re: Spoiler Show & Hide
Post by: Paranoimia on February 07, 2009, 09:53:51 AM
I just installed this on my forum running SMF 1.1.8 and it appears to be working fine, but I have one question...

The last step in the manual installation instructions says to add some code to './Themes/default/Post.template.php' - presumably replacing 'default' with whatever the active theme is.

However, I'm using the SlickPro_Graphite V2 theme on my forum, and this doesn't have a Post.template.php file. Does this matter? If it does, how do I work around it?
Title: Re: Spoiler Show & Hide
Post by: ameo on February 08, 2009, 02:35:32 PM
It clearly says in path, that it is word about defaul theme.  Only default theme has Post.template.php. Others don't.
Title: Re: Spoiler Show & Hide
Post by: Brandimer on February 20, 2009, 11:50:54 PM
Greatings

NICE MOD!! veri compatible :)

but I have this error (attached in this post), the spoiler button has no label and I dont know how to fix it

thanks in advance

Brandimer OUT...

Title: Re: Spoiler Show & Hide
Post by: ameo on February 21, 2009, 03:46:04 PM
Brandimer - make sure that in your Modifications.spanish.php file - which is located in

Themes/default/languages is this text:

$txt['spoiler_posting'] = 'Spoiler - ocultar el contenido';
$txt['spoiler_show'] = 'Mostrar contenido oculto (spoiler)';
$txt['spoiler_hide'] = 'Ocultar este contenido (spoiler)';


If it isn't just copy it inside of file.
Title: Re: Spoiler Show & Hide
Post by: SurrealKilla on February 22, 2009, 08:58:58 AM
This is an awesome mod and is perfect for my site.  Great work! :D
Title: Re: Spoiler Show & Hide
Post by: blanix on April 15, 2009, 09:03:16 PM
hi all

any idea to hide the spoiler fully for guests ?


thx
Title: Re: Spoiler Show & Hide
Post by: dembow on May 31, 2009, 06:46:07 PM
hi,

how do i add the spoiler button to the quick reply?

thanks in advance
Title: Re: Spoiler Show & Hide
Post by: pccinu on August 09, 2009, 03:30:20 PM
Sorry to bother you. Does this mod work in version 1.10 of SMF?
Title: Re: Spoiler Show & Hide
Post by: ameo on August 10, 2009, 10:25:37 AM
yes. I tested it and it works fine.
Title: Re: Spoiler Show & Hide
Post by: pccinu on August 10, 2009, 03:04:24 PM
Quote from: ameo on August 10, 2009, 10:25:37 AM
yes. I tested it and it works fine.

Thank you so much
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 19, 2009, 10:36:34 PM
I'm using SMF 1.1.10. The only other mod installed is a smiley mod. The tag itself works but no button shows on the post screen. I'm using the Reflection theme and added the code to the CSS and also added the spoiler button to my Reflection/images/bcc folder.

I've seen a few people say they don't see the button in the post area but I haven't seen any replies telling how to make it show.
Title: Re: Spoiler Show & Hide
Post by: ameo on August 20, 2009, 12:27:40 PM
In that case, if you did everything right, and did refresh with ctrl+f5 which empties cache, and it still isn't shown, it's very wierd.
It really should show if image is there where you said it is, and if image is named spoiler.gif.
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 20, 2009, 01:36:51 PM
Then I must have done something wrong because I just quadruple-checked and the spoiler.gif is definitely located in Reflection/images/bcc and even accessing the forum from a computer I've never used to access it before, no spoiler button shows on the post form.

I uploaded the zipped mod through the Package Manager, installed it and got the "everything's fine" message, made the recommended change to the CSS for the Reflection theme, and copied spoiler.gif to the correct place. (I don't think I've left out anything I did)

I also tried using the default theme and the spoiler.gif image doesn't show there either, although it is properly located in the image/bbc folder for it. Is there perhaps a step I've missed and this is causing the problem?
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 23, 2009, 05:02:12 PM
I would really like to know how to make the BBC button show on post pages for this mod. The tag works but no button on the theme I'm using or the default theme.
Title: Re: Spoiler Show & Hide
Post by: ameo on August 24, 2009, 09:09:19 AM
Kyrna if it's not to much trouble I'd like to see your forum. Link it. Who knows, maybe I'll figure it out if I see it.
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 24, 2009, 02:10:27 PM
It's Off-Topic (http://karynsplace.net/simplemachinesforum/index.php). I'm not sure what you can tell from just seeing the forum but who knows, you just might. :)
Title: Re: Spoiler Show & Hide
Post by: ameo on August 24, 2009, 02:46:39 PM
http://karynsplace.net/simplemachinesforum/Themes/Reflection/images/bbc/spoiler.gif

spoiler image is missing. you didn't upload it correctly in your current theme. if you did it would show on clicking the link.
you must do that through FTP or cPanel.
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 24, 2009, 06:08:14 PM
Quote from: ameo on August 24, 2009, 02:46:39 PM
http://karynsplace.net/simplemachinesforum/Themes/Reflection/images/bbc/spoiler.gif

spoiler image is missing. you didn't upload it correctly in your current theme. if you did it would show on clicking the link.
you must do that through FTP or cPanel.
Actually, I did. I just forgot to re-upload it after I couldn't get the other spoiler mod to even install. It's in there now - and still not showing up in the post form.
Title: Re: Spoiler Show & Hide
Post by: ameo on August 25, 2009, 08:21:21 AM
Did you enable it?

In admin panel - under Posts and Topics - Bulletin Board Code - make sure spoiler is checked!
Title: Re: Spoiler Show & Hide
Post by: Kyrna on August 25, 2009, 10:41:28 AM
Quote from: ameo on August 25, 2009, 08:21:21 AM
Did you enable it?

In admin panel - under Posts and Topics - Bulletin Board Code - make sure spoiler is checked!
It is checked - and has been from the start. I never even knew to look there but it's checked.
Title: Re: Spoiler Show & Hide
Post by: bbmtalk on August 25, 2009, 02:11:14 PM
Try to parse this mod but got an error message

An Error Has Occurred!
Sorry, but the modification could not be parsed.

Is SMF site not working correctly?
Title: Re: Spoiler Show & Hide
Post by: _sebas_ on September 04, 2009, 11:17:56 PM
very nice mod

   

Is it possible to have the button does not work for guest?

???

Title: Re: Spoiler Show & Hide
Post by: littleone on November 10, 2009, 01:07:09 PM
smf 2.0?
Title: Re: Spoiler Show & Hide
Post by: nax on December 24, 2009, 06:34:02 AM
I also would love to see this as a mod for SMF 2.0
Title: Re: Spoiler Show & Hide
Post by: KensonPlays on December 25, 2009, 03:43:24 AM
ditto!!!!!
Title: Re: Spoiler Show & Hide
Post by: allymcbeal on March 16, 2010, 08:24:52 AM
Hi, I have a problem. A user of mine, says that if she watch spoiler with IPhone she can't see the message under the spoiler.
Have you any suggestion?
Title: Re: Spoiler Show & Hide
Post by: _sebas_ on July 24, 2010, 12:58:16 PM
Any idea for the contents of the spoiler is not indexed in google?
Title: Re: Spoiler Show & Hide
Post by: Apllicmz on January 15, 2011, 11:33:29 PM
when update dont forget Update portuguese

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
/* Spoiler Show & Hide */
$txt['spoiler_posting'] = 'Spoiler';
$txt['spoiler_show'] = 'Mostrar Spoiler';
$txt['spoiler_hide'] = 'Esconder Spoiler';
/* EMD Spoiler Show & Hide */]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
/* Spoiler Show & Hide */
$txt['spoiler_posting'] = 'Spoiler';
$txt['spoiler_show'] = 'Mostrar Spoiler';
$txt['spoiler_hide'] = 'Esconder Spoiler';
/* EMD Spoiler Show & Hide */]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
/* Spoiler Show & Hide */
$txt['spoiler_posting'] = 'Spoiler';
$txt['spoiler_show'] = 'Mostrar Spoiler';
$txt['spoiler_hide'] = 'Esconder Spoiler';
/* EMD Spoiler Show & Hide */]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
/* Spoiler Show & Hide */
$txt['spoiler_posting'] = 'Spoiler';
$txt['spoiler_show'] = 'Mostrar Spoiler';
$txt['spoiler_hide'] = 'Esconder Spoiler';
/* EMD Spoiler Show & Hide */]]></add>
        </operation>
    </file>
Title: Re: Spoiler Show & Hide
Post by: becometa on January 29, 2011, 04:35:40 PM
When we'll use the fast edit option, all [spoiler] tags disappear, but when we'll again use rich editor and save your work, everythings work fine.

Anyway, this [spoiler] mod make my day  ;)