Talk:SpoilerAlert

How to trigger
There's no instructions given on how to trigger this function to pop up on a window.

I'm not going to rename my pages where I want to use this to Spoiler:Pagename. That's ridiculous.

How does SpoilerAlert/Demo trigger it? It is not called Spoiler:Anything (close, but no ":" in "SpoilerAlert".

I tried copying the line from the Demo source: "  " as it would make sense if the code checked for some div id... but it didn't work.

Please advise,

Thanks,

PS. When I didn't use the nowiki tags on the div id above, this page prompted the Spoiler Alert dialog to pop up. PPS. On both the demo and this page, clicking on No, not yet or Yes please does nothing - the dialog just stays there. I assumed for the demo it was because there was no page data to dispay, but the dialog refused to go away on this talk page. Also this text still showed below the dialog box. So I really don't think this code is working too well.


 * You don't have to rename your pages. That was just an example. All you need to do, is provide your own isSpoiler function. That function tells SpoilerAlert whether it should display the dialog or not. If you tell me how you want to trigger SpoilerAlert I'll write an isSpoiler function for you! :)


 * You say, you clicked on both "no" and "yes" but the dialog did not disappear? That's strange. I just tested the demo and it does work for me. Can you tell me what other scripts you're using and where you've added them? -- peco e s 16:23, July 14, 2012 (UTC)

Cool! I was just going to try it out on: w:c:ParadiseIslandHD:Upcoming buildings and features and I don't forsee using it on any other page (our site(s) don't really have much use for it - but I happened across your code and thought I'd chuck it on). I have a box at the top of that page, I figured it could still stay there after the dialog pop-up disappears. So how about it triggers on any page that the template is on?

Re: What other scripts I have? I just clicked on SpolierAlert/Demo here on this site, so whatever scripts I have on other sites would be irrelevant...

I use IE9, it shows the dialog at the top of the page, the clear cache and reload underneath it, and this is a demo text below that. I just opened it in Chrome and it works properly...


 * Okay, I've modified the template a little. Add this to your MediaWiki:Common.js:


 * peco e s 16:56, July 14, 2012 (UTC)


 * I can confirm that SpoilerAlert is broken in IE9! I'll get back to you when I have a fix! -- peco e s 17:17, July 14, 2012 (UTC)


 * Correction: It does work in IE9. I had to clear my cache though. -- peco e s 17:44, July 14, 2012 (UTC)

Hi, sorry, was busy elsewhere. It works almost-perfect in Chrome, but in IE9 it just displays the dialog on top of the page, so you can still see the page unhidden, and the buttons do nothing, so the dialog won't go away.

Any reason you moved the noinclude tag, as the existing spoiler template now no longer displays its dialog box. I thought it would be cool once the Yes/No dialog disappeared if the Spoiler template still showed its box at the top. Also, like on your demo, if the user presses "No", instead of showing a blank page, it should show the "refresh cache and reload" button - perhaps integrating with the nice-looking existing Spoiler template. ie. If they press "Yes", the neat-spoiler box remains up the top as a friendly reminder, if they say "No", only that box shows with an option to reload.

In IE9 I pressed Ctrl-F5, etc, but it never worked, not even the Demo page. It will need to work for everyone first go, we can't expect users to go through some IE menu, cache-clearing just to get a Yes/No dialog to work...

But since I last looked and I got busy, now neither the Yes/No or old Spoiler Template show up...???

I just wantesd to use it because it looked really professional for our website. But if it's too complicated, just a simply Nav Box will suffice:

As in: <-- automatically hidden by default --> Spoiler Alert Message [... Wrap around Page Content here - Optionally, just certain / multiple sections can be hidden...]

Spoiler Alert Message - continue if you dare! [... Wrap around Page Content here - Optionally, just certain / multiple sections can be hidden...] The above could even be wrapped into two templates: and