Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Nao 尚 on April 15, 2009, 04:40:25 AM

Title: Footnotes v1.08 is out!
Post by: Nao 尚 on April 15, 2009, 04:40:25 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1771)

Footnotes v1.08
Developed by Nao/Gilles (http://www.simplemachines.org/community/index.php?action=profile;u=13794)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1771) | Demo post (http://aeva.noisen.com/dev/5143/test-svn-releases/150/) | Support Topic (http://www.simplemachines.org/community/index.php?topic=304926.0)


What does it do?
This mod adds a "nb" button to your message editor. The new [nb] tag allows you to show footnotes (aka nota bene) in a message, just like in Wikipedia or Spip.

Features

License Agreement
Do you like reading annoying legal mumbo-jumbo? Neither do I. So let's cut the crap and skip to the rules.
Footnotes is completely free to use, even on commercial websites. By installing it, however, you agree to the following rules.
Otherwise, you're in breach of the licence and will be exposed to potential damage such as a lawsuit, complete and utter humiliation in public, and not finding your shoes when you're already late for work.


Compatibility
It should work on any version of SMF 1.1.x and any version of SMF 2.0 (Beta 2 or later). The quoted footnotes feature only works on SMF2, though.
All previous versions of this mod MUST be uninstalled BEFORE installing this version. Also, make sure to backup your database and files first.

Support

Changelog
v1.08
! A last-minute code optimization broke multiple footnotes. Oops.

v1.07
! Fixed quoted footnotes compatibility with SMF2 Public RC3
* Improved compatibility with other mods at install time

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

v1.05
! Fixed compatibility with SMF2 Public RC2

v1.03
+ Added support for nested footnotes. You can now have a footnote inside another footnote (and so on). The footnote will be shown immediately below its parent.
+ When quoting a message that has a footnote, the footnote will now appear directly at the bottom of the related quote, rather than below the entire post, which should clear confusion about who wrote which footnote (the poster or the quoted).
! Fixed support for SMF2's Curve theme. 'clear: both' had to go... If you're having layout issues because of this, use 'overflow: auto' on the parent div. If that means anything to you.
* [nb] tag is now case insensitive

v1.02
! If two or more footnotes had the same content in a single message,
  links pointing to the duplicate contents would be broken

v1.01
! The tag would break when switching between Wysiwyg modes in SMF2

v1.0
@ First release
Title: Re: Footnotes
Post by: Blinker on April 15, 2009, 05:04:46 AM
Wow, interesting mod Nao, thanks!

I think many of my members can make good use of this.

Tested and working fine on 1.1.8 on default and custom theme. Excellent work. :)
Title: Re: Footnotes
Post by: Nao 尚 on April 15, 2009, 05:12:31 AM
Thanks :)
I figured it would be nice to try and get my first actual mod out (ie not something someone else created in the first place). It's small but it's nice for copywriters.

I'm still not sure about the tag name though. I originally used [ref] then switched to [note] then [nb] (nota bene), it can still be changed to [note], what do you think?
Title: Re: Footnotes
Post by: mforum on April 15, 2009, 05:15:26 AM
This image http://custom.simplemachines.org/mods/index.php?action=download;mod=1771;id=94126;image

has [ref] instead of [Nb], it might confuse some users  :)
Title: Re: Footnotes
Post by: Blinker on April 15, 2009, 05:23:29 AM
Quote from: Nao 尚 on April 15, 2009, 05:12:31 AMThanks :)
I figured it would be nice to try and get my first actual mod out (ie not something someone else created in the first place). It's small but it's nice for copywriters.

It's nice to 'own' something! I also think a small, simple mod like this a good start and the added benefit is no more complicated support and having people get the ******s with you because they think you owe them dedicated support. Between AEVA and SMG you need a break from complex issues.

Quote from: Nao 尚 on April 15, 2009, 05:12:31 AMI'm still not sure about the tag name though. I originally used [ref] then switched to [note] then [nb] (nota bene), it can still be changed to [note], what do you think?

I think [nb] is fine. Everyone knows what it means and it's also what's on the button itself. Leave it. For now at least...
Title: Re: Footnotes
Post by: Nao 尚 on April 15, 2009, 05:33:21 AM
Quote from: Blinker on April 15, 2009, 05:23:29 AM
It's nice to 'own' something! I also think a small, simple mod like this a good start and the added benefit is no more complicated support and having people get the ******s with you because they think you owe them dedicated support. Between AEVA and SMG you need a break from complex issues.
Lol, did you read into my mind? ;)
Although Aeva is much easier to handle now. I had a flood of bug reports coming when I released v6, which were mostly due to an undocumented (and unreported?) bug on PHP 5.2. Now that everything works nicely, the topic is as quiet as it has ever been :)

QuoteI think [nb] is fine. Everyone knows what it means and it's also what's on the button itself. Leave it. For now at least...
I wasn't sure everyone knew what NB means. I felt like it was more used in French than in English. It has the advantage of taking up less space in a message. [nb]Yay.[/nb]
I'm just saying because I already have these alternative "note.gif" and "ref.gif" buttons if anyone wants them, lol.
Title: Re: Footnotes
Post by: Blinker on April 15, 2009, 06:11:58 AM
Quote from: Nao 尚 on April 15, 2009, 05:33:21 AMLol, did you read into my mind? ;)

Haha, let's put it this way - sometimes, if I feel like a cheap laugh, I read a few pages of the AEVA & SMG threads, or an SMG thread on the official site....your posts and the shocked replies of the poor hapless users amuse me tremendously. (Not that I enjoy seeing others struggle with their boards, it's just the comedy in the posts).

LOL, sometimes I feel like you're not doing the legendary arrogance of the French any favours, but mostly you're somewhat justified. Either way, I often laugh. :P I am smiling even now as I type. :D

Quote from: Nao 尚 on April 15, 2009, 05:33:21 AM
QuoteI think [nb] is fine. Everyone knows what it means and it's also what's on the button itself. Leave it. For now at least...
I wasn't sure everyone knew what NB means. I felt like it was more used in French than in English.

OK, let me clarify - "Footnote" is the correct term for what the mod is being used for, but actually in English I think the most correct usage of the N.B. or Nota Bene is to tell people "Take Note" or "Pay Attention" or "Important Note" or "Very Important". Keeping that in mind, in the case of this mod NB may not be the most appropriate use of the term. Generally the correct terminology would be footnote, citation, annotation etc etc.....but for your humble piece of coding I think it (NB) will be fine.

/thread hijack and English lesson for today. O:)
Title: Re: Footnotes
Post by: Nao 尚 on April 15, 2009, 06:27:49 AM
Quote from: Blinker on April 15, 2009, 06:11:58 AM
LOL, sometimes I feel like you're not doing the legendary arrogance of the French any favours, but mostly you're somewhat justified.
Hey that used to be in my sig after all ;)
And I'm not really arrogant -- I simply lack patience in front of people who don't, themselves, have the patience to read through a documentation to find the answer to their questions.

QuoteOK, let me clarify - "Footnote" is the correct term for what the mod is being used for, but actually in English I think the most correct usage of the N.B. or Nota Bene is to tell people "Take Note" or "Pay Attention" or "Important Note" or "Very Important".
"Take note", "Veuillez noter que...", it's pretty much the same as "Footnote" to me ;)

QuoteKeeping that in mind, in the case of this mod NB may not be the most appropriate use of the term. Generally the correct terminology would be footnote, citation, annotation etc etc.....but for your humble piece of coding I think it (NB) will be fine.
And I'm trying to keep the tag name short. 4 letters is the most I can do. That's why I thought of "note", but mforum pointed out that it may be so generic that it gets in conflict with possibly other "note" tags. But I don't recall seeing any "note" tag up till now, so... Let's say if I change the tag, I'll have to change it today, once and for all.
Title: Re: Footnotes
Post by: Groundhog on April 15, 2009, 12:47:11 PM
Smart little mod Nao 尚.

I'll have fun inventing reasons to use this mod. It's simple to use, thanks.  :)
Title: Re: Footnotes
Post by: Özgür on April 15, 2009, 01:25:26 PM
Nice mod Nao.
But have a two small bug (for me :S maybe..)
1 - If the description ended with the non-english character when footnotes not work.
Im try this
尚 => non-english
1 senelik konu ve artık zaten sınırlama yok.[nb]Nao 尚[/nb] Nao
2 - And If i try using [nb] to quick reply and try preview seems like in this attachment

And notice : If i use 1 senelik konu ve artık zaten sınırlama yok.[nb]Nao 尚[/nb] Nao not in nobbc    
It does not look after "Nao " in this site too. Maybe this is smf bug.
Title: Re: Footnotes
Post by: Marcus Forsberg on April 15, 2009, 01:32:38 PM
Good job Nao! Keep it up!
Title: Re: Footnotes
Post by: Nao 尚 on April 15, 2009, 04:28:15 PM
Thanks guys!

Ozgur, I have no problem with non-English characters. I tried with my nickname here:
http://forum.noisen.com/4964/nao-se-remet-au-boulo/msg230516/#msg230516

It brought me to test the thing with Wysiwyg on, though -- and I realized it doesn't work. Of course -- I'm not using the regular tag handling so I should be implementing everything by hand. I'll look into fixing that. Maybe not right now though -- it'll require some thinking. I'll try to find a solution that isn't the same as in Aeva -- because it might conflict with it.

Edit -- a quick fix:

Open Subs.php

Search for

if (stripos($message, '[nb]') !== false)

Replace with

if (stripos($message, '[nb]') !== false && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'jseditor'))

It seems to work for me (switching between non-wys/wys), but it might create more issues (SSI functions?). Could you test this? Thanks!

Edit 2 -- I fixed the fix to fix broken previews. C'est un bon chien, Idefix ! (Okay it doesn't translate well...)
Title: Re: Footnotes
Post by: Özgür on April 15, 2009, 04:56:37 PM
Fix is working. But i guess character problem is my site problem. Because my site have is a problem not solved for character encoding. (here (http://www.simplemachines.org/community/index.php?topic=302468.0))

Thanks for the nice mod and quick fix. You are awesome Nao. =)
Title: Re: Footnotes
Post by: Nao 尚 on April 15, 2009, 05:46:35 PM
Okay I've uploaded v1.01 with the fix. To anyone using SMF 1.1.x: no need to update, it's a SMF2-centric fix ;)
Title: Re: Footnotes
Post by: damnitmike on April 15, 2009, 08:08:25 PM
QuoteI'm still not sure about the tag name though. I originally used [ref] then switched to [note] then [nb] (nota bene), it can still be changed to [note], what do you think?

Hmmmm....maybe, let the user call it what they want?  Trying to think of a cool example........If someone has a forum about......Ohh I dunno, let's say candy. They could call it a .......  Pez.....no, an M&M........oh I dunno!......lol.....


Anyhow.....A pretty creative mod!!! I'm going to try it!

You do nice work Nao!
Title: Re: Footnotes
Post by: Tiribulus on April 15, 2009, 08:21:15 PM
Oh, my wife's gonna love this one buddy, and for free yet :o

Great idea 8)
Title: Re: Footnotes
Post by: xrunner on April 15, 2009, 08:27:26 PM
Just added - outstanding! I love it - great mod.
Title: Re: Footnotes
Post by: Nao 尚 on April 16, 2009, 03:07:11 AM
There's a saying that says, "There's no pleasing some people"... I just found out the opposite also exists :D Or maybe it's just confirmation that "size doesn't matter" eheh. It's the smallest possible mod I could have thought of. Maybe I could convince the SMF staff to include it in the core code? After all it does make sense for long posts... More than the "glowing text" bbcode for instance ;)

@damnitmike> Although it's technically easy to do that, I don't think it's in anyone's interest. I think [nb] is good as it is.
Title: Re: Footnotes
Post by: damnitmike on April 16, 2009, 04:00:12 PM
Hmmmm....seems we lost some posts here after the server maintenance....

Nao...your fix for me did the trick.....without going back into my cpanel and going by memory, the !important! with the font size 9 worked beautifully in the css.styles.........

It shrunk the nb number and brackets, and also moved them up slightly....

Niiiiice..........It also works superbly in vbgamers Article mod, and I might add it was displaying differently there also, but is fixed now!

Title: Re: Footnotes
Post by: DeviDarkL on April 16, 2009, 04:14:31 PM
Great mod Nao. Very useful to me eheh ;)

Here is Portuguese_PT translation:

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['noisen_footnote'] = 'Nota de Rodapé';
]]></add>
</operation>
</file>
Title: Re: Footnotes
Post by: Nao 尚 on April 16, 2009, 04:58:27 PM
Quote from: damnitmike on April 16, 2009, 04:00:12 PM
Hmmmm....seems we lost some posts here after the server maintenance....
Yay... Wonderful..... -_-
SM.org also lost my 1.02 update. I had to reupload it.

mforum, I somehow missed your post! I don't know how, since it was one of the first. I've updated the screenshot to the newer tag, thanks.

QuoteNao...your fix for me did the trick.....without going back into my cpanel and going by memory, the !important! with the font size 9 worked beautifully in the css.styles.........
Yeah I had time to see this. If you didn't catch my answer: was it due to !important or the 9px thing? I used "smaller" as the size, because there's no way for me to know what theme everyone is using, and what font size is in use. Using percentages would work, too, and I would strongly recommend that. Try font-size: 90% and 80%, I'm sure one of these will be good, and it will be compatible with all font sizes. Maybe I'll revert to a percentage in a future release, so try to find the best one for you, and if I'm lazy enough, I'll use that one ;)
Title: Re: Footnotes
Post by: damnitmike on April 16, 2009, 05:22:35 PM
Actually, I copied and pasted your code for the fix, so I don't know what did it....I was thinking the font size number did the trick because, in my experience, it forces the size specifically ?

Heck, I dunno,  maybe the important bit had something to do with it also....

Anyhooo.....its all golden now...

Thanks!
Title: Re: Footnotes
Post by: Nao 尚 on April 17, 2009, 05:37:19 AM
Quote from: damnitmike on April 16, 2009, 05:22:35 PM
Actually, I copied and pasted your code for the fix, so I don't know what did it....I was thinking the font size number did the trick because, in my experience, it forces the size specifically ?
Could you just remove the "!important" bit, please?
And testing for percentage solutions would be cool, really.
Title: Re: Footnotes
Post by: damnitmike on April 17, 2009, 09:46:52 AM
Ok Nao.....more than happy  to help!

I removed the !important......no problems, still looked right.

I changed the font number to a %.......60% looked perfect......

It just didn't like the word small or super (duhhhh......I forget which is was)

8)
Title: Re: Footnotes
Post by: Nao 尚 on April 17, 2009, 10:22:17 AM
The word was "smaller" ;)
60% then? Okay, I'll try to remember that.
Title: Re: Footnotes
Post by: damnitmike on April 17, 2009, 10:28:57 AM
It made sense and is easy to remember.... I started at 90 and worked down.

Got to 60 and said, now that makes sense.....its alittle over 1/2 the size of the regular text........

When you jump into your next mod, (hint hint) I'll be happy to test er also!

I gotta say *off topic* you tore the AEVA mod up bro!!!! That thing is sweeeet!!!




Title: Re: Footnotes
Post by: Akyhne on April 19, 2009, 09:15:41 PM
Quote from: Nao 尚 on April 15, 2009, 05:12:31 AM
Thanks :)
I figured it would be nice to try and get my first actual mod out (ie not something someone else created in the first place).

LOL, I was earlier out than you were, and i can barely program anything...

NB is well known in my country, so it's logical to me.
Title: Re: Footnotes
Post by: Rehash D Internet on April 21, 2009, 03:47:50 AM
Hi. Is there any way to determine the space between the text and the number of the footnote? It seems to be different every single time.. I just want the footnote tight to the number.
Title: Re: Footnotes
Post by: Nao 尚 on April 21, 2009, 04:05:31 AM
What do you mean?
Link to an example of your issue?
Title: Re: Footnotes
Post by: Rehash D Internet on April 21, 2009, 04:22:00 AM
Well, some footnotes appear like this:

[1] Example

And others like this

[2]                                                                Example

And yet others like this

[3]                          Example

It's really inconsistent for some reason.
Title: Re: Footnotes
Post by: Nao 尚 on April 21, 2009, 05:49:51 AM
Again: link?
Title: Re: Footnotes
Post by: Rehash D Internet on April 21, 2009, 06:31:01 AM
Quote from: Nao 尚 on April 21, 2009, 05:49:51 AM
Again: link?

http://www.surgicalaplomb.com/index.php?topic=3451.msg338835#new

You'll notice each use of the code puts the text at a different indent from the number.
Title: Re: Footnotes
Post by: Nao 尚 on April 21, 2009, 08:27:06 AM
Why didn't you say you had a custom theme in the first place?

You forgot to apply the style.css changes to your deeppink.css file....
Title: Re: Footnotes
Post by: Rehash D Internet on April 22, 2009, 12:12:28 AM
There is no "?>" in my deeppink.css. I've tried adding the code but it makes no difference to the alignment.
Title: Re: Footnotes
Post by: Nao 尚 on April 22, 2009, 05:24:36 AM
Why should there be a "?>" in deeppink? I don't see your point.
Are you trying to add PHP code to a stylesheet? lol...
Please learn how to install a mod before you attempt to actually do it. Some things have to be learnt one way and not the other way around.
Title: Re: Footnotes
Post by: Tiribulus on April 22, 2009, 09:05:33 AM
Not so fast there bucko

The Parser is saying to add the css code before ?> Don't ask me ???

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgregnmary.gotdns.com%2Fpix%2Freplace1.jpg&hash=a1197ca79dedb89e40ae96482f339df87394acdc)
Title: Re: Footnotes
Post by: Nao 尚 on April 22, 2009, 09:50:35 AM
("bucko"?)

That's a bug in the parser. Don't blame me for it. All my script says is "add this data at the end of the style.css file". The parser says "Find (at the end of the file)", it shouldn't add anything really. Report that bug to the mod site team if you'd like, lol.
Title: Re: Footnotes
Post by: Tiribulus on April 22, 2009, 10:02:04 AM
Quote from: Nao 尚 on April 22, 2009, 09:50:35 AM
("bucko"?)

That's a bug in the parser. Don't blame me for it. All my script says is "add this data at the end of the style.css file". The parser says "Find (at the end of the file)", it shouldn't add anything really. Report that bug to the mod site team if you'd like, lol.

You never saw happy days :)

I wasn't blaming you. I was only saying that this chap could be forgiven for thinking as much since the parser does say what he says.
Title: Re: Footnotes
Post by: Nao 尚 on April 23, 2009, 02:18:43 AM
Quote from: Tiribulus on April 22, 2009, 10:02:04 AM
You never saw happy days :)
Yes but in French only, lol. Who says bucko? The Fonze?
Title: Re: Footnotes
Post by: Tiribulus on April 23, 2009, 07:24:47 AM
Quote from: Nao 尚 on April 23, 2009, 02:18:43 AM
Quote from: Tiribulus on April 22, 2009, 10:02:04 AM
You never saw happy days :)
Yes but in French only, lol. Who says bucko? The Fonze?

Remember whenever Richie Cunningham was being firm with somebody (which was the joke), he'd say "now look here Bucko" lol, nevermind, I was goofin around. In French it's probably "Buckois" ;D
Title: Re: Footnotes
Post by: Rehash D Internet on April 28, 2009, 11:19:55 AM
Thanks for the help, spod.
Title: Re: Footnotes
Post by: Rehash D Internet on April 28, 2009, 11:28:35 AM
I've edited the style sheet and it's still faulty.
Title: Re: Footnotes
Post by: Nao 尚 on April 29, 2009, 02:31:57 AM
Works just fine for me (on your website).
Are you sure you hard-refreshed the page? ;)
Title: Re: Footnotes
Post by: Rehash D Internet on April 29, 2009, 09:06:09 AM
Positive. I just don't understand why the spacing seems to be so ambivalent.
Title: Re: Footnotes
Post by: Nao 尚 on April 29, 2009, 11:15:49 AM
Try again. Empty your cache. It works perfectly on Opera on your website.
Title: Re: Footnotes
Post by: Rehash D Internet on April 29, 2009, 06:13:03 PM
When you view the footnotes page on my forum?

Run me through the hard-refresh again, Spod.
Title: Re: Footnotes
Post by: Nao 尚 on April 29, 2009, 06:19:03 PM
It still doesn't work?
Try with Opera. Now, does it work or not?
Title: Re: Footnotes
Post by: LHW on May 29, 2009, 12:04:35 AM
Love this Mod, Nao!  Thank you very much for putting it together!  :D

One question, though...

How would I go about adding a line between the footnotes themselves?  I recently made a post with 31 lengthy footnotes (here (http://www.essentialknights.com/tcf/index.php?topic=556.msg12768#msg12768)), and they all seem to blend together.  I think that having a blank line between them will make it easier to read.  Perhaps an option to add a separating line between them??  ;)

Thanks!

EDIT: Nevermind...a [br] at the end of each footnote does the job just as well.  Thanks again!
Title: Re: Footnotes
Post by: Nao 尚 on May 29, 2009, 02:36:14 AM
Quote from: Essential Knight on May 29, 2009, 12:04:35 AM
Love this Mod, Nao!  Thank you very much for putting it together!  :D
You're welcome.
I was just thinking yesterday, how it's funny that Footnotes is actually more used (and more critically acclaimed) on my noisen.com website than Aeva itself ;)
I made Footnotes in less than an hour, while I worked on Aeva for 3 months.
That's probably linked to the fact that they're very talkative ;)

QuoteHow would I go about adding a line between the footnotes themselves?  I recently made a post with 31 lengthy footnotes, and they all seem to blend together.  I think that having a blank line between them will make it easier to read.  Perhaps an option to add a separating line between them??  ;)
First of all, could you please edit your link out? I would rather not have any religious content linked on threads I'm responsible with. Thanks. Long story.

Not a bad idea per se, but a full line like you did may be too much... A few pixels should be enough. There should be a nice possible tradeoff between no space and a full line. Something that's non-negotiable I mean. Because I'd rather avoid adding settings for the mod -- it should be an easy mod that works out of the box.

Also, I would like to look into adding more typography/newspaper-type features to SMF, just like Footnotes. Anyone interested in sharing ideas?
Title: Re: Footnotes
Post by: madinmex on July 25, 2009, 09:25:23 PM
Nao,

I just love this, thank you very much indeed. Sadly, Although rather intelligent, my members are are a bit computer illiterate so have some  explaining ahead !!

Great mod  :D
Title: Re: Footnotes
Post by: Nao 尚 on July 26, 2009, 11:31:06 AM
It's just a matter of weeks before your smarter members will start using it daily, like I do ;)
Of course it's only useful if they tend to be living browsers with hyperlinks coming up in their mind every other second...
Title: Re: Footnotes
Post by: KensonPlays on August 16, 2009, 01:42:18 PM
1.1.10 is pretty new, does it work for this?
Title: Re: Footnotes
Post by: Nao 尚 on August 16, 2009, 05:29:16 PM
I guess so... It doesn't touch a lot of lines of code. I'll update the mod page to say it's compatible. If you find it isn't, please post here.
Title: Re: Footnotes
Post by: Özgür on September 25, 2009, 02:19:39 PM
Nao are you think add new features on this mod?
I think some new features look good.
You must look at http://elvery.net/drzax/more-things/wordpress-footnotes-plugin/ Im using in my blog http://www.mnyk.net/film/izlenesi-film-rocknrolla/
Referencing and [↩] link should be useable and nice.
Title: Re: Footnotes
Post by: Nao 尚 on September 25, 2009, 06:53:59 PM
Lol, wasn't aware of that plugin... It even has the same name as mine but it predates it by two years ;)

The webpage is too long, no time to read it. What's so nice about that one? I'm not willing to add new features just for the sake of completion -- I like keeping my mods small when they're not supposed to be bloated and everything. Too much on my hands with SMG and Aeva already ;)

The only update I'm planning to do so far is to make it compatible with SMF2's Curve theme when it comes out. Currently it doesn't look too good on it.
Title: Re: Footnotes
Post by: Özgür on September 25, 2009, 08:52:34 PM
[↩] feature  (i don't know his name :) ) worked like anchors. ;
All footnote description have this link. If you click any footnote (meaning 1 ) you go to 1 description, but if you want to go back your previous line, you must use the scrollbar. But if footnote description have [↩] , and you click it, you go to your previous line(line for 1) in message area.

And Referencing feature is just like add reference. [ref:2] add to 2 meaning; if you want to use one footnote on many location, you can use this.

And all these feature don't need template edit i guess. (:
Title: Re: Footnotes
Post by: Nao 尚 on September 26, 2009, 07:09:09 AM
Quote from: [Daydreamer] on September 25, 2009, 08:52:34 PM
[↩] feature  (i don't know his name :) ) worked like anchors. ;
All footnote description have this link. If you click any footnote (meaning 1 ) you go to 1 description, but if you want to go back your previous line, you must use the scrollbar. But if footnote description have [↩] , and you click it, you go to your previous line(line for 1) in message area.
Err... That feature is already in, it has been since day 1 actually. You just click on the number and you're taken back to the original text.

QuoteAnd Referencing feature is just like add reference. [ref:2] add to 2 meaning; if you want to use one footnote on many location, you can use this.
I don't get it...?
You mean adding a footnote that redirects to another footnote in another post/page?

QuoteAnd all these feature don't need template edit i guess. (:
Nothing in Footnotes requires a template edit. Otherwise that wouldn't be fun writing it.
Title: Re: Footnotes
Post by: Nao 尚 on October 26, 2009, 09:46:13 AM
Hey guys.
I'm currently working on Footnotes 1.03... Actually it's such a huge core update that it might as well be called 2.0, lol :P, and noticed something that bothers me...
When I try nesting [nb] tags within each other, the nested tags (i.e. a footnotes inside a footnote itself) aren't parsed. I'm working on allowing this for v1.03, but the thing is, I seem to remember that they USED to be parsed.
Did anyone try this earlier and discuss it with me? Or am I just imagining things?
Title: Re: Footnotes
Post by: Nao 尚 on October 26, 2009, 11:05:47 AM
Footnotes v1.03 is out!

+ Added support for nested footnotes. You can now have a footnote inside another footnote (and so on). The footnote will be shown immediately below its parent.
+ When quoting a message that has a footnote, the footnote will now appear directly at the bottom of the related quote, rather than below the entire post, which should clear confusion about who wrote which footnote (the poster or the quoted).
! Fixed support for SMF2's Curve theme. 'clear: both' had to go... If you're having layout issues because of this, use 'overflow: auto' on the parent div. If that means anything to you.
* [nb] tag is now case insensitive

(Okay, couldn't wait for feedback on this... It works anyway. Try to break it :P)
Title: Re: Footnotes
Post by: dannbass on October 26, 2009, 12:32:10 PM
Quote from: Nao/Gilles on May 29, 2009, 02:36:14 AM
Also, I would like to look into adding more typography/newspaper-type features to SMF, just like Footnotes. Anyone interested in sharing ideas?

Thank you for the mod! I'm testing the nested footnotes, and those look great!!
I've always liked the columns in newspapers and magazines... something for the layout of a post in specific.  Maybe that would be more for a front page post... for a portal or so, but hey... it's just an idea!

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.fontshop.com%2Fimages%2Ffeatures%2Ffontmag%2F02_news%2F02_news_header2.gif&hash=3128f8386f805b6ecc622d1490136ef145ad35ba)
Title: Re: Footnotes
Post by: Nao 尚 on October 26, 2009, 01:19:40 PM
I was actually thinking of a mod for making multipage articles like on http://dossiers.cyna.fr/ (it's an old site of mine, based on SPIP)
Although I like what they're doing on www.gameblog.fr (see their reviews -- you can choose to have single or multicolumn in one click. It's fun.)

But really I'm not sure there would be much feedback on that.
Title: Re: Footnotes
Post by: dannbass on October 26, 2009, 01:42:11 PM
 :o I'm speechless! that is fun!! (http://www.gameblog.fr/test_448_ratchet-clank-future-a-crack-in-time-playstation-3) the pagination also... oh well...

The idea of a multipage article mod would be great, and I think you will get a lot of feedback from that, they do use articles a lot and that's a feature that is not currently available.
Title: Re: Footnotes
Post by: Nao 尚 on October 26, 2009, 01:56:04 PM
Yeah, it feels like their webmaster had a blast playing with Javascript, eh? ;)
I do however think it tends to be a bit too overcrowded in the end. Too many features... Doesn't help clarity. For instance, clicking on a column to skip to the next page is fun... But it's also a bit confusing. A big "Next" button would feel more appropriate. Etc.

Again, I'm not planning to make such a mod in the near future, it's not like I'm having a lot of free time anyway ;) I didn't even think I'd end up spending my whole day on this new version of Footnotes...
Title: Re: Footnotes
Post by: dracomiconia on October 26, 2009, 04:37:51 PM
Well, I would like to have a multi-page (or multi-chapter) articles mod....

You can see how is my forum articles... with 7 chapters in an story... and growing
Title: Re: Footnotes
Post by: LHW on October 26, 2009, 06:31:39 PM
Thanks for the update, Nao!  Good job!  (https://www.simplemachines.org/community/Themes/default/images/post/thumbup.gif)
Title: Re: Footnotes
Post by: Nao 尚 on October 27, 2009, 01:47:27 AM
As I said, try to break the tag if you can :)
I'm always interested in stress tests.

@dracomiconia> My conception of multipage is, unlike my old SPIP-based site, Javascript based. i.e. it has all pages in memory and only shows the next portion when you click on a button, but it doesn't actually load anything more (ie it's immediate).
Is that what you're looking for?
Title: Re: Footnotes
Post by: dracomiconia on October 27, 2009, 03:24:52 AM
Well.... I was thinking in anything like long reviews in Motherboards.org:

http://www.motherboards.org/reviews/motherboards/1953_1.html

For example.

Title: Re: Footnotes
Post by: Nao 尚 on October 27, 2009, 04:02:57 AM
Yes, something similar to what I had in Dossiers Cyna, I understand that.
But it would require playing with the URL to add a new variable and I wouldn't like that. Hence my comment.
Of course, anything can be done. But starting work on a more complex mod with plenty of features? Nope. That would be a big mistake for me.
Title: Re: Footnotes
Post by: LHW on October 27, 2009, 07:48:47 AM
Quote from: Nao/Gilles on October 27, 2009, 01:47:27 AM
As I said, try to break the tag if you can :)
I'm always interested in stress tests.

Not really a stress test, but something I thought you'd be interested in...

Under SMF v1.1.10, both Footnotes & SMG are adding code before this line in Subs.php:

// Cache the output if it took some time...

So, you either have to remove one to upgrade the other, or you need to manually parse whichever one was installed last.

Not THAT big of a deal, but it may give you headaches when n00bs run into this issue.
Title: Re: Footnotes
Post by: Nao 尚 on October 27, 2009, 09:42:45 AM
Are you sure? I don't see anything in Footnotes...
I guess I specifically made sure not to collide with SMG and hooked my code to another line, the one above or below, precisely not to run into any conflicts. That's pretty much the only place I could stick my code into really... ;)
Title: Re: Footnotes
Post by: dannbass on October 27, 2009, 10:19:55 AM
Quote from: Lord High Warlock on October 27, 2009, 07:48:47 AM

Not really a stress test, but something I thought you'd be interested in...

Under SMF v1.1.10, both Footnotes & SMG are adding code before this line in Subs.php:

// Cache the output if it took some time...

So, you either have to remove one to upgrade the other, or you need to manually parse whichever one was installed last.

Not THAT big of a deal, but it may give you headaches when n00bs run into this issue.

Really? are you sure? I have 1.1.10, SMG, and Footnotes, and both were a clean install, no conflicts whatsoever.
Title: Re: Footnotes
Post by: Nao 尚 on October 27, 2009, 10:57:56 AM
I think Warlock looked at the resulting file, rather than the install scripts. Which explains why you're both right ;) (But you're more righter than he is.)
(Yeah I know it's not proper English but I'm the master of this topic, mwahaha!)
Title: Re: Footnotes
Post by: LHW on October 27, 2009, 10:59:36 AM
Yeah, they both installed without a problem.  And since I installed Footnotes way before SMG, it hasn't been a problem uninstalling SMG for all the beta testing.  However, when I went to upgrade Footnotes, it failed on the Subs.php file because the SMG code was immediately above that line, and not the expected Footnotes data.

So, when I upgraded Footnotes, I simply moved the SMG code (not knowing what it was at the time) so it was before the Footnotes code.  Later on, SMG failed to uninstall because the Footnotes data was where it expected its own data to be.

For v1.1.10, these are the respected parts that are added to the Subs.php file:

