News:

Wondering if this will always be free?  See why free is better.

Main Menu

Spoiler Tag

Started by AzaToth, September 20, 2005, 11:37:42 PM

Previous topic - Next topic

talk-zones

I'm not sure why the permissions aren't working for you.

I haven't had any problem with this mod other than I wanted the spoilers button to always show in posts but not to give access to the spoiler for membergroups without permission rather than just hiding the entry entirely.

Chucky

Any way to just simply add this into Subs.php as BBC code without changing any other files and not bothering with permissions?

talk-zones

You could try replacing
if(!allowedTo('spoiler_show'))
return '';


with

if(!allowedTo('spoiler_show')) {
$retval = (
'<div class="spoiler"><div class="spoilerheader">'.
'<input type="button" class="spoilerbutton" value="'.$txt['spoiler_tag_text'].$topic.'" '.
'onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == \'none\') {n.style.display = \'block\';} else {n.style.display = \'none\';} return false;"/> '.
$txt['spoiler_tag_click_info'].'</div><div class="spoilerbody" style="display: none">'.
$content.'</div></div>'
);
return $retval;
}


Bit of a brutal hack but that should give you the button with access to the spoiler text regarless of permissions.

Chucky

#303
Tried, seemed to mess up the page big time, I reverted back to the original code and the page doesn't even show the entire first post of any topic.

ARGH! HELP!

Tuzaboy

#304
I have this problem too my forum is 1.1.2
I not can see permissions
http://img526.imageshack.us/img526/4448/postgj1.jpg

Crawler

I want to install the latest Version 0.3.2 on SMF 1.1.2 (the default-language is german) and befor applying the modification I get an error for ./Themes/default/languages/index.german.php - any idea what the problem might be?

mysterious

I seem to be having a problem with this mod that I haven't seen addressed (and if it has been, I'm sorry, but a search didn't bring it up). It's writing the following into the database whenever anyone saves/modifies their posts:

<span style="font-size : 0.9em;"><strong>Spoiler:</strong></span><div class="spoiler">(the spoiler text)</div>

which is resulting in the spoiler text showing up completely exposed in posts like so:

QuoteSpoiler:
(the spoiler text)

rather than being hidden in a spoiler box in any way no matter whether I try the fieldOnHoverShow, linkOnClickShowHide, or buttonOnClickShowHide setting.

Interestingly, though, spoilers which had been written to the database in the form:

[spoiler](the spoiler text)[/spoiler]

by a spoiler feature that I'd written myself for YaBB SE/SMF 1.0 (but have since removed) are showing up and displaying correctly in posts with this mod with every one of its three settings (well, so long as no one modifies the posts they appear in - then they're changed into the form I've cited in the first code example above).

Is there some setting I'm missing out on activating?


CyberKate

Hi everyone !

I've installed the Spoiler Tag but only Admins can use it... I don't understand because I've set the permissions about the spoiler tag to everyone.

Users have got this message :
QuoteAn Error Has Occurred!
Sorry - you don't have the proper permissions to post spoilers.

Can you help me to solve this ?
Thanks in advance !

Tuzaboy

Quote from: talk-zones on May 08, 2007, 06:41:44 AM
You could try replacing
if(!allowedTo('spoiler_show'))
return '';


with

if(!allowedTo('spoiler_show')) {
$retval = (
'<div class="spoiler"><div class="spoilerheader">'.
'<input type="button" class="spoilerbutton" value="'.$txt['spoiler_tag_text'].$topic.'" '.
'onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == \'none\') {n.style.display = \'block\';} else {n.style.display = \'none\';} return false;"/> '.
$txt['spoiler_tag_click_info'].'</div><div class="spoilerbody" style="display: none">'.
$content.'</div></div>'
);
return $retval;
}


Bit of a brutal hack but that should give you the button with access to the spoiler text regarless of permissions.


ooh this work thanks , but only a type of spoiler

tensai

Hello... I have installed the new version of spoiler tag 0.3.2 and SMF 1.1.2... I have already set the spoiler tag option to "buttonOnClickShowHide" but when I try it the button won't appear.. Only the text "Spoiler(click to show/hide) appears... Have I done something wrong in my configuration?!?

mironicus

Quote from: Crawler on May 11, 2007, 01:56:25 PM
I want to install the latest Version 0.3.2 on SMF 1.1.2 (the default-language is german) and befor applying the modification I get an error for ./Themes/default/languages/index.german.php - any idea what the problem might be?

I have exactly the same problem! :(

Icedmetal57

Well for me, it's installing and all, the latest version, 0.3.2 on SMF 1.1.2, but no matter what setting I choose, Hover, Button, or Link, it'll be Hover, I'm not sure why. I've looked around the coding a bit, and can't figure it out, mainly because I don't know PHP, but I think I would've seen something at least. Any ideas as to why I'd be having this problem?

Nifelhein

There are two settings for the spoiler mad, one is in the features and options page, where you set the default type for the boards, and then you have to the Current Theme page and set the type for the theme being used at the time. That did the trick for me.

Tuzaboy

but it is can in 1.1.2?  ::)

Icedmetal57

Ah, forgot about that one, thanks. I'm surprised I didn't find that yet. I hadn't updated the spoilers mod since like November, so I forgot how to set it up.

Nifelhein

Quote from: Greg425 on April 25, 2007, 02:21:31 PM
that is the version i was trying to install :( as i said i am new to the whole PHP coding so don't know if I will be able to install it or not...i would really like to have it though...I get the same message with the bible tag mod as well...think it is a manual install anyway though...

I think I found your problem, i got it on a new server i am starting a website in, try opening the file and extracting the contents on your local computer, then make them into a zip file instead of the one it is now. Did the trick for me. :D

Quote from: Crawler on May 11, 2007, 01:56:25 PM
I want to install the latest Version 0.3.2 on SMF 1.1.2 (the default-language is german) and befor applying the modification I get an error for ./Themes/default/languages/index.german.php - any idea what the problem might be?

I am not sure, maybe it cannot find the right line to change because it is in german and do not match the search it is making.

[Dark.Shadow]

nice mod! i use it in my forum now, only the translation to my language (spanish) is real bad xD (it says thing with no sense -.-) i translated it myself n_n anyways, is there any way you could make it so that you could put spoilers in the signatures? zi saw the spoiler mod for ipb and it did that, and i tried with yours and it couldn't :( but real good mod anyways ;)

sandochan

I can't use "spoiler(s) in spoiler" >_< ?

Savage Sully

Since 1.1.3 is out now, will someone upgrade the mod? I would but I lack the skill and I have no time to learn it atm.
But I would highly appreciate a compatible mod.

Cheers

Sully

Joel-san

Quote from: Savage Sully on June 28, 2007, 01:40:02 PM
Since 1.1.3 is out now, will someone upgrade the mod? I would but I lack the skill and I have no time to learn it atm.
But I would highly appreciate a compatible mod.
I did an unofficial upgrade. Should work fine but backup your files just in case.

Advertisement: