Posted on: 07/25/06 03:48pm
By: machinari
so, I found this hook in lib-plugins.php, but can't seem to wrap my head around it.
I want to make use of Geeklog's spam checking in some plugin content, but this functions seems a bit different than usual... by the looks of this, I would call this function directly making use of spamX's plugin_checkforspam_spamx function rather than calling plugin_checkforspam_myplugin(), which is how the plugin hooks seem to have worked up to now.
so am I reading this wrong? Why wouldn't I just call plugin_checkforspam_spamx() instead of plg_checkforspam()? hmmm... my guess is that the spamx function wouldn't be available without the plugin hook. Is that right? So the only real difference is then that a plugin is making use of another plugin's function rather than one from Geeklog's function library.
..I know I had a question in there somewhere.
PLG_checkforspam
Posted on: 07/25/06 04:09pm
By: Dirk
[QUOTE BY= machinari] So the only real difference is then that a plugin is making use of another plugin's function rather than one from Geeklog's function library.[/QUOTE]
Yep, that's it. Geeklog is only providing the interface, so you don't have to call the Spam-X plugin directly. Which removes the dependency on that specific plugin in case we want
to replace it with something else one day.
A similar case is when you call PLG_replaceTags() to make use of autotags provided by other plugins.
bye, Dirk