![]() |
|
new akismet plugin with php5 classes - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: new akismet plugin with php5 classes (/thread-9096.html) |
new akismet plugin with php5 classes - vincent3569 - 23-09-2011 hi on http://akismet.com/development/ I have found an Akismet php5 class. but the akismet plugin for zenphoto uses an Akismet php4 class. so I have decided to create a new akismet plugin for zenphoto, using this php5 class. after some tests, it seems to work well. can you explain , how can I give it to the community ? new akismet plugin with php5 classes - sbillard - 23-09-2011 Specially if you are intending to continue to support the plugin we would suggest you create a web page for it and we will link the entry to that site. Otherwise you can provide the new version attached to a ticket. new akismet plugin with php5 classes - acrylian - 24-09-2011 Vincent: As said on the other thread, it would be great if you could take it over. Info on how we suggest to do that here: http://www.zenphoto.org/news/general-contributor-guidelines#themes-and-plugins new akismet plugin with php5 classes - vincent3569 - 29-11-2011 hi akismet allows to give feedback on messages and gives alert on no detected SPAM. with another user of zenphoto, we wish to implement those functions on akismet plugin. I will create a ticket for that, but first, I have a question : how the bulk action works in that case ? new akismet plugin with php5 classes - sbillard - 29-11-2011 Bulk actions do indeed perform a while loop on the individual checked items performing the action specified. Note that there is are filters new akismet plugin with php5 classes - vincent3569 - 29-11-2011 mhh, new akismet plugin with php5 classes - sbillard - 30-11-2011 The general documentation is here: http://www.zenphoto.org/news/zenphoto-plugin-architecture#filters The list of filters there represents 1.4.1 so there will be an update for the 1.4.2 additions. (The comment filters are there on 1.4.1) So the quick tutorial is: add a line in your spam filter towards the front that reads someting like:
Then declare a function: new akismet plugin with php5 classes - vincent3569 - 30-11-2011 ok there is the basic structure of the akismet plugin : ` class SpamFilter {
} class Akismet { why the return of the $commentObj is needed ? new akismet plugin with php5 classes - acrylian - 30-11-2011 The call to the class method from the filter will not work. You call it as a function but it is a class method. You probably need a wrapper function for that method outside the class. Not sure if you can use $classobj->submitSpam within hte filter call. sbillard will know. Quote:why the return of the $commentObj is needed ? new akismet plugin with php5 classes - vincent3569 - 30-11-2011 thanks do you think the following code is more correct ? function submitSpam calls the method feedbackMessage of SpamFilter. feedbackMessage invokes the method submitSpam of Akismet ` function submitSpam($comment) { class SpamFilter {
} |