Advertisement:

Author Topic: Spoiler BBCODE v1.1.1  (Read 16706 times)

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Spoiler BBCODE v1.1.1
« on: January 10, 2010, 12:33:37 PM »
Link to Mod


Spoiler BBCODE v1.1.1

Demo

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
Russian translation:

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

Screnshot
SMF : 1.1.11


SMF : 2.0 RC2


Donation

If you like my modification packages, please donate to support their continued development.
Any amount will be greatly appreciated. Thank you!
« Last Edit: January 16, 2010, 09:41:55 PM by William L »
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline zilladotexe

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,203
  • Gender: Male
    • zilladotexe on GitHub
    • @zilladotexe on Twitter
    • XboxLeaders.com
Re: Spoiler BBCODE v1.1.1
« Reply #1 on: January 10, 2010, 12:34:11 PM »
Congrats on your approved mod!
zilladotexe
Formerly known as "JBlaze"
Former Support & Customization     
Professional Bug Creator
Current Projects     
Xbox LIVE API
SM Classifieds
SimpleXBL
Important Links
Please, no PMs for support.
Unmanaged VPS Starting at $20/mo

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #2 on: January 11, 2010, 04:20:56 AM »
Congrats on your approved mod!

Thx...  ;D
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,446
  • Gender: Male
    • @dragomano on Twitter
    • Review & translation for SMF mods
Re: Spoiler BBCODE v1.1.1
« Reply #3 on: January 15, 2010, 06:34:21 AM »
Russian translation:

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

Offline Lia Sophie

  • Semi-Newbie
  • *
  • Posts: 14
Re: Spoiler BBCODE v1.1.1
« Reply #4 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.

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #5 on: January 16, 2010, 06:10:36 AM »
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
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,446
  • Gender: Male
    • @dragomano on Twitter
    • Review & translation for SMF mods
Re: Spoiler BBCODE v1.1.1
« Reply #6 on: January 16, 2010, 10:11:36 AM »
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.

Code: [Select]
$txt['spoiler_default_for'] = 'Verdeckt';Although this word can not even translate :) ($txt['spoiler_default_for'] = '')

Offline Darthx

  • Semi-Newbie
  • *
  • Posts: 13
Re: Spoiler BBCODE v1.1.1
« Reply #7 on: January 17, 2010, 09:41:55 PM »
sorry to ask, but why didn't you tried to contribute and improve this project, since its very similar. You could try to contact the author and join forces together.

just wondering  ::)

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #8 on: January 18, 2010, 07:11:30 AM »
sorry to ask, but why didn't you tried to contribute and improve this project, 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
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline Darthx

  • Semi-Newbie
  • *
  • Posts: 13
Re: Spoiler BBCODE v1.1.1
« Reply #9 on: January 20, 2010, 09:24:41 PM »
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)

Offline Lia Sophie

  • Semi-Newbie
  • *
  • Posts: 14
Re: Spoiler BBCODE v1.1.1
« Reply #10 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
Code: [Select]
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

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #11 on: January 26, 2010, 01:11:33 PM »
I think This is because you do not define $ txt [ 'spoiler_for'] in your language file
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline Lia Sophie

  • Semi-Newbie
  • *
  • Posts: 14
Re: Spoiler BBCODE v1.1.1
« Reply #12 on: January 26, 2010, 11:02:52 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.



« Last Edit: January 26, 2010, 11:22:15 PM by Lia Sophie »

Offline Lia Sophie

  • Semi-Newbie
  • *
  • Posts: 14
Re: Spoiler BBCODE v1.1.1
« Reply #13 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
Code: [Select]
$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!   :-*

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,153
  • Gender: Male
    • docsPT
Re: Spoiler BBCODE v1.1.1
« Reply #14 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?

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #15 on: February 24, 2010, 09:56:25 AM »
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
« Last Edit: February 24, 2010, 10:16:59 AM by William L »
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,153
  • Gender: Male
    • docsPT
Re: Spoiler BBCODE v1.1.1
« Reply #16 on: February 24, 2010, 08:43:44 PM »
Great! It works 8)

Thanks a lot William L!

Offline Membre

  • Semi-Newbie
  • *
  • Posts: 32
Re: Spoiler BBCODE v1.1.1
« Reply #17 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';

Offline tanshin

  • Jr. Member
  • **
  • Posts: 111
    • Nintendo Addict
Re: Spoiler BBCODE v1.1.1
« Reply #18 on: March 15, 2010, 09:34:57 AM »
Hi there, do you know how this works in RC3?

Offline William L

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • HiMSI - UBM
Re: Spoiler BBCODE v1.1.1
« Reply #19 on: March 16, 2010, 03:55:59 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
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]