Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Fangs404 on October 07, 2008, 12:59:56 AM

Title: Inline Hover Spoiler BB Code
Post by: Fangs404 on October 07, 2008, 12:59:56 AM
Link to mod. (http://custom.simplemachines.org/mods/index.php?mod=1438)

This is a spoiler mod loosely based off of Gazmanafc's Simple Spoiler Tag (http://custom.simplemachines.org/mods/index.php?mod=573) mod. This mod creates a similar inline all-black box, but instead of having to highlight the text or click a button, you can merely hover the mouse over the black section of text, and it'll display the text. If you like the spoiler tags on reddit and Something Awful, you'll like this. This mod is theme-independent, and it'll keep your site W3C compliant.

Without hovering, you see nothing but black:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2vkx9u1.jpg&hash=eda96ec2da29f71f0162a64c8f5788a784f2f637)

However, when you hover the mouse over the black section of text, it magically appears:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2F2mcsvu1.jpg&hash=664122c858fd12e5e80cf2fc06ad31783ce27f07)

Changelog
1.5 - 11/15/09
- fixed install error on 2.0 RC2 due to new Subs-Editor.php formatting for BB codes

1.4.1 - 11/13/09
- changed $themedir/images in package-info.xml to $imagesdir

1.4 - 2/23/09
- changed the "install for" info to "1.1 - 1.99.99" and "2.0 - 2.99.99" to make this mod compatible with all future SMF versions

1.3 - 12/7/08
- added support for SMF 1.1.7

1.2 - 10/15/08
- added support for SMF 2.0 Beta 4

1.1 - 10/15/08
- removed modification of style.css in favor of a style element inside the span tag (this effectively means that this mod is now theme-independent! :))
- simplified style and onmouseout

1.0 - 10/2/08
- initial release
Title: Re: Inline Hover Spoiler
Post by: qtime on October 08, 2008, 02:44:18 PM
if I check the black box, it is visible after downloading a page, when I moved my mouse over the box and further, the text is invisible.
I assume it should be invisible from starting displaying the page.
Title: Re: Inline Hover Spoiler
Post by: Fangs404 on October 10, 2008, 12:11:54 AM
Quote from: qtime on October 08, 2008, 02:44:18 PM
if I check the black box, it is visible after downloading a page, when I moved my mouse over the box and further, the text is invisible.
I assume it should be invisible from starting displaying the page.

Yes, it is invisible from the start.  Are you using the default theme?  Try the default theme to see how it works, and you should see what it's supposed to look like.  You'll have to manually change non-default themes' CSS code to make it work (it's a very simple change for non-default themes).
Title: Re: Inline Hover Spoiler
Post by: Fangs404 on October 15, 2008, 04:30:30 AM
I just updated this mod.  I removed the modification to style.css.  This means that the mod is now theme-independent!  :)
Title: Re: Inline Hover Spoiler
Post by: Fangs404 on October 15, 2008, 05:33:08 PM
I just added support for SMF 2.0 Beta 4.
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on October 17, 2008, 12:52:55 AM
I just added a link to a demo post so that you can see it in action (it's not SMF, but it's the exact same mod using the exact same HTML).
Title: Re: Inline Hover Spoiler BBCode
Post by: highwayfrunkis on October 20, 2008, 07:50:03 PM
sweet, just what I was looking for.

One question, we have a "spoiler" code/button already - is there an easy way to change the code to :hover: ??

thanks again!
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on October 20, 2008, 09:48:37 PM
Quote from: highwayfrunkis on October 20, 2008, 07:50:03 PM
sweet, just what I was looking for.

One question, we have a "spoiler" code/button already - is there an easy way to change the code to :hover: ??

thanks again!

Sure thing.  The easiest way to do this would be to just do a find/replace on the word "spoiler."  Take a look at http://custom.simplemachines.org/mods/index.php?action=parse;mod=1438;attach=72283;smf_version=1.1.6 for manual install instructions, and everywhere you see spoiler there, you'll want to replace that with hover.  It should work just fine if you do that.  :)
Title: Re: Inline Hover Spoiler BBCode
Post by: uncajesse on November 26, 2008, 07:39:09 AM
The zip file on the site doesn't work properly with the "Download a package by url" method.  I had to unpack locally and repack with 7-zip for it to accept via upload.
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on December 03, 2008, 01:06:45 AM
Quote from: uncajesse on November 26, 2008, 07:39:09 AM
The zip file on the site doesn't work properly with the "Download a package by url" method.  I had to unpack locally and repack with 7-zip for it to accept via upload.

