Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

Search

PreItem my Item (also known as PreComment your comment)

I've been working on many plugins recently to add support to call other plugins to do pre-processing work. In many plugins that deal with items and comments, the output often not display properly with other plugin's skinvar display in raw code (ie <%Image(file.jpg|1024|768|320|240|test image)%> for NP_PopupImageNetPBM).

I think the best way to fix such a problem is to trigger PreItem (for item) and PreComment (for comment) events before proceeding with the output. The event calls all plugins registered to the event to process the data so all plugin skinvars are render properly.

For comment pre-processing, this can be done by:

$manager->notify('PreComment', array('comment' => &$comment));

For item pre-processing, calls:

$manager->notify('PreItem', array('blog' => &$blog, 
'item' => &$item));

Assumption is "global $manager, $blog;" is done earlier in the code.

Note that plugin developer should format and make sure $comment and $item are in the same format as the core pass it to notify().

17:56:29 on 09/15/05 by Admun - Developer Notes - tags: none - #

NP_LatestComments v1.6

This new release add emotions support via NP_Smiley support

click here to download

17:27:00 on 09/15/05 by Admun - My Work - tags: none - #

NP_MailToAFriend v1.2

I added some new feature to this plugin.

- better item rendering in email that works w/ other plugins (ie NP_Smiley, NP_PopupImageNetPBM)
- remove CSS from email and preview
- email and title template

NP_MailToAFriend v1.2

Please try it and report whether this new version break something or helps those who were struck in the past. cool

15:59:33 on 09/15/05 by Admun - My Work - tags: none - #
<=   September 2005   =>
SunMonTueWedThuFriSat
    123
45678910
11121314151617
18192021222324
252627282930