Footnotes:
// Footnotes mod by Nao
if (stripos($message, '[nb]') !== false && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'jseditor'))
{
preg_match_all('~\s*\[nb]((?>[^[]|\[(?!/?nb])|(?R))+?)\[/nb\]~i', $message, $matches, PREG_SET_ORDER);

if (count($matches) > 0)
{
$f = 0;
global $addnote;
if (is_null($addnote))
$addnote = array();
foreach ($matches as $m)
{
$my_pos = $end_blockquote = strpos($message, $m[0]);
$message = substr_replace($message, '<a class="fnotel" name="footlink' . ++$feet . '" href="#footnote' . $feet . '">[' . ++$f . ']</a>', $my_pos, strlen($m[0]));
$addnote[$feet] = array($feet, $f, $m[1]);

while ($end_blockquote !== false)
{
$end_blockquote = strpos($message, '</blockquote>', $my_pos);
if ($end_blockquote === false)
continue;

$start_blockquote = strpos($message, '<blockquote>', $my_pos);
if ($start_blockquote !== false && $start_blockquote < $end_blockquote)
$my_pos = $end_blockquote + 1;
else
{
$message = substr_replace($message, '<foot:' . $feet . '>', $end_blockquote, 0);
break;
}
}
if ($end_blockquote === false)
$message .= '<foot:' . $feet . '>';
}

$message = preg_replace_callback('~(?:<foot:\d+>)+~', create_function('$match', '
global $addnote;
$msg = \'<table class="footnotes" width="100%" cellspacing="0" border="0">\';
preg_match_all(\'~<foot:(\d+)>~\', $match[0], $mat);
foreach ($mat[1] as $note)
{
$n = &$addnote[$note];
$msg .= \'<tr><td class="footnum"><a name="footnote\' . $n[0] . \'" href="#footlink\' . $n[0] . \'">&nbsp;\' . $n[1] . \'.&nbsp;</a></td><td class="footnote">\'
. (stripos($n[2], \'[nb]\', 1) === false ? $n[2] : parse_bbc($n[2])) . \'</td></tr>\';
}
return $msg . \'</table>\';'), $message);
}
}
// Footnotes End



SMG:
if (function_exists('smg_parse_bbc') && stripos($message, '[smg') !== false)
smg_parse_bbc($message, $cache_id);



Both are installed before this line:
// Cache the output if it took some time...

Hope this helps.
Title: Re: Footnotes
Post by: dannbass on October 27, 2009, 11:05:14 AM
Oh!! I see... yep, I was going to uninstall SMG just now to do the upgrade and you are right, I got the error there.
Title: Re: Footnotes
Post by: Nao 尚 on October 28, 2009, 05:51:43 AM
Hmm, that's weird... How can this happen?

Does anyone from the Customize team read this? Maybe you can explain what's happening? I thought my "hooking" to different parts of the code would prevent against this kind of error...
Title: Re: Footnotes
Post by: dannbass on November 18, 2009, 11:24:11 PM
Nao, in the 2.0RC2 there is a chance in the Subs-Editor.php, instead of this
'sup' => array('code' => 'sup',
it is now this
array(
'image' => 'sup',
'code' => 'sup',
'before' => '[sup]',
'after' => '[/sup]',
'description' => $txt['superscript']
),
Title: Re: Footnotes
Post by: Nao 尚 on November 19, 2009, 03:00:56 AM
Yes, thanks, although I already did the change on noisen.com, I was waiting until someone complained to have it in the mod itself. I'm just that busy on Aeva Media ;)

So, here it is...

Version 1.05                                   19th November 2009
-----------------------------------------------------------------
! Fixed compatibility with SMF2 Public RC2
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 08:27:15 AM
Thank you! for the update, I moved to 2.0 on Tuesday, finally, I don't know why I waited so long, such an amazing version.  Thank you for your hard work on Aeva Media! I cannot wait to test it!
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on November 19, 2009, 09:33:30 AM
I hope to be able to release a public beta before the end of the month. I'm through with the main merging (the admin area was a hard task because I wanted to move everything into a new top-level menu), haven't tested on SMF1 and will *probably* not be compatible until much later in the beta process.
Now I'm currently evaluating the new features I want to add. (Yeah there are a lot.)

Actually I thought for a minute about adding Footnotes to Aeva Media, but, well... I guess most people would wonder what the point is exactly ;)
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 09:45:22 AM
I'll work on the translation for sure! I see what you are saying for the top-level menu, I don't ever go to the menu on the admin part, it seems too hidden for me.

Quote from: Nao/Gilles on November 19, 2009, 09:33:30 AM
Actually I thought for a minute about adding Footnotes to Aeva Media, but, well... I guess most people would wonder what the point is exactly ;)

I think it will be nice, but most won't know what to do, what I'm actually doing is that I'm using in the [smg] tag an anchor tag as caption, works great, oh well... that's another story of the capabilities of the [smg] tag!
Title: Re: Footnotes v1.05 is out!
Post by: Vyache on November 19, 2009, 09:57:53 PM
Within: ./Sources/Subs.php

I get an install error, it doesn't find this:
static $disabled;
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 10:03:30 PM
Do you have Simple Portal? 'cause it modifies that same line...  install and then search in that file and replace what you have with this $disabled, $feet = 0, $parse_tag_cache; only if you have Simple Portal installed.
Title: Re: Footnotes v1.05 is out!
Post by: Vyache on November 19, 2009, 10:06:27 PM
Quote from: dannbass on November 19, 2009, 10:03:30 PM
Do you have Simple Portal? 'cause it modifies that same line...  install and then search in that file and replace what you have with this $disabled, $feet = 0, $parse_tag_cache; only if you have Simple Portal installed.

What should I search for? $disabled, $feet = 0, $parse_tag_cache;
I don't see that line either...
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 10:12:32 PM
Do you have Simple Portal?
Title: Re: Footnotes v1.05 is out!
Post by: Vyache on November 19, 2009, 10:14:10 PM
Quote from: dannbass on November 19, 2009, 10:12:32 PM
Do you have Simple Portal?

Yes, I have 2.3.1 installed. I don't see that line should I add it some where?
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 10:16:58 PM
Ok, just open your Subs.php
Code (find) Select
$disabled, $parse_tag_cache;

Code (replace) Select
$disabled, $feet = 0, $parse_tag_cache;
Title: Re: Footnotes v1.05 is out!
Post by: Vyache on November 19, 2009, 10:21:36 PM
Quote from: dannbass on November 19, 2009, 10:16:58 PM
Ok, just open your Subs.php
Code (find) Select
$disabled, $parse_tag_cache;

Code (replace) Select
$disabled, $feet = 0, $parse_tag_cache;

I see it, should I just add that variable and install it? The installer is looking for:
static $disabled; 

I get a error even after adding that line...

Thank You, SOLVED
Title: Re: Footnotes v1.05 is out!
Post by: dannbass on November 19, 2009, 10:22:33 PM
Sure, install it and then just open it and add the variable.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on November 20, 2009, 03:59:51 AM
Lol... And yet again, a conflict with Simple Portal! ;)
The problem with the parse_bbc() function is that it's a central function, it's the core of all message parsing, and there aren't many places where you can 'hook' your own code. It seems that SP changes a lot of it. Unfortunately, all of my mods (Aeva, SMG and Footnotes) also make changes to the function.

It would probably be a good thing to discuss this with the SP team, if they're willing to do it. Maybe we could arrange our code together so that it doesn't conflict constantly.

Since I'm merging Aeva and SMG for my next mod, I may also add Footnotes to it, to make sure all three of my mods never conflict again (if you use them all, I mean). Then it would already be slightly easier for SP not to conflict with my stuff. I have a policy of making as little change to the install scripts as possible after a major version is out (ideally, no single change), so that users can upgrade simply by overwriting existing files with the newer versions. This has been done successfully with Aeva in the past, less successfully for SMG, but I hope Aeva Media will be better in that area. Ideally, then, SP and AM could work together on using different hooks in parse_bbc(), and then try no to do any more changes. e.g. implementing a hook that directly calls another function in a separate file would be best.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on November 20, 2009, 08:56:30 AM
I modified the Aeva Media install script to only hook the non-Footnotes-related hook for its code. The 'sift out the BBC' code will no longer be used as a hook. As a result, Footnotes should be perfectly compatible with Aeva Media and thus I won't need to merge it with it ;)
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on December 25, 2009, 04:53:00 PM
Uh, 1.05 doesn't install on RC1.2 correctly, though it tries to; the edit to Subs-Editor.php doesn't take, because it's looking for RC2 style edits, not RC1x style.

No biggie, just thought I'd point it out.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on December 25, 2009, 09:13:34 PM
Hmm 'mkay, updated the mod page ;)
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on December 25, 2009, 09:15:50 PM
Haha, that works ;D
Title: Re: Footnotes v1.05 is out!
Post by: rexusdiablos on January 23, 2010, 12:36:08 PM
Can anyone tell me why I'm told to:

Find (at the end of the file): ?>

in ./Themes/default/css/index.css when it does not exist?

Am I correct to assume that I simply copy and paste the mod css to end of the document?
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on January 23, 2010, 12:38:32 PM
Yes, you do.

Basically, the mod site is very limited in that respect.
Title: Re: Footnotes v1.05 is out!
Post by: rexusdiablos on January 23, 2010, 01:10:00 PM
Yeah, I was thinking that. It would be useful to note the distinction between the following two paths in the instructions:

./Themes/default/style.css

./Themes/default/css/index.css


I know it might seem trivial but a coding novice might simply misconstrue it is a missing file and opt not to install it.

In any case, I've installed it and it work's great. I can't wait to style it. :D
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on January 23, 2010, 03:14:32 PM
Glad you like it :)
I'd love it to be included in SMF by default. (Small, fast, doesn't need updates, and really adds something for users who like talking for hours. Lol.)
Title: Re: Footnotes v1.05 is out!
Post by: KensonPlays on January 23, 2010, 03:15:43 PM
I use this mod!
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on January 23, 2010, 03:25:08 PM
You're worthy!
(© Wayne's World.)
4200 posts and a geek reference. I'm finished!
Title: Re: Footnotes v1.05 is out!
Post by: Bugo on February 12, 2010, 11:47:16 PM
Russian translation:

// Footnotes
$txt['noisen_footnote'] = 'Сноска';
Title: Re: Footnotes v1.05 is out!
Post by: LHW on February 13, 2010, 06:46:29 AM
Quote from: Nao on January 23, 2010, 03:14:32 PM
I'd love it to be included in SMF by default. (Small, fast, doesn't need updates, and really adds something for users who like talking for hours. Lol.)

It'd get my vote.  ;D
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on February 13, 2010, 09:10:55 AM
2.0 is feature locked, so shouldn't be added.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on February 13, 2010, 10:20:35 AM
Yeah, SMF2 won't even accept the smallest additions.
It does accept complete rewrites of a feature that will stall the release for 6 extra months, of course. Feel all free to offer complete rewrites, there are never too many rewrites for SMF2.
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on February 13, 2010, 10:23:31 AM
Well, you know as well as I do that there were feature changes even in RC2, but it's supposedly feature locked.

What feature do you mean though? I don't remember anything on that scale being rewritten but I haven't been here all that long really.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on February 13, 2010, 07:30:44 PM
Quote from: Arantor on February 13, 2010, 10:23:31 AM
Well, you know as well as I do that there were feature changes even in RC2, but it's supposedly feature locked.
They can completely rewrite features, but not add new features (even harmless ones.)

QuoteWhat feature do you mean though? I don't remember anything on that scale being rewritten but I haven't been here all that long really.
I noticed that a few times over the last couple of years really.
Things like changing the SQL query system for instance... I believe it was done after the system was feature-frozen. This would be the biggest example.
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on February 13, 2010, 08:01:20 PM
Huh, yeah, that's before my time, I think.

There were new features in 2.0 RC2, actually. The load balancing GUI, the menu item for disableTemplateEval, and the UI for buddy/ignore user lists.
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on February 14, 2010, 04:07:39 AM
Yeah, good examples too. For balancing, the official word is, "the feature was already there, it just missed a GUI."
Title: Re: Footnotes v1.05 is out!
Post by: Arantor on February 14, 2010, 07:45:22 AM
Yeah, I know that. But it's still a feature that wasn't there before.
Title: Re: Footnotes v1.05 is out!
Post by: Eclipse16V on March 15, 2010, 02:23:48 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on March 15, 2010, 03:13:12 AM
It's compatible, I think... Just need to tick the RC3 checkbox.
Title: Re: Footnotes v1.05 is out!
Post by: Raffoz on May 10, 2010, 09:51:38 AM
error in installation process

in my subs.php there' no static $disabled;

:(

these are my mods...

where's the problem?
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on May 10, 2010, 01:10:17 PM
Try comparing your copy of Subs.php with a fresh one... Locate the line in the fresh copy and put it in the correct place in yours.
Title: Re: Footnotes v1.05 is out!
Post by: Raffoz on May 10, 2010, 02:22:37 PM
instead of what i should have in the subs.php, as posted above, i have
static $disabled, $default_disabled, $parse_tag_cache;

still should i do what u said?

thanks
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on May 10, 2010, 04:48:53 PM
Just apply the changes manually.
Title: Re: Footnotes v1.05 is out!
Post by: Raffoz on May 10, 2010, 05:40:41 PM
Quote from: Nao on May 10, 2010, 04:48:53 PM
Just apply the changes manually.
yes, it works perfectly... and it's wonderful... :)

but was a choice to let the notenumber highlighted of light blue when clicked?
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on May 11, 2010, 10:14:20 AM
What do you mean?
Title: Re: Footnotes v1.05 is out!
Post by: Raffoz on May 11, 2010, 10:18:14 AM
hmmm, i noticed that only in safari appears in this way... :)

anyway, compliments! it's wonderful!

one more wquestion: if i disinstall the mod, all the footnotes will appear as bbc code not recognized?
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on May 11, 2010, 03:57:41 PM
Yes indeed. But I can see no reason for uninstalling it, as, like you say, it's a wonderful feature that should be made a default ;)
Title: Re: Footnotes v1.05 is out!
Post by: Raffoz on May 11, 2010, 04:11:13 PM
Quote from: Nao on May 11, 2010, 03:57:41 PM
Yes indeed. But I can see no reason for uninstalling it, as, like you say, it's a wonderful feature that should be made a default ;)

oh yes, hoping that u'll will always update it! ;)
Title: Re: Footnotes v1.05 is out!
Post by: Nao 尚 on May 11, 2010, 06:30:34 PM
I'll make sure it works on future versions. I won't add features because, well, it doesn't need anything else.
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on June 19, 2010, 11:20:18 AM
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'))
Title: Re: Footnotes v1.06 is out!
Post by: Hj Ahmad Rasyid Hj Ismail on June 19, 2010, 06:03:09 PM
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.
Title: Re: Footnotes v1.06 is out!
Post by: 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...
Title: Re: Footnotes v1.06 is out!
Post by: Hj Ahmad Rasyid Hj Ismail on June 20, 2010, 04:37:44 AM
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.
Title: Re: Footnotes v1.06 is out!
Post by: 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.
Title: Re: Footnotes v1.06 is out!
Post by: Hj Ahmad Rasyid Hj Ismail on June 21, 2010, 01:27:25 PM
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. ;)
Title: Re: Footnotes v1.06 is out!
Post by: Akyhne on June 25, 2010, 03:06:09 AM
Hmm, this shouldn't happen. I know I can use the nobbc, but still..
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on June 25, 2010, 04:34:37 AM
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...
Title: Re: Footnotes v1.06 is out!
Post by: Akyhne on July 02, 2010, 04:56:16 AM
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.
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on July 02, 2010, 07:15:58 AM
No, it's not.
As stated above, v1.06 fixes any issues with that...
Title: Re: Footnotes v1.06 is out!
Post by: xrunner on July 24, 2010, 12:48:05 PM
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?
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on July 24, 2010, 05:19:32 PM
Screenshot?
Title: Re: Footnotes v1.06 is out!
Post by: xrunner on July 24, 2010, 07:12:32 PM
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
Title: Re: Footnotes v1.06 is out!
Post by: xrunner on July 25, 2010, 09:53:56 AM
Problem solved - it was my fault. I didn't select to install it to an alternate theme I was using.
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on July 25, 2010, 04:02:32 PM
Good then.
Title: Re: Footnotes v1.06 is out!
Post by: xrunner on August 01, 2010, 09:54:48 AM
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
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on August 01, 2010, 01:32:34 PM
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.
Title: Re: Footnotes v1.06 is out!
Post by: xrunner on August 01, 2010, 01:38:02 PM
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
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on August 01, 2010, 04:06:15 PM
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.
Title: Re: Footnotes v1.06 is out!
Post by: KensonPlays on August 01, 2010, 05:56:38 PM
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)
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on August 01, 2010, 06:09:35 PM
Quote from: Kcmartz on August 01, 2010, 05:56:38 PM
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)
Nope, it won't be a default setting in SMF because, if only because they don't want any of my code.
Don't worry, I'll keep it alive... Although just for you it will be a commercial mod, because you're so supportive of my decisions and I'm sure you won't mind. It will remain free for others. 8) 8) 8)
Title: Re: Footnotes v1.06 is out!
Post by: KensonPlays on August 01, 2010, 06:15:52 PM
lol. I am saving up for "more important" mods. Like SMP's Custom Top Menu Premium.
Title: Re: Footnotes v1.06 is out!
Post by: Nao 尚 on August 02, 2010, 04:55:10 AM
Quote from: Kcmartz on August 01, 2010, 06:15:52 PM
lol. I am saving up for "more important" mods. Like SMP's Custom Top Menu Premium.
Yeah... Because that sure is rocket science technology, compared with Aeva Media! ::)
You're just a mindless troll. You call yourself a community support helper but you don't have a clue about your community. And I'm revoking your license to use any of my mods on kcmartz.com until you publicly apologize.

@xrunner> Okay, I've found the reason for the bug. Karl Benson added on January 2 a feature I didn't notice in rev 9618 (which subsequently was included in SMF2 RC3), where <blockquote> tags get additional classes to allow for color permutation. So my simple strpos() just wouldn't work. I'm hesitating between simply removing the closing '>' at the end of the strpos (tested, it works), or adding two strpos, to avoid matching against <blockquotesomething>. But I honestly don't see a reason for this to show up in a message anyway... I'll probably take the first one.

Also, it seems like my quote fix doesn't work for SMF1 at all. Honestly, I don't really care at this point, as it's not a critical feature in Footnotes (it just makes life easier by keeping quoted footnotes inside the quotes.) It's yet another incentive for SMF1 users to upgrade ASAP.

Anyway, just look for this line in Subs.php:

$start_blockquote = strpos($message, '<blockquote>', $my_pos);

And replace with:
$start_blockquote = strpos($message, '<blockquote', $my_pos);
Title: Re: Footnotes v1.07 is out!
Post by: Nao 尚 on August 02, 2010, 05:18:31 AM
New release!

Version 1.07                                      2nd August 2010
-----------------------------------------------------------------
! Fixed quoted footnotes compatibility with SMF2 Public RC3
* Improved compatibility with other mods at install time
Title: Re: Footnotes v1.07 is out!
Post by: LHW on August 02, 2010, 05:26:21 AM
Sweet! Thanks, Nao!  ;D
Title: Re: Footnotes v1.07 is out!
Post by: Ken. on August 02, 2010, 05:34:27 AM
If my existing version (1.05) is working OK in SMF2 RC3 is there any need to install this update?

Thanks... Ken.
Title: Re: Footnotes v1.07 is out!
Post by: Nao 尚 on August 02, 2010, 06:13:16 AM
Quote from: Ken. on August 02, 2010, 05:34:27 AM
If my existing version (1.05) is working OK in SMF2 RC3 is there any need to install this update?
Yes, if you're using quotes at all ;)
Title: Re: Footnotes v1.07 is out!
Post by: Ken. on August 02, 2010, 06:58:41 AM
Done it.


TBH, Footnotes rarely get used on my forum, but I like them and that's reason enough to have them available.  :D

Thanks Nao.
Title: Re: Footnotes v1.07 is out!
Post by: Nao 尚 on August 02, 2010, 07:39:27 AM
Technically -- they're only useful when they're used, obviously. But when you need them, it's good to have them! Especially in blog-type post.
Title: Re: Footnotes v1.07 is out!
Post by: xrunner on August 02, 2010, 08:57:36 AM
New version installed and working. Thank you!
Title: Re: Footnotes v1.07 is out!
Post by: Nao 尚 on August 02, 2010, 09:15:16 AM
:)
Title: Re: Footnotes v1.07 is out!
Post by: Hj Ahmad Rasyid Hj Ismail on August 02, 2010, 10:43:27 AM
Quote from: Nao on August 02, 2010, 05:18:31 AM
New release!

Version 1.07                                      2nd August 2010
-----------------------------------------------------------------
! Fixed quoted footnotes compatibility with SMF2 Public RC3
* Improved compatibility with other mods at install time

Great news. Will be updating mine soon.
Title: Re: Footnotes v1.08 is out!
Post by: Nao 尚 on August 06, 2010, 03:28:35 PM
v1.08
! A last-minute code optimization broke multiple footnotes. Oops.

Sorry, my bad... I didn't even realize this issue until now.
Title: Re: Footnotes v1.08 is out!
Post by: saks on August 16, 2010, 02:27:26 AM
Hi Nao! I install Footnotes 1.08 and it not correct show style in Mozilla FireFox 3.5.11,  but in other browsers it work very good. look example (http://www.paraplanoff.net/index.php/topic,2944.msg21272.html#msg21272) and Where I am mistaken?
Title: Re: Footnotes v1.08 is out!
Post by: balti27 on November 10, 2010, 07:57:46 AM
Please update for RC 2.0 RC4, Thank You!
Title: Re: Footnotes v1.08 is out!
Post by: ~DS~ on November 10, 2010, 02:06:14 PM
Quote from: balti27 on November 10, 2010, 07:57:46 AM
Please update for RC 2.0 RC4, Thank You!
It should work for RC4...
Title: Re: Footnotes v1.08 is out!
Post by: Eclipse16V on July 07, 2011, 07:15:16 AM
Work this on SMF 2.0 ?
Title: Re: Footnotes v1.08 is out!
Post by: Jessica. on July 07, 2011, 09:55:23 AM
I have this installed on 2.0 final. works fine
Title: Re: Footnotes v1.08 is out!
Post by: Eclipse16V on July 07, 2011, 04:02:21 PM
Thanks
It works fine
Title: Re: Footnotes v1.08 is out!
Post by: Apllicmz on December 27, 2011, 06:35:24 PM
Yes nice mod
when Update dont forget portuguese

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['noisen_footnote'] = 'Nota no rodap&eacute;';
]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['noisen_footnote'] = 'Nota no rodap&eacute;';
]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['noisen_footnote'] = 'Nota no rodap&eacute;';
]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['noisen_footnote'] = 'Nota no rodap&eacute;';
]]></add>
        </operation>
    </file>

Title: Re: Footnotes v1.08 is out!
Post by: Nao 尚 on April 25, 2013, 09:10:59 AM
Quote from: Joomlamz on December 27, 2011, 06:35:24 PM
Yes nice mod
when Update dont forget portuguese
No updates planned, I'm afraid ;)

(Just saw this topic in my list of 'unread replies', and I felt I had to bump it, at least just to give it proper closure... ^^)
Title: Re: Footnotes v1.08 is out!
Post by: sangham.net on May 29, 2015, 02:18:44 AM
Works fine. Real nice Mod., Mr. Nao 尚. Thanks!

Atma has attached an unofficial Version incl.

Modifications.portuguese_pt-utf8.php (as give here previously)
Modifications.cambodian-utf8.php
Modifications.german-utf8.php

additions. Maybe it's of good use.
Title: Re: Footnotes v1.08 is out!
Post by: live627 on May 29, 2015, 02:42:03 AM
QuoteLicense Agreement
...
    You will not distribute a modified version of it,
...
I removed your attachment.
Title: Re: Footnotes v1.08 is out!
Post by: sangham.net on May 29, 2015, 06:21:06 AM
Thanks for your care, Atma (me) did not thought on it and will send it to the mod developer. Sorry for causing work.
Title: Re: Footnotes v1.08 is out!
Post by: LiBen on January 01, 2016, 07:36:13 AM
Quote from: live627 on May 29, 2015, 02:42:03 AM
QuoteLicense Agreement
...
    You will not distribute a modified version of it,
...
I removed your attachment.

Out of curiosity: if someone posts only the code to be put in the xml-file for a modification.
Many people will be making language adaptations not included in the modifications. The authors can then take it up into the next update. Meanwhile users can use it on their own forum.
I don't think it's a violation of the modifications as contributors don't  distribute a modified version of the complete modification.

Something like this I mean:
<file name="$languagedir/Modifications.my_language-utf8.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['need_text'] = 'foreign words';
]]></add>
</operation>
</file>
Title: Re: Footnotes v1.08 is out!
Post by: shadav on August 30, 2019, 07:29:40 PM
this is very useful thank you
installed just fine on 2.0.15