Page 1 of 1

Admin quick notes

Posted: Tue Dec 04, 2007 1:44 am
by Don Chambers
I was looking at this plugin for the first time. This cannot possibly be correct for the div class, as it generates a class=" blah blah" that includes just about everything for the note!!!

Code: Select all

echo '<div class="serendipity_note note_' . $this->output($note['notetype']) . ' note_owner_' . $note['authorid'] . ($serendipity['COOKIE']['lastnote'] < $note['noteid'] ? ' note_new' : '') . '">' . "\n";
:shock: :shock: :shock:

I don't want to presume what was actually intended for this class, so I am not going to touch it. Just thought I'd let someone else take a look!

Re: Admin quick notes

Posted: Tue Dec 04, 2007 11:01 am
by garvinhicking
Hi!

Actually this was more a SQL DB bug. The "nodetype" should only contain the type of a note (for future compatibility). However when updating, this field was wrongly set to the body of a note. If you test this with a fresh note, it should show up as intended.

Fixed in 0.7.

Regards
Garvin

Posted: Tue Dec 04, 2007 6:44 pm
by Don Chambers
Thanks Garvin - I can see where this plugin could be helpful for multi-author blogs.

Now that I have seen the output, it makes me wonder if this:

Code: Select all

serendipity_plugin_api::hook_event('backend_frontpage_display', $output);
should come after the "welcome back" message in overview.inc.php. What do you think?

Posted: Tue Dec 04, 2007 9:01 pm
by garvinhicking
Hi!

Not really, because the plugin hook needs to be able to modify $output, and $output is only emitted after the plugin was active, so that it can modify the welcome string :)

Regards,
Garvin
Don Chambers wrote:Thanks Garvin - I can see where this plugin could be helpful for multi-author blogs.

Now that I have seen the output, it makes me wonder if this:

Code: Select all

serendipity_plugin_api::hook_event('backend_frontpage_display', $output);
should come after the "welcome back" message in overview.inc.php. What do you think?