You should just be able to download this and upload the zip file straight to your forum.  You shouldn't need to repack anything.
Title: Re: Inline Hover Spoiler BBCode
Post by: BounceDK on December 06, 2008, 09:32:42 AM
I get this error when trying to install it in 1.1.7
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
So I'm guessing this doesn't work with 1.1.7?
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on December 07, 2008, 08:43:55 PM
Quote from: BounceDK on December 06, 2008, 09:32:42 AM
I get this error when trying to install it in 1.1.7
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
So I'm guessing this doesn't work with 1.1.7?

It should work just fine with 1.1.7.  Let me test it, and I'll update the plugin.

[edit]
OK, updated the package to work with 1.1.7.
Title: Re: Inline Hover Spoiler BBCode
Post by: BounceDK on January 17, 2009, 07:01:57 PM
Thanks :)
Title: Re: Inline Hover Spoiler BBCode
Post by: KahneFan on February 16, 2009, 08:13:10 PM
It doesn't appear to work with 2.0RC1 :(
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on February 22, 2009, 09:11:56 PM
Quote from: KahneFan on February 16, 2009, 08:13:10 PM
It doesn't appear to work with 2.0RC1 :(

I didn't know the RC was out.  I'll update it soon (either tonight or tomorrow).  I also need to add 1.1.8 support.
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on February 23, 2009, 09:30:29 PM
OK, I updated this mod.  It should work with all future SMF updates, too.  If you ever notice that something's broken, just let me know, but I don't foresee them changing the mod installer system anytime soon.  :)
Title: Re: Inline Hover Spoiler BBCode
Post by: KahneFan on February 23, 2009, 09:57:40 PM
Is there a way to possibly just make the un-hovered a black cover? Possibly using a 3x30 black image strip that repeats, and then goes away when hovered? I ask because if you list smileys, or any inline images, the images display. If you were to use an image, the forum owner could make the image as tall as they need if they want members to be able to hide images or embeded movies or... The forum owner could also replace the hover image with their forum name or (an ad) or... when content is hidden.
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on February 23, 2009, 10:00:51 PM
Quote from: KahneFan on February 23, 2009, 09:57:40 PM
Is there a way to possibly just make the un-hovered a black cover? Possibly using a 3x30 black image strip that repeats, and then goes away when hovered? I ask because if you list smileys, or any inline images, the images display. If you were to use an image, the forum owner could make the image as tall as they need if they want members to be able to hide images or embeded movies or... The forum owner could also replace the hover image with their forum name or (an ad) or... when content is hidden.

This is a good question.  Someone on another forum suggested this bit of CSS:

filter:alpha(opacity=100);
-moz-opacity:1;
-khtml-opacity: 1;
opacity: 1;

I haven't tried it, though.  Changing the opacity from 1 to 0 would make images transparent.  You could try that.
Title: Re: Inline Hover Spoiler BBCode
Post by: KahneFan on February 23, 2009, 10:34:47 PM
Hmmmm, I'll keep playing, but I haven't figure out a good way to do this that's cross browser compatible... unless you use javascript, which is beyond me, but I'm pretty sure it can be accomplished with javascript.
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on February 25, 2009, 12:57:35 PM
Quote from: KahneFan on February 23, 2009, 10:34:47 PM
Hmmmm, I'll keep playing, but I haven't figure out a good way to do this that's cross browser compatible... unless you use javascript, which is beyond me, but I'm pretty sure it can be accomplished with javascript.

Yeah, I'm not entirely sure how this would be done.  Most of those CSS tags I mentioned above aren't W3C-compliant.  I guess for images, the ugly spoiler solution that requires a button is necessary.
Title: Re: Inline Hover Spoiler BBCode
Post by: KahneFan on February 25, 2009, 01:17:30 PM
The opacity worked great... on FireFox... darn IE  >:(
Title: Re: Inline Hover Spoiler BBCode
Post by: wastrel on March 26, 2009, 08:04:40 PM
Love the mod, but I'm getting this error in my logs:

8: Undefined index: spoiler_post
File: /***/forum/Themes/default/Post.template.php (send sub template - eval?)
Line: 772
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on April 02, 2009, 04:31:23 PM
Quote from: wastrel on March 26, 2009, 08:04:40 PM
Love the mod, but I'm getting this error in my logs:

8: Undefined index: spoiler_post
File: /***/forum/Themes/default/Post.template.php (send sub template - eval?)
Line: 772

Hm, I have an idea, but I'm not sure.  If you look inside the mod at mod-1.x.xml or mod-2.x.xml, you'll see this:

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[$txt['spoiler_post'] = 'Spoiler';]]></add>
</operation>
</file>


The mod modifies Modifications.english.php by adding some text at the end of the file.  Are you using another language?  If so, you'll need to manually edit your language file and add this line at the very end of the file:

$txt['spoiler_post'] = 'Spoiler';

I hope that fixes the problem for you.
Title: Re: Inline Hover Spoiler BBCode
Post by: wastrel on April 02, 2009, 05:42:31 PM
Quote from: Fangs404 on April 02, 2009, 04:31:23 PM
Quote from: wastrel on March 26, 2009, 08:04:40 PM
Love the mod, but I'm getting this error in my logs:

8: Undefined index: spoiler_post
File: /***/forum/Themes/default/Post.template.php (send sub template - eval?)
Line: 772

Hm, I have an idea, but I'm not sure.  If you look inside the mod at mod-1.x.xml or mod-2.x.xml, you'll see this:

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[$txt['spoiler_post'] = 'Spoiler';]]></add>
</operation>
</file>


The mod modifies Modifications.english.php by adding some text at the end of the file.  Are you using another language?  If so, you'll need to manually edit your language file and add this line at the very end of the file:

$txt['spoiler_post'] = 'Spoiler';

I hope that fixes the problem for you.

Hmmm, I'm honestly not sure.  An idea struck me, so I tried that the other day.

I copied the spoiler.gif from forum/theme/default/images/bbc to the images/bbc folder for each theme, and it took care of the issue.
Title: Re: Inline Hover Spoiler BBCode
Post by: wastrel on April 02, 2009, 06:14:51 PM
Actually, I take that back.  Copying the gif did fix a 404 error I was getting, where the spoiler button wasn't appearing in the posting tool bar.  But I was still receiving an error akin to what I was getting before.

I followed your instructions, and it cleared up the unidentified index error.

Thanks!
Title: Re: Inline Hover Spoiler BBCode
Post by: Fangs404 on April 02, 2009, 07:56:27 PM
Quote from: wastrel on April 02, 2009, 06:14:51 PM
Actually, I take that back.  Copying the gif did fix a 404 error I was getting, where the spoiler button wasn't appearing in the posting tool bar.  But I was still receiving an error akin to what I was getting before.

I followed your instructions, and it cleared up the unidentified index error.

Thanks!

Awesome, I'm glad that fixed it!  :)
Title: Re: Inline Hover Spoiler BB Code
Post by: Chelle on April 16, 2009, 04:34:59 PM
What would cause seeing

$txt['spoiler_post'] = 'Spoiler'; $txt['float'] = 'Float';

at the top of every page?

UPDATE:  Realized what was going on.  That was being added to my Modification.english.php file, except it was after the closing php code...move that and it was printing on the page anymore.
Title: Re: Inline Hover Spoiler BB Code
Post by: countstex on October 22, 2009, 04:01:07 AM
Quote from: Chelle on April 16, 2009, 04:34:59 PM
UPDATE:  Realized what was going on.  That was being added to my Modification.english.php file, except it was after the closing php code...move that and it was printing on the page anymore.

Is there a way to change the MOD XML so the code inserts itself into the correct location as I don;t have direct access to the Modification file, presumably a changed search to get to the end, but inside the close tag is possible?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on October 25, 2009, 05:54:23 PM
Quote from: countstex on October 22, 2009, 04:01:07 AM
Quote from: Chelle on April 16, 2009, 04:34:59 PM
UPDATE:  Realized what was going on.  That was being added to my Modification.english.php file, except it was after the closing php code...move that and it was printing on the page anymore.

Is there a way to change the MOD XML so the code inserts itself into the correct location as I don;t have direct access to the Modification file, presumably a changed search to get to the end, but inside the close tag is possible?

I don't know of a way to do this, but it may be possible.
Title: Re: Inline Hover Spoiler BB Code
Post by: c23_Mike on November 10, 2009, 03:30:54 PM
Hi there !

The mod works at my forum except the icon at the editor is not displayed, there is only a small icon which displays that the correct icon not found (red cross).
When i look what should be displayed I see this:

http://www.c23.at/cgi-bin/portal/Themes/default/images/bbc/.gif

Correct, the file what should shown is not in the source. At the server on the correct place the spoiler.gif exists. Where in the source is what missing?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on November 13, 2009, 04:29:12 PM
Quote from: c23_Mike on November 10, 2009, 03:30:54 PM
Hi there !

The mod works at my forum except the icon at the editor is not displayed, there is only a small icon which displays that the correct icon not found (red cross).
When i look what should be displayed I see this:

http://www.c23.at/cgi-bin/portal/Themes/default/images/bbc/.gif

Correct, the file what should shown is not in the source. At the server on the correct place the spoiler.gif exists. Where in the source is what missing?

Hm, I'm not quite sure what's going on here.  What version of SMF are you running?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on November 13, 2009, 04:41:52 PM
I just made a small change to the package-info.xml part of the mod, so try this version and see if it solves your problem.
Title: Re: Inline Hover Spoiler BB Code
Post by: nwobhm on November 14, 2009, 07:38:42 AM
I get error while installing this mod. I get 'test failed' on subs.editor.php

Should I allow it to do the following:


Search [Choose]
'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt['horizontal_rule']),

Add after [Choose]
'spoiler' => array('code' => 'spoiler', 'before' => '[spoiler]', 'after' => '[/spoiler]', 'description' => $txt['spoiler_post']),
Title: Re: Inline Hover Spoiler BB Code
Post by: Camu on November 14, 2009, 08:03:31 AM
If you are using smf 2.0 RC2 no.
In Subs.Editor.php
Code (Find) Select

array(
'image' => 'hr',
'code' => 'hr',
'before' => '[hr]',
'description' => $txt['horizontal_rule']
),

And
Code (After) Select
array(
'image' => 'spoiler',
'code' => 'spoiler',
'before' => '[spoiler]',
'after' => '[/spoiler]',
'description' => $txt['spoiler_post']
),

I think this should fix your error.
Title: Re: Inline Hover Spoiler BB Code
Post by: nwobhm on November 14, 2009, 08:42:38 AM
Quote from: Camu on November 14, 2009, 08:03:31 AM
If you are using smf 2.0 RC2 no.
In Subs.Editor.php
Code (Find) Select

array(
'image' => 'hr',
'code' => 'hr',
'before' => '[hr]',
'description' => $txt['horizontal_rule']
),

And
Code (After) Select
array(
'image' => 'spoiler',
'code' => 'spoiler',
'before' => '[spoiler]',
'after' => '[/spoiler]',
'description' => $txt['spoiler_post']
),

I think this should fix your error.
Should I make this change before installing the mod? Or afterwards?
Title: Re: Inline Hover Spoiler BB Code
Post by: Camu on November 14, 2009, 09:37:34 AM
If you don't know how to modify the files in the package you should wait for an update.
Or you can do all the modifications manually 8) .
Title: Re: Inline Hover Spoiler BB Code
Post by: c23_Mike on November 14, 2009, 07:52:11 PM
Hi there !

I use SMF 2 RC2 the charter edition.
Where is defined from where to load the icon, I do not find with my little little programming knowledge the correct part (but I am able to install mods manually, since with all my mods also this mod needs hands on).
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on November 15, 2009, 11:12:08 PM
Thanks guys.  I'm gonna fix this and then upload the fixed version.
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on November 15, 2009, 11:46:07 PM
OK, this has been fixed.  I've verified that it works with 2.0 RC2.  It might be broken on older 2.0 releases, but that's just a sign that you should move to RC2.
Title: Re: Inline Hover Spoiler BB Code
Post by: xrunner on December 17, 2009, 09:59:53 AM
Getting the following error after installing the mod -

8: Undefined index: spoiler_post

File: /home/whydoes1/public_html/forums/Themes/default/languages/Post.english-utf8.php (main sub template - eval?)
Line: 772

Mod removed until solution found.
Title: Re: Inline Hover Spoiler BB Code
Post by: countstex on December 22, 2009, 07:14:37 PM
This still installs incorrectly on 1.1.10, no errors reported however after install Ever page shows "$txt['spoiler_post'] = 'Spoiler';" at the top and preview, and new registrations fail :(
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on January 21, 2010, 04:05:58 AM
Quote from: xrunner on December 17, 2009, 09:59:53 AM
Getting the following error after installing the mod -

8: Undefined index: spoiler_post

File: /home/whydoes1/public_html/forums/Themes/default/languages/Post.english-utf8.php (main sub template - eval?)
Line: 772

Mod removed until solution found.

I can't help you unless you tell me what version of SMF you're using.  I just installed it on a completely fresh version of 2.0 RC2 and 1.1.11, and it installed and functions perfectly without problem for both versions.

[edit]
Your problem looks similar to the problem seen here (http://www.simplemachines.org/community/index.php?topic=266576.msg2001424#msg2001424) except your issue is with this chunk:

<file name="$themedir/Post.template.php">
<operation>
<search position="before"><![CDATA[ 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]),]]></search>
<add><![CDATA[
'spoiler' => array('code' => 'spoiler', 'before' => '[spoiler]', 'after' => '[/spoiler]', 'description' => $txt['spoiler_post']),]]></add>
</operation>
</file>


That code modifies Post.template.php.  Since you seem to be having a problem with Post.english-utf8.php for some reason, I'd look in that file and mirror the changes that this mod made to your Post.template.php file.

[edit2]
After further inspection, I honestly have no idea what Post.english-utf8.php is.  I don't have that file in my SMF 2 or SMF 1 installs (I have totally vanilla installs on my server for testing purposes).  I do have Post.english.php, but my plugin doesn't alter that file.  The only file in the languages directory my plugin modifies is Modifications.english.php.
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on January 21, 2010, 04:16:28 AM
Quote from: countstex on December 22, 2009, 07:14:37 PM
This still installs incorrectly on 1.1.10, no errors reported however after install Ever page shows "$txt['spoiler_post'] = 'Spoiler';" at the top and preview, and new registrations fail :(
I just tried it on a completely fresh install of 1.1.11, and it installed without any problems.  You probably have another mod installed that changed $languagedir/Modifications.english.php inappropriately.  Look at that file to make sure everything is standard.  If you need more help, feel free to PM me, and I can look at the file for you.
Title: Re: Inline Hover Spoiler BB Code
Post by: c23_Mike on April 05, 2010, 01:24:32 PM
Hi there !

Works this mod with RC3?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on April 14, 2010, 03:54:45 AM
Quote from: c23_Mike on April 05, 2010, 01:24:32 PM
Hi there !

Works this mod with RC3?

It should.  I don't think there were any major changes in the plugin system going from RC2->RC3 like there were going from RC1->RC2.  Let me know if anything doesn't work.
Title: Re: Inline Hover Spoiler BB Code
Post by: c23_Mike on April 14, 2010, 01:11:01 PM
Hi there!

Just for your information: it works!
Title: Re: Inline Hover Spoiler BB Code
Post by: Claine on July 07, 2010, 01:34:49 AM
Hi, I'm getting this error too:


http://tzelkora.com/index.php?action=post2;board=7;preview;xml
8: Undefined index: spoiler_post
File: /home/kureaac1/public_html/tzelkora.com/Sources/Subs-Editor.php
Line: 1707


I'm using RC3 and Tiny Portal
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on July 12, 2010, 09:38:09 PM
Quote from: Claine on July 07, 2010, 01:34:49 AM
Hi, I'm getting this error too:


http://tzelkora.com/index.php?action=post2;board=7;preview;xml
8: Undefined index: spoiler_post
File: /home/kureaac1/public_html/tzelkora.com/Sources/Subs-Editor.php
Line: 1707


I'm using RC3 and Tiny Portal

It looks like the plugin didn't install correctly.  Try manually installing the mod (go to http://custom.simplemachines.org/mods/index.php?mod=1438 and hit Parse next to Manual Install Instructions for SMF).  It looks like your Modifications.english.php file didn't get correctly edited.  Either that or (probably more likely) is that you are using a different Modifications.*.php file.
Title: Re: Inline Hover Spoiler BB Code
Post by: phoenixjay on December 10, 2010, 12:59:46 PM
Hi there,

sorry to post here after such a long time of nothing but I am having a problem that is probably very simple but, for the life of me, I can't see what I am doing wrong.

I am using 1.1.12 and the theme 'Headline' - forum can be seen at www.write4life.org/thewritestuff

Mod seems to have been installed ok but, for the life of me, I can't find anywhere where you enable it or, if it doesn't need enabled, anywhere in teh post where you use it.
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on February 28, 2011, 03:31:15 AM
Quote from: phoenixjay on December 10, 2010, 12:59:46 PM
Hi there,

sorry to post here after such a long time of nothing but I am having a problem that is probably very simple but, for the life of me, I can't see what I am doing wrong.

I am using 1.1.12 and the theme 'Headline' - forum can be seen at www.write4life.org/thewritestuff

Mod seems to have been installed ok but, for the life of me, I can't find anywhere where you enable it or, if it doesn't need enabled, anywhere in teh post where you use it.

Sorry I never responded to this, but there's nothing you need to do once it's installed.  You can just use it.  Test it out by using the [spoiler] bbcode on your forum to see if you installed it correctly.
Title: Re: Inline Hover Spoiler BB Code
Post by: agent47 on June 15, 2011, 12:04:42 AM
Any plans on re-writing this for SMF 2.0 or is the current version compatible with 2.0 ?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on June 15, 2011, 12:06:57 AM
Quote from: agent47 on June 15, 2011, 12:04:42 AM
Any plans on re-writing this for SMF 2.0 or is the current version compatible with 2.0 ?

The current version is compatible.  I added 2.0 support when the RCs first started appearing.  If you have any issues, please let me know, but it should work just fine.
Title: Re: Inline Hover Spoiler BB Code
Post by: agent47 on June 15, 2011, 05:14:31 AM
Quote from: Fangs404 on June 15, 2011, 12:06:57 AM
Quote from: agent47 on June 15, 2011, 12:04:42 AM
Any plans on re-writing this for SMF 2.0 or is the current version compatible with 2.0 ?

The current version is compatible.  I added 2.0 support when the RCs first started appearing.  If you have any issues, please let me know, but it should work just fine.
That's awesome, thanks a lot bud. This mod has been so useful on my site and continues to be one of the most handy features on the site.
Thanks a lot man.
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on June 15, 2011, 01:29:19 PM
Quote from: agent47 on June 15, 2011, 05:14:31 AM
Quote from: Fangs404 on June 15, 2011, 12:06:57 AM
Quote from: agent47 on June 15, 2011, 12:04:42 AM
Any plans on re-writing this for SMF 2.0 or is the current version compatible with 2.0 ?

The current version is compatible.  I added 2.0 support when the RCs first started appearing.  If you have any issues, please let me know, but it should work just fine.
That's awesome, thanks a lot bud. This mod has been so useful on my site and continues to be one of the most handy features on the site.
Thanks a lot man.

I'm happy to hear that!  :)
Title: Re: Inline Hover Spoiler BB Code
Post by: ocmdiaz714 on August 21, 2012, 11:26:31 PM
Quote from: Fangs404 on October 07, 2008, 12:59:56 AM
Link to mod. (http://custom.simplemachines.org/mods/index.php?mod=1438)

This is a spoiler mod loosely based off of Gazmanafc's Simple Spoiler Tag (http://custom.simplemachines.org/mods/index.php?mod=573) mod. This mod creates a similar inline all-black box, but instead of having to highlight the text or click a button, you can merely hover the mouse over the black section of text, and it'll display the text. If you like the spoiler tags on reddit and Something Awful, you'll like this. This mod is theme-independent, and it'll keep your site W3C compliant.

Without hovering, you see nothing but black:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2vkx9u1.jpg&hash=eda96ec2da29f71f0162a64c8f5788a784f2f637)

However, when you hover the mouse over the black section of text, it magically appears:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2F2mcsvu1.jpg&hash=664122c858fd12e5e80cf2fc06ad31783ce27f07)

Changelog
1.5 - 11/15/09
- fixed install error on 2.0 RC2 due to new Subs-Editor.php formatting for BB codes

1.4.1 - 11/13/09
- changed $themedir/images in package-info.xml to $imagesdir

1.4 - 2/23/09
- changed the "install for" info to "1.1 - 1.99.99" and "2.0 - 2.99.99" to make this mod compatible with all future SMF versions

1.3 - 12/7/08
- added support for SMF 1.1.7

1.2 - 10/15/08
- added support for SMF 2.0 Beta 4

1.1 - 10/15/08
- removed modification of style.css in favor of a style element inside the span tag (this effectively means that this mod is now theme-independent! :))
- simplified style and onmouseout

1.0 - 10/2/08
- initial release

Would it be possible to add spoiler to images as well?
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on August 22, 2012, 12:16:19 AM
Quote from: ocmdiaz714 on August 21, 2012, 11:26:31 PM
Quote from: Fangs404 on October 07, 2008, 12:59:56 AM
Link to mod. (http://custom.simplemachines.org/mods/index.php?mod=1438)

This is a spoiler mod loosely based off of Gazmanafc's Simple Spoiler Tag (http://custom.simplemachines.org/mods/index.php?mod=573) mod. This mod creates a similar inline all-black box, but instead of having to highlight the text or click a button, you can merely hover the mouse over the black section of text, and it'll display the text. If you like the spoiler tags on reddit and Something Awful, you'll like this. This mod is theme-independent, and it'll keep your site W3C compliant.

Without hovering, you see nothing but black:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2vkx9u1.jpg&hash=eda96ec2da29f71f0162a64c8f5788a784f2f637)

However, when you hover the mouse over the black section of text, it magically appears:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2F2mcsvu1.jpg&hash=664122c858fd12e5e80cf2fc06ad31783ce27f07)

Changelog
1.5 - 11/15/09
- fixed install error on 2.0 RC2 due to new Subs-Editor.php formatting for BB codes

1.4.1 - 11/13/09
- changed $themedir/images in package-info.xml to $imagesdir

1.4 - 2/23/09
- changed the "install for" info to "1.1 - 1.99.99" and "2.0 - 2.99.99" to make this mod compatible with all future SMF versions

1.3 - 12/7/08
- added support for SMF 1.1.7

1.2 - 10/15/08
- added support for SMF 2.0 Beta 4

1.1 - 10/15/08
- removed modification of style.css in favor of a style element inside the span tag (this effectively means that this mod is now theme-independent! :))
- simplified style and onmouseout

1.0 - 10/2/08
- initial release

Would it be possible to add spoiler to images as well?

You'd need a different spoiler mod. This one only works for text. You'd probably want one of the spoiler mods that has a button you need to click in order to reveal what's hidden.
Title: Re: Inline Hover Spoiler BB Code
Post by: ocmdiaz714 on August 23, 2012, 05:59:52 PM
Quote from: Fangs404 on August 22, 2012, 12:16:19 AM
Quote from: ocmdiaz714 on August 21, 2012, 11:26:31 PM
Quote from: Fangs404 on October 07, 2008, 12:59:56 AM
Link to mod. (http://custom.simplemachines.org/mods/index.php?mod=1438)

This is a spoiler mod loosely based off of Gazmanafc's Simple Spoiler Tag (http://custom.simplemachines.org/mods/index.php?mod=573) mod. This mod creates a similar inline all-black box, but instead of having to highlight the text or click a button, you can merely hover the mouse over the black section of text, and it'll display the text. If you like the spoiler tags on reddit and Something Awful, you'll like this. This mod is theme-independent, and it'll keep your site W3C compliant.

Without hovering, you see nothing but black:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2vkx9u1.jpg&hash=eda96ec2da29f71f0162a64c8f5788a784f2f637)

However, when you hover the mouse over the black section of text, it magically appears:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2F2mcsvu1.jpg&hash=664122c858fd12e5e80cf2fc06ad31783ce27f07)

Changelog
1.5 - 11/15/09
- fixed install error on 2.0 RC2 due to new Subs-Editor.php formatting for BB codes

1.4.1 - 11/13/09
- changed $themedir/images in package-info.xml to $imagesdir

1.4 - 2/23/09
- changed the "install for" info to "1.1 - 1.99.99" and "2.0 - 2.99.99" to make this mod compatible with all future SMF versions

1.3 - 12/7/08
- added support for SMF 1.1.7

1.2 - 10/15/08
- added support for SMF 2.0 Beta 4

1.1 - 10/15/08
- removed modification of style.css in favor of a style element inside the span tag (this effectively means that this mod is now theme-independent! :))
- simplified style and onmouseout

1.0 - 10/2/08
- initial release

Would it be possible to add spoiler to images as well?

You'd need a different spoiler mod. This one only works for text. You'd probably want one of the spoiler mods that has a button you need to click in order to reveal what's hidden.

I really prefer this mod over the others I've seen, and I know such a mod is possible as I've seen it in action on another forum, but I know the admin there won't share the code. :(
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on August 23, 2012, 07:41:42 PM
Quote from: ocmdiaz714 on August 23, 2012, 05:59:52 PM
I really prefer this mod over the others I've seen, and I know such a mod is possible as I've seen it in action on another forum, but I know the admin there won't share the code. :(

Something like it may be possible, but not the way I've implemented it. I've implemented it as a really simply CSS text color change. It doesn't do anything to images.
Title: Re: Inline Hover Spoiler BB Code
Post by: ocmdiaz714 on September 05, 2012, 08:11:18 PM
Quote from: Fangs404 on August 23, 2012, 07:41:42 PM
Quote from: ocmdiaz714 on August 23, 2012, 05:59:52 PM
I really prefer this mod over the others I've seen, and I know such a mod is possible as I've seen it in action on another forum, but I know the admin there won't share the code. :(

Something like it may be possible, but not the way I've implemented it. I've implemented it as a really simply CSS text color change. It doesn't do anything to images.

I am willing to pay for such an implement.
Title: Re: Inline Hover Spoiler BB Code
Post by: Dragon41673 on October 29, 2014, 04:29:00 PM
All...I removed this mod from my site, but the button for the spoiler is still on my posting menu. Where do I go to remove it?

There were no errors when I un-installed the mod.

Thanks
Title: Re: Inline Hover Spoiler BB Code
Post by: Fangs404 on November 08, 2014, 12:49:02 AM
Quote from: Dragon41673 on October 29, 2014, 04:29:00 PM
All...I removed this mod from my site, but the button for the spoiler is still on my posting menu. Where do I go to remove it?

There were no errors when I un-installed the mod.

Thanks

That's odd that it stuck around, but it's a simple enough fix. This mod modifies 3 files: $languagedir/Modifications.english.php, $sourcedir/Subs.php, and $sourcedir/Subs-Editor.php. And it adds an icon to $imagesdir/bbc/spoiler.gif. If you go to http://custom.simplemachines.org/mods/index.php?mod=1438, on the right side, there's a dropdown menu that says, "Manual Install Instructions for SMF". Select the version of SMF you're using and hit parse. You can see exactly how each file is modified. Just edit those 3 files to remove the changes.
Title: Re: Inline Hover Spoiler BB Code
Post by: Dragon41673 on November 08, 2014, 09:52:32 AM
Thank you for the response, I figured that out not long ago with the help of another forum member. I apologize I forgot to post in here it was resolved.

Thank you
Title: Re: Inline Hover Spoiler BB Code
Post by: confuseamuse on July 03, 2017, 11:20:17 AM
I don't know about the creator, but is there a way to have the spoiler code also be clickable?

That would make it easier for people on touchscreen devices (i.e. smartphone) to see the unmarked spoilers.

Thanks.
Title: Re: Inline Hover Spoiler BB Code
Post by: confuseamuse on July 04, 2017, 05:02:07 AM
Apparently, PHP doesn't allow you to code based on clicks.

Since this mod is written in PHP, it's not gonna work is it.

Nevermind then.
Title: Re: Inline Hover Spoiler BB Code
Post by: Steve on July 04, 2017, 08:28:23 AM
https://custom.simplemachines.org/mods/index.php?mod=3981

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=spoiler
Title: Re: Inline Hover Spoiler BB Code
Post by: confuseamuse on July 28, 2017, 08:22:27 PM
Quote from: Steve on July 04, 2017, 08:28:23 AM
https://custom.simplemachines.org/mods/index.php?mod=3981

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=spoiler

I did look at those mods, but I prefer this mod design wise. I learnt the modification needs to be done in javascript, so I'll update if I figure out how to code it.