Expanding & Collapsing Spoiler Tag

Started by dougiefresh, November 30, 2014, 07:40:36 PM

Previous topic - Next topic

BenjCano

Quote from: margarett on November 10, 2015, 11:13:24 AM
Howdy and welcome ;)

You should get yourself a copy of your forum in another location --> a test site, so that you can try whatever changes you are considering before you launch them live ;)

That being said, error 500 is a server-side error and it is possible that it relates to permissions. Check if the files created by the MOD have permissions set as 777. if so revert them to 644, some hosts don't like 777 ;)

The test forum sounds brilliant. Just setup another forum at an associated url, such as hxxp:www.example.com/testforum [nonactive] to make sure that it'll work! Genius!

Forgive what may be a very, very simple question, but does checking permissions happen on download, upload, or install?

margarett

This is a bit off-topic but here it goes anyway :P

For you to create your test forum you should:
a) copy all your forum folders to the new location (eg: a subfolder "testforum")
b) duplicate your database
c) load and run repair_settings and fix the database name as well as all the paths, so that everything points to your test forum. Don't skip this step, or you will be messing your live forum! ;)
http://wiki.simplemachines.org/smf/Repair_settings.php

About permissions, they are checked in different occasions, depending on what you are doing :P
Regarding the error you are having, they are checked when the server is accessing the files (after the MOD is already installed). The files are requested by PHP but the server rejects serving them due to their permissions (of course, assuming that this is the problem you're having).
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

AceAH47

Does this mod support left/right/center justifying inside the spoiler tags?  With it installed in v2.0.11, the following bbc:

[spoiler]This is normal text.[/spoiler]

[spoiler][left]This is left-justified.[/left][/spoiler]

[spoiler][center]This is centered.[/center][/spoiler]

[spoiler][right]This is right-justified.[/right][/spoiler]


--is producing a functioning spoiler, followed by three spoilers where the SHOW/HIDE bar appears first, and then the formatted text is displayed afterwards, unhidden, with the [/spoiler] end tag tacked on the end.

(Putting the justification tags outside the spoiler tags results in 4 functioning spoilers, each justified correctly. tag and all.)

I ask because we're trying to replace a previous plug-in of unknown authorship which was used to hide a lot of centered images with the format shown above.

dougiefresh

I've reproduced the issue you've described.  I'd have to look into the source code to see if I can fix it.....

natcip

Great mod. Works perfectly. :)
However, when I check the error log it keeps saying there are errors in lines 20, 25 and 31 of Subs-BBCode-Spoiler.php. Also it says "8: Undefined index: spoiler" and "8: Undefined index: debug_hide"

dougiefresh

@AceAH47:  I've fixed the mod to address the bug report you provided.  It will be in the next version.  Thank you for the bug report!

@natcip:  I'm looking into your bug reports....

dougiefresh

Uploaded v2.0 - November 14th, 2015
o Changed all spoiler tags to block-level tags.
o Changed bbcode tag types so that a validation function can be used to parse content inside tags.
o Changed the [spoiler=text]{content}[/spoiler] form to not parse other block-level tags.
o Moved all language modifications to the end of the language file.




@natcip: I couldn't replicate your bug report, so I moved the added language strings to the end of the language file.  Hopefully, this will solve your issue....

natcip

Thank you. The error seems to be gone now! :)

AceAH47

Installed and working perfectly!  Thanks dougie!  :)

dougiefresh

Uploaded 2.1 - November 16th, 2015
o Added "show" and "hide" parameters to replace default "show"/"hide" text with user specified text.

natcip

Hi dougiefresh!

Is there a way to make the content in between [spoiler][/spoiler] only viewable for registered members?
I want the guests to log in first.

Shambles


dougiefresh


natcip

It definitely should work. But using 2 bbcodes at the same time is a bit much, in my opinion [hide][spoiler]content[/spoiler][/hide]
And I can already foresee some users forgetting to use the hide tag or even leaving it out on purpose, if I did it this way.


I tried incorporating the codes from the hide mod into the spoiler mod, but considering my lack of coding skills, it didn't work. :laugh:

dougiefresh

After thinking about this particular request for some time today, I've decided that I'll add this one in all three of my expandable mods, and add a switch in the Modification Settings area to force it into members-only mode all the time....  It may be tomorrow or the day after, I'm not sure.....

dougiefresh

Uploaded v2.2 - December 9th, 2015
o Added "guests" parameter to show/hide the spoiler to guests.  Accepts n, no, false, y, yes, true.
o Added global default setting to hide spoilers from guests.




@natcip:  Hopefully, this update will do what you need it to.  Thanks for the idea!

natcip

Awesome! Thank you so much! :)

Just tested it, and it works great. Except the "please login or register to view this spoiler" message doesn't show up.

dougiefresh

Uploaded v2.3 - December 9th, 2015
o Fixed undefined variable error regarding guest needing to login/register.




@natcip: Damn.... I fixed that one.  Sorry!  Thanks for the bug report!

dougiefresh

Uploaded v2.4 - December 30th, 2015
o Fixed minor visual issue with Spoiler tag without parameters.

?Almirena?

Hello. Dougiefresh, this is a nifty little mod! Thank you for creating this.

I would like to use an image (gif) instead of the word "spoiler". Presumably this is in the file index.english.php. Could you possibly let me know what I need to do?

Advertisement: