Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

Softer plugin dependancy

Currently in CVS, there is a plugin dependancy support to allow a plugin to specify what other plugins must be installed for it to function properly.

In some cases, the dependancy is not as strict in the sense that some extra function can be enable if another plugin is installed. There is no dependancy check is needed since it's not mandatory, but the plugin can do some check on the fly to enable the additional function.

An example at hand is NP_Referer2 and NP_Trackback. Recently a new plugin NP_Blacklist is developed by Xiffy to help fight commant spam. The same filter engine actually can used to fight referer and trackback spam as well.

The dependancy to NP_Blacklist is not a strict one. It mean NP_Referer2 and NP_Trackback can utilize NP_Blacklist if it is installed. To enable the function. A run-time dependancy check can be done. An example for NP_Trackback:

if ($manager->pluginInstalled('NP_Blacklist') 
and $blacklist =& $manager->getPlugin('NP_Blacklist')) {
    if (floatval($blacklist->getVersion()) >= 0.95) {
        $blacklist->blacklist('TrackBack',$url.' '.$title.' '.$blog_name.' '.$excerpt);
    }
} 

If NP_Blacklist is found, NP_Trackback can call it to filter trackback for potential spam.

Cool, isn't it?

11:28:46 on 02/07/05 by Admun - Category: Developer Notes - tags: none - print

Comments

Admun wrote:

This is a variation of: http://edmondhui.homeip.net...

02/15/05 18:21:43

Add Comments



<=   November 2009   =>
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
2930     

My Quick Links

Documentation

How-To & Tips

Source Code

Developers utc

Latest Comments

  • Admun says If you are running wp from a hosting environment, your system admin people can tell...
  • Dan says Hi, Im a noob and Im not sure what to input for the Database Name, for Nucleus and...
  • Admun says what version of PHP you are running? It looks like this function is...
  • Kevin says I am getting this error: Fatal error: Call to undefined function sql_table() in...
  • Admun says thx Frank, I will look into it.
  • ftruscot says admun, a bug/fix suggestion on the forum that you might want to look at:...
  • Admun says Indeed David. 8( A quick fix for now until 0.9 is out: - do a "ALTER TABLE...
  • David Geens says Dear Edmond, Your twitter plugin suffer from the twitocalyps. You should...

Most Downloads