Admin quick notes

Creating and modifying plugins.
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Admin quick notes

Post 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!
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Admin quick notes

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply