Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 10:20 pm EDT

Geeklog Forums

PLG_checkforspam


Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.


Blah Blah Blah Blah ... ..I know I had a question in there somewhere.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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.

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
 Quote

All times are EDT. The time is now 10:20 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content