News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Footnotes v1.08 is out!

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

Previous topic - Next topic

Nao 尚

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

dannbass

 :o I'm speechless! that is fun!! 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.

Nao 尚

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

dracomiconia

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

LHW

Thanks for the update, Nao!  Good job! 


Nao 尚

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

dracomiconia


Nao 尚

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

LHW

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.


Nao 尚

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

dannbass

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.

Nao 尚

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

LHW

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.


dannbass

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.

Nao 尚

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

dannbass

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

Nao 尚

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

dannbass

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!

Nao 尚

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

dannbass

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!

Advertisement: