Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: William L on January 10, 2010, 12:33:37 PM

Title: Spoiler BBCODE v1.1.1
Post by: William L on January 10, 2010, 12:33:37 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2330)


Spoiler BBCODE v1.1.1

Demo (http://forum.himsi-ubm.com/index.php/topic,209.0.html)

Compatibility
For SMF 1.1.x
For SMF 2.0 RC2

Description
This mod adds a new bbcode tag that'll hide what you wrap with it. It works with text and images. Clicking on the spoiler link, reveals the block. You can optionally add a text to the link too, ie: [spoiler=My Title]Spoiler goes here[/spoiler].

Translation
Quote from: Bugo on January 15, 2010, 06:34:21 AM
Russian translation:

// Spoiler
$txt['spoiler'] = 'Спойлер';
$txt['spoiler_default_for'] = 'Заголовок';
$txt['spoiler_for'] = '';
$txt['spoiler_hide_button'] = 'Скрыть';
$txt['spoiler_show_button'] = 'Показать';


Screnshot
SMF : 1.1.11
(http://img192.imageshack.us/img192/6950/spoilerz.png)

SMF : 2.0 RC2
(http://img257.imageshack.us/img257/1017/ssspoiler2.png)

Donation


(https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif) (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=Y9RYC29FXQDME&lc=ID&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)

If you like my modification packages, please donate to support their continued development.
Any amount will be greatly appreciated. Thank you!
Title: Re: Spoiler BBCODE v1.1.1
Post by: JBlaze on January 10, 2010, 12:34:11 PM
Congrats on your approved mod!
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on January 11, 2010, 04:20:56 AM
Quote from: JBlaze on January 10, 2010, 12:34:11 PM
Congrats on your approved mod!

Thx...  ;D
Title: Re: Spoiler BBCODE v1.1.1
Post by: Bugo on January 15, 2010, 06:34:21 AM
Russian translation:

// Spoiler
$txt['spoiler'] = 'Спойлер';
$txt['spoiler_default_for'] = 'Заголовок';
$txt['spoiler_for'] = '';
$txt['spoiler_hide_button'] = 'Скрыть';
$txt['spoiler_show_button'] = 'Показать';
Title: Re: Spoiler BBCODE v1.1.1
Post by: Lia Sophie on January 15, 2010, 05:20:30 PM
Thanks a lot for this mod, I just installes it on my german forum (1.1.11) and it works fine.
The only thing is, that I don't know what german word I have to put in here ---->
$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'Hiden';
$txt['spoiler_for'] = 'for';
$txt['spoiler_hide_button'] = 'Hide';
$txt['spoiler_show_button'] = 'Show';

for the english one.
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on January 16, 2010, 06:10:36 AM
Quote from: Lia Sophie on January 15, 2010, 05:20:30 PM
Thanks a lot for this mod, I just installes it on my german forum (1.1.11) and it works fine.
The only thing is, that I don't know what german word I have to put in here ---->
$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'Hiden';
$txt['spoiler_for'] = 'for';
$txt['spoiler_hide_button'] = 'Hide';
$txt['spoiler_show_button'] = 'Show';

for the english one.

Heheheh... sorry, my english not good....
Hidden = verborgen

;D
Title: Re: Spoiler BBCODE v1.1.1
Post by: Bugo on January 16, 2010, 10:11:36 AM
Quote from: Lia Sophie on January 15, 2010, 05:20:30 PM
Thanks a lot for this mod, I just installes it on my german forum (1.1.11) and it works fine.
The only thing is, that I don't know what german word I have to put in here ---->
$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'Hiden';
$txt['spoiler_for'] = 'for';
$txt['spoiler_hide_button'] = 'Hide';
$txt['spoiler_show_button'] = 'Show';

for the english one.

$txt['spoiler_default_for'] = 'Verdeckt';
Although this word can not even translate :) ($txt['spoiler_default_for'] = '')
Title: Re: Spoiler BBCODE v1.1.1
Post by: Darthx on January 17, 2010, 09:41:55 PM
sorry to ask, but why didn't you tried to contribute and improve this project (http://custom.simplemachines.org/mods/index.php?mod=195), since its very similar. You could try to contact the author and join forces together.

just wondering  ::)
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on January 18, 2010, 07:11:30 AM
Quote from: Darthx on January 17, 2010, 09:41:55 PM
sorry to ask, but why didn't you tried to contribute and improve this project (http://custom.simplemachines.org/mods/index.php?mod=195), since its very similar. You could try to contact the author and join forces together.

just wondering  ::)
Because I just wanted to make something different for the SMF, and anyway I do not speak English very well, I was just using google tranlator to communicate with you ;D
Title: Re: Spoiler BBCODE v1.1.1
Post by: Darthx on January 20, 2010, 09:24:41 PM
Quote from: William L on January 18, 2010, 07:11:30 AM
Because I just wanted to make something different for the SMF, and anyway I do not speak English very well, I was just using google tranlator to communicate with you ;D
)
Seems similar to me...
and about your English, that's not an excuse. ;)

