known icon indicating copy to clipboard operation
known copied to clipboard

Documentation for plugin event hooks

Open funwhilelost opened this issue 6 years ago • 6 comments

Hey, guys. The documentation is a little sparse on how the plugin event hooks are supposed to work. I'm trying to debug an issue with the Akismet plug-in and not having much success.

I've got the plug-in set up on my Known site and I'm sifting through the logs, seeing that the plug-in is correctly identifying spam but it seems that $event->setResponse(false) doesn't have any effect on stopping the notation from being saved. It's registering an event hook for the new annotation but it doesn't seem to be able to stop the annotation from being saved. Any ideas on how this might be accomplished?

registerEventHooks() If this exists, this function will be called when the plugin is loaded. It's suggested that you define your event hooks here.

funwhilelost avatar Jan 08 '19 03:01 funwhilelost

Okay, I haven't been able to make any progress on this and haven't heard anything over at mapkyca/KnownAkismet either. My self-hosted Known is inundated with spam at this point so I'm going to find another solution.

funwhilelost avatar Mar 21 '19 15:03 funwhilelost

Hi @funwhilelost , is this issue still relevant? Are you still having spam problems?

johanbove avatar Oct 02 '19 11:10 johanbove

Yes, I'm still having rampant spam issues. I turned off public comments which has helped the volume but I still get trackback spam.

The Akismet plugin is logging the check, showing a clear spam flag, and the pertinent event handler is returning false. It's my impression that this should prevent the annotation from being created but it's not.

I would really love to get some more documentation about this as I went walking through the Core source code and couldn't place exactly how the event mechanism is supposed to work.

funwhilelost avatar Oct 03 '19 03:10 funwhilelost

Sorry to hear about the spam trouble. ~~When you say "Akismet" plugin, you mean @mapkyca 's right? https://github.com/mapkyca/KnownAkismet Which version do you have? Perhaps this issue report should be moved to that repo?~~

johanbove avatar Oct 03 '19 11:10 johanbove

Just noticed that you already did just that. Sorry! Here is the link: https://github.com/mapkyca/KnownAkismet/issues/3

johanbove avatar Oct 03 '19 11:10 johanbove

Yup! Just looking for more documentation on Known's plugin and event hooks

  • there is almost nothing in the docs at last check.

On Thu, Oct 3, 2019 at 04:28 Johan Bové [email protected] wrote:

Just noticed that you already did just that. Sorry! Here is the link: mapkyca/KnownAkismet#3 https://github.com/mapkyca/KnownAkismet/issues/3

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/idno/known/issues/2316?email_source=notifications&email_token=AAA7D5DWQEGDCDLGRQATQC3QMXJMXA5CNFSM4GOS4TOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAH4QEI#issuecomment-537905169, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA7D5D6KAQFPKCET76U54DQMXJMXANCNFSM4GOS4TOA .

funwhilelost avatar Oct 03 '19 15:10 funwhilelost