Quick Spoiler

Started by Bugo, October 13, 2011, 09:51:33 AM

Previous topic - Next topic


Dear friends, I'm sorry, but I can't make it work on my forum -->  bit . ly / 2MrY7dw
I just updated on SMF 2.1 RC2, and I upgraded to Quick Spoilers 2.1.
... Any idea please ? The "spoilers" are indeen hidden, but the click to open the spoiler doesn't work with me...


Under "Modification Settings" when I try to change anything, like set the colour to Red and click the Save button, I'm getting the following error message:


Duplicate entry '0-view_spoiler' for key 'PRIMARY'
File: /home/outerrim/public_html/forums/Sources/ManagePermissions.php
Line: 1843

Has anyone seen this before and if there's a fix? I'm running 2.0.15 with the Sunrise theme and PHP 7.1.


Here's my ManagePermissions.php file as well


Open phpMyAdmin, run this SQL script:

DELETE FROM smf_permissions
WHERE permission = "view_spoiler"

Then set spoiler permissions again.


Quote from: Bugo on January 08, 2020, 05:58:34 AM
Open phpMyAdmin, run this SQL script:

DELETE FROM smf_permissions
WHERE permission = "view_spoiler"

Then set spoiler permissions again.

Does this permission get set during the mod installation and if so, does it not get removed when the mod is uninstalled? I've tried to reinstall and uninstall it with no luck.


i find bug :(  See attach



Install the new version?



An essential part of my (2.0.17) forum is TinyPortal, and it's already using jQuery:

// Load JQuery if it's not set (anticipated for SMF2.1)
    if(strpos($forum_version, '2.0') !== false && !isset($modSettings['jquery_source'])) {
$context['html_headers'] .= '<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>';

Can I avoid unnecessarily loading two jQuery scripts by simply deleting the following line
<script type="text/javascript">window.jQuery || document.write(unescape(\'%3Cscript src="//code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
from Sources\Class-QuickSpoiler.php?

Or is it not that easy? :) Please advise.


Don't worry about this. The script is checking if jQuery has already loaded, and not must load twice.


Solid mod! Good work!
Elddem The MMORPG - https://www.elddem.com | Denarius (D) Cryptocurrrency - https://www.denarius.io | BlockForums - Cryptocurrency Community Forums - https://www.blockforums.org

James Gryphon

I switched to this mod after discovering an obscure problem in AzaToth's old Spoiler Tag mod. As it turns out, it looks as though the same thing happens here, but the good thing about using a new mod is that its issues are more likely to be fixed.

The glitch takes a very specific series of events to trigger; it looks like if someone posts a quote, then a broken spoiler tag, then BBCode right after the broken spoiler tag, the forumposts div is closed earlier than it should be.

A sample post that should be able to replicate this:
And here are the past versions.

[quote][spoiler=v0.1[center]Note to reader: This has not, I repeat, has not been exaggerated and please take extreme caution around the nuclear war heads.


One triggering post is not very noticeable, especially on a theme like Curve where there aren't many distinct borders or backgrounds. The page rendering gets more broken after a second similar post: the content goes outside of the wrapper div, so that if you have a body or html background, the content shows up on top of it instead of the wrapper background. Further similar posts don't seem to make the problem any worse (or better). Other than the appearance and layout of things, there doesn't seem to be any obvious impact on forum functionality.

The problem should be reproducible on any forum that uses this mod or the old Spoiler Tag 0.7.2 mod. Of course, you don't have any control over the latter mod; I just mention it so that people who feel this is a problem might know to look into changing.


I see one missing bracket after the spoiler title. Just add it and everything will work fine.

James Gryphon

Well, yes, posts that have this problem can be easily fixed; I did that while I was experimenting trying to find out more about what causes the problem.

It is a defect, though, when any member can accidentally or intentionally break the entire page layout by putting in defective BBCode.


Has anyone tested this in 2.1RC4?

Diego Andrés

It uses hooks, so it probably works

SMF Tricks - Free & Premium Responsive Themes for SMF.

Speed King

Quote from: TurtleKicker on October 30, 2021, 04:38:40 PMHas anyone tested this in 2.1RC4?

Yes, it works with no errors :)


Just installed on my 2.0.18 and my 2.1RC4 both work good and look go Except the text within the spoiler is too light for my darker mods I did change the 2.1RC4 install to the SMF Default Theme - Curve2 Which looks good but both my darker themes not so much

2.0.18 Install
2.1 RC4 Install
Site Under redesign not expected to be complete before January 2026


You can change spoiler current CSS in quick_spoiler.css, or even add your own styles, and then share them with a community.