Portuguese (European and Brazilian) translation:

Quote
$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'Escondido';
$txt['spoiler_for'] = '-';
$txt['spoiler_hide_button'] = 'Esconder';
$txt['spoiler_show_button'] = 'Mostrar';

Btw, "Spoil for [title] hidden" doesn't sound well, at least for me. Try change it for a dash (-) like i did in the translation.
(I know that you mean something like "spoil for [movie/game/story]" but there are more subjects and uses for the spoiler tag that "for" do not fit in)
Title: Re: Spoiler BBCODE v1.1.1
Post by: Lia Sophie on January 25, 2010, 07:17:24 PM
Hy there, it's me again.
Thanks for helping with the translation. I have another question today.
My Board shows me this:
8: Undefined index: spoiler_for
Datei: /var/www/web454/html/Sources/Subs.php
Zeile: 1646
and this:
8: Undefined index: spoiler_for
Datei: /var/www/web454/html/Sources/Subs.php
Zeile: 1640
always! What does this mean, and how can I "repair" this?

The Code for this
array(
'tag' => 'spoiler',
'before' => '<div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px"><b>' . $txt['spoiler'] . '</b> ' . $txt['spoiler_for'] . ' <i>' . $txt['spoiler_default_for'] . '</i>: <input type="button" value="' . $txt['spoiler_show_button'] . '" style="width:60px;font-size:10px;margin:0px;padding:0px;" 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_button]'" . '; } else { this.parentNode.parentNode.getElementsByTagName(' . "'div'" . ')[1].getElementsByTagName(' . "'div'" . ')[0].style.display = ' . "'none'" . '; this.innerText = ' . "''" . '; this.value = ' . "'$txt[spoiler_show_button]'" . '; }"></div><div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">',
'after' => '</div></div></div>',
            ),
array(
'tag' => 'spoiler',
'type' => 'unparsed_equals',
'before' => '<div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px"><b>' . $txt['spoiler'] . '</b> ' . $txt['spoiler_for'] .' <i>$1</i>: <input type="button" value="' . $txt['spoiler_show_button'] . '" style="width:60px;font-size:10px;margin:0px;padding:0px;" 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_button]'" . '; } else { this.parentNode.parentNode.getElementsByTagName(' . "'div'" . ')[1].getElementsByTagName(' . "'div'" . ')[0].style.display = ' . "'none'" . '; this.innerText = ' . "''" . '; this.value = ' . "'$txt[spoiler_show_button]'" . '; }"></div><div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">',
'after' => '</div></div></div>',
            ),

);


the "before" is "Zeile" 1640 und Zeile 1646

Hope anyone can help me with this. Thanks
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on January 26, 2010, 01:11:33 PM
I think This is because you do not define $ txt [ 'spoiler_for'] in your language file
Title: Re: Spoiler BBCODE v1.1.1
Post by: Lia Sophie on January 26, 2010, 11:02:52 PM
Quote from: William L on January 26, 2010, 01:11:33 PM
I think This is because you do not define $ txt [ 'spoiler_for'] in your language file
Hy William L
can you please tell me what I have to do? I'm not very good at this.



Title: Re: Spoiler BBCODE v1.1.1
Post by: Lia Sophie on January 26, 2010, 11:22:25 PM
I think I got it now
I erased this $ txt [ 'spoiler_for']  when I installed this mod. Now I put it in again like this
$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'zum spickeln';
$txt['spoiler_for'] = ' ';
$txt['spoiler_hide_button'] = '-';
$txt['spoiler_show_button'] = 'klick';

and there are no more such messages.

Great! Thanks for the hint!   :-*
Title: Re: Spoiler BBCODE v1.1.1
Post by: FragaCampos on February 23, 2010, 07:03:19 PM
Thanks for the mod William L, it works fine, but there's one "problem"... it doesn't work with code and quote tags inside...

Can you make this possible?
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on February 24, 2010, 09:56:25 AM
Quote from: FragaCampos on February 23, 2010, 07:03:19 PM
Thanks for the mod William L, it works fine, but there's one "problem"... it doesn't work with code and quote tags inside...

Can you make this possible?

Okay thanks for your report.

I want to upgrade my mood Soon :)

Sorry my english not good >,<

To Fix This problem, please upgrade your mod Spoiler BBCODE v1.1.2 (http://custom.simplemachines.org/mods/index.php?mod=2330)
Title: Re: Spoiler BBCODE v1.1.1
Post by: FragaCampos on February 24, 2010, 08:43:44 PM
Great! It works 8)

Thanks a lot William L!
Title: Re: Spoiler BBCODE v1.1.1
Post by: Membre on February 25, 2010, 04:18:37 AM
Spanish_es / Spanish_latin / Spanish ( add utf8 also please :) )

$txt['spoiler'] = 'Spoiler';
$txt['spoiler_default_for'] = 'Escondido';
$txt['spoiler_for'] = '-';
$txt['spoiler_hide_button'] = 'Esconder';
$txt['spoiler_show_button'] = 'Mostrar';
Title: Re: Spoiler BBCODE v1.1.1
Post by: tanshin on March 15, 2010, 09:34:57 AM
Hi there, do you know how this works in RC3?
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on March 16, 2010, 03:55:59 AM
Quote from: tanshin on March 15, 2010, 09:34:57 AM
Hi there, do you know how this works in RC3?

This mod Now work For SMF 2.0 RC3
http://custom.simplemachines.org/mods/index.php?mod=2330
Title: Re: Spoiler BBCODE v1.1.1
Post by: tanshin on March 16, 2010, 04:53:22 PM
Thanks! I will try this when I get a chance.
Title: Re: Spoiler BBCODE v1.1.1
Post by: MATTEK on April 25, 2010, 08:39:19 PM
Great mod!!

But is there any way to get rid of that thing?  :P
Title: Re: Spoiler BBCODE v1.1.1
Post by: retrib on June 17, 2010, 09:19:50 AM
Good day! I've got a problem with your tag on SMF 2.0 RC3. If someone in some place of post put spoiler with quote tag inside it, 'url' and 'img' (maybe some other tags, this is just what 've found) works kind of strange. Images are replaced with () - empty brackets etc.

The only way to solve this by now was add 'disallow_children' => 'quote',

I hope some of you guys can offer me a better solution  :)

P.S. You shold update first post with current version  :o
Title: Re: Spoiler BBCODE v1.1.1
Post by: retrib on June 17, 2010, 06:02:24 PM
GUYS!111 Help me please!
Title: Re: Spoiler BBCODE v1.1.1
Post by: Gryzor on August 06, 2010, 03:07:08 AM
Hello!

Is this project dead? :(

Two things: as others mentions, "spoiler for hiden" means pretty much nothing (and it's misspelled :D ). Also, in my installation, although manual tag insertion works, the button does not appear! Can someone help me install it manually?

Cheers
Gryzor
Title: Re: Spoiler BBCODE v1.1.1
Post by: clixo on August 15, 2010, 01:28:52 PM
bro william :)

mo tanya
ini mod spoiler nya ga bisa buat hide quote n code yah :)

ada solusi ga?

(http://i33.tinypic.com/2zxro91.jpg)

terimakasih :)

masih pake SMF 1.1.11
Title: Re: Spoiler BBCODE v1.1.1
Post by: clixo on August 15, 2010, 01:47:56 PM
Quote from: clixo on August 15, 2010, 01:28:52 PM
bro william :)

mo tanya
ini mod spoiler nya ga bisa buat hide quote n code yah :)

ada solusi ga?

(http://i33.tinypic.com/2zxro91.jpg)

terimakasih :)

masih pake SMF 1.1.11

maaf...problem solve :)

masih pake Spoiler BBCODE v1.1.1

gataunya udah update Spoiler BBCODE v1.1.3 ^^

;D
Title: Re: Spoiler BBCODE v1.1.1
Post by: Kurakama on November 04, 2010, 02:28:54 PM
RC4?
Title: Re: Spoiler BBCODE v1.1.1
Post by: MaXiForum.cz on November 18, 2010, 02:39:56 PM
Quote from: Kurakama on November 04, 2010, 02:28:54 PM
RC4?

It works ;)
Title: Re: Spoiler BBCODE v1.1.1
Post by: KensonPlays on January 27, 2011, 11:20:41 AM
Even though it works with rc4, OFFICIAL support would be nice, please. Thanks.
Title: Re: Spoiler BBCODE v1.1.1
Post by: Hasanudin on September 10, 2011, 04:38:13 PM
thx bro,.. matur suwun alias terimakasih.

work fine for 2.0 Gold!
Title: Re: Spoiler BBCODE v1.1.1
Post by: Grosraisin on November 03, 2011, 02:46:53 PM
Hi,

I allowed myself to change your mod in my opinion because it was the cleanest and most simple.

*New look
*Code cleanup
*Only SMF 2.0

Edite: Suppression du mod :/
Title: Re: Spoiler BBCODE v1.1.1
Post by: PopsicleStickChick on August 29, 2012, 08:04:55 AM
Love this mod.  Can "hiden" be changed to "hidden"?
Title: Re: Spoiler BBCODE v1.1.1
Post by: William L on May 02, 2013, 04:29:51 AM
Quote from: PopsicleStickChick on August 29, 2012, 08:04:55 AM
Love this mod.  Can "hiden" be changed to "hidden"?

You can do it by change the Package XML :)
Title: Re: Spoiler BBCODE v1.1.1
Post by: palmdoc on June 08, 2019, 12:39:55 AM
Wow like many things this thread is old.
Nevertheless giving it a try
I really like this mod but can't get it to work with SMFMobiletheme

I am trying to "add before "  /Themes/SMFMobileThemeBrandFree/css/index.css

For 2.0.15 which is what I am using it says

/Themes/default/css/index.css
Find: [Select]
a:link
Add Before: [Select]
.alt2
{
background: #E1E4F2;
color: #000000;
}
.button
{
font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.smallfont
{
font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}


But as I can't find a:link, I put the code at the top of the CSS file like so.

/** SPoiler BBC Mod
*/
.alt2
{
background: #E1E4F2;
color: #000000;
}
.button
{
font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.smallfont
{
font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
/** SPoiler BBC Mod
*/

.inner{
text-overflow: clip;
overflow: visible;
white-space: normal!important;
}
.inner img, .attachments img{
max-width: 95%;
height: auto;
}

/* Make the reCAPTCHA dialog centered to match the positioning of the built-in verification */
.g-recaptcha div div
{
Title: Re: Spoiler BBCODE v1.1.1
Post by: KittyGalore on February 27, 2022, 08:53:16 AM
Can this mod be updated for 2.1
Title: Re: Spoiler BBCODE v1.1.1
Post by: Diego Andrés on February 27, 2022, 11:19:10 AM
There are at least 2 spoiler mods for SMF 2.1 in case you don't mind just using other options
Title: Re: Spoiler BBCODE v1.1.1
Post by: Arantor on February 27, 2022, 11:52:32 AM
What attitude? He's just saying there are alternatives on offer, given that you're otherwise asking for an 11 year old mod to be updated given that the author hasn't been online in over 8 years and that it might not be worth waiting around for an update.

Also, please remember not everyone here is English as first language so what you interpret as attitude might simply be... not.
Title: Re: Spoiler BBCODE v1.1.1
Post by: Aleksi "Lex" Kilpinen on February 27, 2022, 12:07:52 PM
Quote from: KittyGalore on February 27, 2022, 12:02:09 PMFor a start off i'm fully aware of the other spoiler mods i didn't post here to be told there was other mods and to be told to use them.
Unless I have completely lost my command of the English language, absolutely no one told you to do anything. It was a suggestion, a note for you, that there are options in case you weren't aware.