News:

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

Main Menu

Simple Spoiler

Started by Suki, January 28, 2011, 06:50:55 PM

Previous topic - Next topic

Suki

Just remove this parts:

   static $header_done = false;

   if ($header_done)
      return;

   $header_done = true;
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

BGH

It didn't work :'(.

Only worked on the local test forum, but not over the online server :'(.

Seems like I have to try another spoiler mod :(

Suki

Fell free to try other mods, this isn't the only one.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Alb0

Is it just me, or does this not support images? I tried entering an image into the spoiler tags, although when clicking 'show' nothing appears. Works fine on the post preview.

Suki

Do you got any url with an example?

The mod waits until the whole page gets ready then it hides the content, if the image is big, then it will be visible until the your browser finish to download the image and the whole page.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Alb0

This URL here for example (with the [img] tags of course); [spoiler]http://weknowmemes.com/wp-content/uploads/2012/06/a-sandwich-maybe.jpg[/spoiler]

It shows up perfectly fine on post preview, although doesn't load on the actual post.

Suki

I actually need an url to a topic in your forum where the spoiler is been used.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Alb0


luuuciano

No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Alb0

Quote from: luuuciano on June 16, 2012, 10:22:10 PM
That image url do not load... http://weknowmemes.com/wp-content/uploads/2012/06/a-sandwich-maybe.jpg not now, at least
Maybe http://weknowmemes.com is down?

It loads fine on my end. Tried it with other images as well, nothing works.

Alb0

I've actually figured out the problem. The mod Resize Images To Fit Screen was interfering with the spoiler tags from showing the images. Any idea how that could be preventable without disabling the mod? Or is there any better large image handling mods out that work with the Spoiler mod?
Thanks!

Suki

I don't know how that mod works or how it affects images, it shouldn't interfere with this mod, all this mod does is ad a div tag around the content to be hide, it doesn't modify the content at all.

Perhaps it's a jquery conflict, the reize mod does the work on load meanwhile this mod does it on document ready.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

scimmiotto

Loop code example:
The following statement is FALSE
The previous statement is TRUE.

Suki

???

Please provide full details, otherwise I won't even attempt to look at it...

Anyway, there is a bazillion of other spoiler mods out there, this one was a very good way to learn hooks, it has fulfilled its purpose.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sir Osis of Liver

Is there an updated version of this mod?  Current download is breaking things in 2.0.17. :(
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Suki

Please be more specific, what do you mean by breaking?

Can't install?
Doesn't add the BBC button?
Is there a JS error?
Are you using https?

I tested it on SMF 2.0.7 https://missallsunday.com/smf20/index.php?topic=1.msg2#msg2

And since I'm on https I had to change the http call to avoid mixed content errors, will commit a fix for it but other than that it works as intented.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sir Osis of Liver

It breaks quick edit on client forum, 2.0.17 clean install, http.  Quick edit opens but doesn't save, just sits there until refresh, then the edit posts.  Replicated on http 2.0.17 test install.  It also enlarges font size on board index.  No errors.  Very strange, as it doesn't change any files and has its own Subs- file.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Suki

New release:

Remove jQuery, uses pure JavaScript now.
Add support for DOM changes made by onQuickEdit
Move JavaScript code to its own file.


@Sir Osis of Liver

I have no idea why it enlarged the font size. Rather than trying to figure it out why I re-made the whole thing in vanilla JS.

https://github.com/MissAllSunday/SimpleSpoiler/releases/tag/v2.0

Give it a try, it doesn't use jQuery anymore and uses css animations instead so the fadeIn animation isn't as smooth (or supported on old browsers) as jQuery's.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sir Osis of Liver

Works fine in all themes.  Thanks, Suki.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sebastiii

Hi,

@Suki thanks for the mod :)
I have seen a strange issue :
When using spoiler tag, in preview, it's OK but after posting, I'm getting :

Spoiler [Show][Show]

You can see a duplicate entry (the first one, the click does nothing) but the second one, it works to display spoiler content.
Do you have an idea why ?

Btw, I have also added the French language but without it, it's the same.
SMF version 2.0.18.

Thanks.

Advertisement: