• Welcome to Simple Machines Community Forum. Please login or sign up.
November 28, 2021, 06:13:15 AM

News:

Join the Facebook Fan Page.


Spoiler Show & Hide

Started by ciberwing, February 05, 2008, 12:25:19 AM

Previous topic - Next topic

pinoypetfinder

thanks goatie, will check it out :)

pinoypetfinder

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

Goatie

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.

pinoypetfinder

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 :)

Goatie

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.

pinoypetfinder

ooh okay.. still, thanks for trying out. i appreciate it :)

Paranoimia

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?

ameo

It clearly says in path, that it is word about defaul theme.  Only default theme has Post.template.php. Others don't.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Brandimer

February 20, 2009, 11:50:54 PM #48 Last Edit: February 20, 2009, 11:53:37 PM by Brandimer
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...


ameo

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.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

SurrealKilla

This is an awesome mod and is perfect for my site.  Great work! :D

blanix

hi all

any idea to hide the spoiler fully for guests ?


thx
My SMF: 1.1.9

dembow

hi,

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

thanks in advance

pccinu

Sorry to bother you. Does this mod work in version 1.10 of SMF?

ameo

yes. I tested it and it works fine.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

pccinu


Kyrna

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.

ameo

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.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Kyrna

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?

Kyrna

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.

Advertisement: