• Welcome to Simple Machines Community Forum. Please login or sign up.
September 27, 2021, 06:55:15 AM

News:

Check out the SMF Function DB!


Quick Spoiler

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

Previous topic - Next topic

Saiy

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...

Gandrel

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:

DATABASE ERROR

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.

Gandrel

Here's my ManagePermissions.php file as well

Bugo

Open phpMyAdmin, run this SQL script:

DELETE FROM smf_permissions
WHERE permission = "view_spoiler"


Then set spoiler permissions again.

Gandrel

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.

dodos26

i find bug :(  See attach

dodos26


Bugo

Install the new version?

dodos26


Maxxim

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.

Bugo

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

kilk

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.

[/center][/spoiler][/quote]


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.

Bugo

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.

Advertisement: