Advertisement:

Author Topic: Spoiler Tag  (Read 335942 times)

Offline talk-zones

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • Talk-Zones Webmaster
    • Talk-Zones
Re: Spoiler Tag
« Reply #300 on: May 08, 2007, 05:56:14 AM »
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.

Offline Chucky

  • Jr. Member
  • **
  • Posts: 123
Re: Spoiler Tag
« Reply #301 on: May 08, 2007, 06:11:01 AM »
Any way to just simply add this into Subs.php as BBC code without changing any other files and not bothering with permissions?

Offline talk-zones

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • Talk-Zones Webmaster
    • Talk-Zones
Re: Spoiler Tag
« Reply #302 on: May 08, 2007, 06:41:44 AM »
You could try replacing
Code: [Select]
if(!allowedTo('spoiler_show'))
return '';

with
Code: [Select]
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.

Offline Chucky

  • Jr. Member
  • **
  • Posts: 123
Re: Spoiler Tag
« Reply #303 on: May 08, 2007, 07:35:02 AM »
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!
« Last Edit: May 08, 2007, 07:38:07 AM by Chucky »

Offline Tuzaboy

  • Jr. Member
  • **
  • Posts: 241
Re: Spoiler Tag
« Reply #304 on: May 10, 2007, 01:32:06 PM »
I have this problem too my forum is 1.1.2
I not can see permissions
http://img526.imageshack.us/img526/4448/postgj1.jpg
« Last Edit: May 10, 2007, 01:34:20 PM by edgart »

Offline Crawler

  • Semi-Newbie
  • *
  • Posts: 22
Re: Spoiler Tag
« Reply #305 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?

Offline mysterious

  • Semi-Newbie
  • *
  • Posts: 10
  • Gender: Male
Re: Spoiler Tag
« Reply #306 on: May 16, 2007, 02:43:29 AM »
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:

Code: [Select]
<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:

Quote
Spoiler:
(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:

Code: [Select]
[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?


Offline CyberKate

  • Newbie
  • *
  • Posts: 1
Re: Spoiler Tag
« Reply #307 on: May 18, 2007, 02:37:01 PM »
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 :
Quote
An Error Has Occurred!
Sorry - you don't have the proper permissions to post spoilers.

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

Offline Tuzaboy

  • Jr. Member
  • **
  • Posts: 241
Re: Spoiler Tag
« Reply #308 on: May 18, 2007, 06:32:04 PM »
You could try replacing
Code: [Select]
if(!allowedTo('spoiler_show'))
return '';

with
Code: [Select]
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

Offline tensai

  • Newbie
  • *
  • Posts: 8
Re: Spoiler Tag
« Reply #309 on: May 19, 2007, 12:55:33 AM »
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?!?

Offline mironicus

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
Re: Spoiler Tag
« Reply #310 on: May 22, 2007, 07:41:25 AM »
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! :(

Offline Icedmetal57

  • Newbie
  • *
  • Posts: 2
Re: Spoiler Tag
« Reply #311 on: June 11, 2007, 03:04:23 PM »
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?

Offline Nifelhein

  • Semi-Newbie
  • *
  • Posts: 51
Re: Spoiler Tag
« Reply #312 on: June 11, 2007, 03:20:51 PM »
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.

Offline Tuzaboy

  • Jr. Member
  • **
  • Posts: 241
Re: Spoiler Tag
« Reply #313 on: June 11, 2007, 04:18:59 PM »
but it is can in 1.1.2?  ::)

Offline Icedmetal57

  • Newbie
  • *
  • Posts: 2
Re: Spoiler Tag
« Reply #314 on: June 11, 2007, 08:07:22 PM »
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.

Offline Nifelhein

  • Semi-Newbie
  • *
  • Posts: 51
Re: Spoiler Tag
« Reply #315 on: June 13, 2007, 12:52:23 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

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.

Offline [Dark.Shadow]

  • Jr. Member
  • **
  • Posts: 289
  • Gender: Male
  • SMF Support Specialist *still* Wannabe T-T
    • DarkShadowMX
Re: Spoiler Tag
« Reply #316 on: June 14, 2007, 01:12:22 PM »
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 ;)

Offline sandochan

  • Newbie
  • *
  • Posts: 2
Re: Spoiler Tag
« Reply #317 on: June 17, 2007, 07:01:25 AM »
I can't use "spoiler(s) in spoiler" >_< ?

Offline Savage Sully

  • Newbie
  • *
  • Posts: 5
  • Gender: Male
    • German Savage Worlds Website (under construction)
Re: Spoiler Tag
« Reply #318 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.

Cheers

Sully

Joel-san

  • Guest
Re: Spoiler Tag
« Reply #319 on: June 28, 2007, 04:00:06 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.