News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Footnotes v1.08 is out!

Started by Nao 尚, April 15, 2009, 04:40:25 AM

Previous topic - Next topic

Nao 尚

An update to Footnotes is available!

v1.06
! Quoting messages with footnotes would break them if user has Wysiwyg enabled by default.

If you're too lazy to uninstall & reinstall, just open Subs.php, search for the line that starts with if (stripos($message, '[nb]')
And replace it with:

if (stripos($message, '[nb]') !== false && (empty($parse_tags) || in_array('nb', $parse_tags)) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'jseditor'))
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Hj Ahmad Rasyid Hj Ismail

#121
Nao, your mod is good and very useful but... it always conflict with others especially when it modifies Subs.php file on this:

<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[static $disabled;]]></search>
<add><![CDATA[static $disabled, $feet = 0;]]></add>
</operation>


More forum owners will use this if it has less conflicts with other mods that are modifying the same line. IMHO you can avoid the conflicts by changing the above code to this:

<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[static $disabled]]></search>
<add><![CDATA[static $disabled, $feet = 0]]></add>
</operation>


It will work the same but will do more good especially when the original line have been modified and added with other code.

I also attached the modified one with Malay Translation here.

Nao 尚

Well, what mod does it conflict with, exactly?

And please remove your attachment. I do not allow redistribution of original or modified versions of my mod without authorization. Yes, even here...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Hj Ahmad Rasyid Hj Ismail

#123
Quote from: Nao on June 19, 2010, 06:08:42 PM
Well, what mod does it conflict with, exactly?

And please remove your attachment. I do not allow redistribution of original or modified versions of my mod without authorization. Yes, even here...
1. E.g. SimplePortal (and few others that I can't remember now). But it can be easily fixed but manually :(.
2. Done.

Nao 尚

I removed the semi-colon from my install file, so my next update will have this fixed. I couldn't find any reason *not* to do it indeed.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Hj Ahmad Rasyid Hj Ismail

Quote from: Nao on June 21, 2010, 11:38:31 AM
I removed the semi-colon from my install file, so my next update will have this fixed. I couldn't find any reason *not* to do it indeed.
You are welcome Nao. ;)

Akyhne

Hmm, this shouldn't happen. I know I can use the nobbc, but still..

Nao 尚

Why would you put nb bbcode inside code tags anyway? :P
One can only assume you would really want to use these as a way to comment the code outside its box...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Akyhne

Hi Nao.

Is the mod supposed to create a table with the footnote when using the WYSIWYG editor? It does look ok, it's just a little confusing ,one's text is being altered.

Nao 尚

No, it's not.
As stated above, v1.06 fixes any issues with that...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

xrunner

#130
I upgraded my SMF 1.1.11 forum to 2.0 RC3. Before, the footnote text was aligned left with the footnote numbers, now the text is centered in the middle of the page, not at the left next to the footnote number.

Using RGBB Curve theme. They appear OK in the SMF default theme.

What setting can I edit to fix this?

Nao 尚

I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

xrunner

Hey there - You can see some of the testing here (You came to my site some time ago to test this mod, probably should still have an account). Some of the footnotes are more to the left than others.

http://www.atheistthinktank.net/thinktank/index.php?topic=8951.0

xrunner

Problem solved - it was my fault. I didn't select to install it to an alternate theme I was using.

Nao 尚

I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

xrunner

#135
OK one of my members did find a bug and I cannot see what they did wrong.

This structure -

Sentence 1.[nb]sentence 1 foot[/nb]


[quote]
quote 1[nb]quote 1 foot[/nb]
[/quote]


places ALL of the footnotes within the last quote block. That is not right. The first footnote (sentence 1) should be a footnote at the bottom of the post.

You can see it here -

http://www.atheistthinktank.net/thinktank/index.php?topic=9012.msg169939#msg169939

After playing with it, it seems the last quote block in a post that uses footnotes "steals" all the footnotes and places them in the last quote block.

I am running SMF 2.0 RC3. It happens in both the default theme and the RGBB Curve theme. I uninstalled and then downloaded and reinstalled your mod this morning, but it didn't fix the problem. I also turned off on on wysiwyg and it makes no difference.

Installed mods -

1.     Footnotes      1.06      
2.    Karma Description Mod    2.6.8    
3.    Aeva Media    1.3a    
4.    Inline Hover Spoiler    1.5

Nao 尚

Actually, it seems that the current quote steals all unquoted footnotes posted between the previous quote and the current quote.
So it's not as big a deal as one could think. Which is also probably why this wasn't found out until now -- usually, when you quote a footnote, you're not the guy who does the footnote trick. (I've noticed only a small share of my noisen users are using footnotes, mainly those who post long messages like I do.)

I have to split myself between Aeva Media 2.x and the rest right now, but I'll try to find some time to look into it. The current code for footnotes is very complex (because it was very hard to make sure quoted footnotes would remain inside the current quote, as it wasn't the case in earlier versions), but I'm hopeful I can do something about it.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

xrunner

Quote from: Nao on August 01, 2010, 01:32:34 PM
I have to split myself between Aeva Media 2.x and the rest right now, but I'll try to find some time to look into it. The current code for footnotes is very complex (because it was very hard to make sure quoted footnotes would remain inside the current quote, as it wasn't the case in earlier versions), but I'm hopeful I can do something about it.

Thanks, I'm sure you can fix your baby. If any group can break software it's mine!  :P

Nao 尚

At least the quote stuff is manual parsing, not regex. It shouldn't be too much of a nightmare.
Probably won't be able to look into it until tomorrow, though.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

KensonPlays

Yea Nao, footnotes are for basically one purpose. No updates needed. I hope that in SMF 3.0 it is a default feature! (tick to enable/disable)

Owner of Mesozoic Haven

Advertisement: