News:

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

Main Menu

Inline Hover Spoiler BB Code

Started by Fangs404, October 07, 2008, 12:59:56 AM

Previous topic - Next topic

KahneFan

The opacity worked great... on FireFox... darn IE  >:(
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

wastrel

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

Fangs404

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.

wastrel

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.

wastrel

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!

Fangs404

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!  :)

Chelle

#26
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.
Disclaimer: The above post may contain elements of cheekiness.

My eccentricity has nothing to do with my stabilization

countstex

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?

Fangs404

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.

c23_Mike

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?
So long, Mike

http://www.c23.at
c23 - DER Computer Club
~ never play alone ~

Fangs404

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?

Fangs404

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.

nwobhm

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']),

Camu

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

nwobhm

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?

Camu

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

c23_Mike

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).
So long, Mike

http://www.c23.at
c23 - DER Computer Club
~ never play alone ~

Fangs404

Thanks guys.  I'm gonna fix this and then upload the fixed version.

Fangs404

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.

xrunner

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.

Advertisement: