NP_NewMemberBlog v1.1
Thanks to Trent and all for the code!
click here to download
NP_NotifyMe v0.40
click here to download
NP_CommentControl v0.5
How to lose a user in less than 10 days...
Powered by BLOG:CMS? No Way
NP_Smiley v0.6
NP_MostViewed v2.2
NP_Smiley v0.5
NP_Views v1.6
click here to download
NP_CommentControl v0.40
click here to download
cheers,
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().