hi
It seems to work with [8548] :
when I disapprove or approve a comment, the filter is registreted and the new function of my plugin is called.
Thanks !
I have another question : I wish to verify the akismet key when the options of the plugin are saved.
There is a method of akismet to do that.
I suppose I have to do the same thing I have done for submit false positives/negatives SPAM : triggered a new function on "save" action on admin/options/comment, but I don't know which filter I could use.
could you help me ?
You would actually need a filter that is called on saving plugin options. Not sure we have one at the moment, but sbillard will know it for sure.
Edit: Is probably possible without a filter. Use the OPTION_TYPE_CUSTOM and create a check with in handleOption(). It would then work like 1. Save the key 2. on page reload this function gets that value and checks it. Then you can put out a warning right with the text field.
thanks sbillard, but could you give me an example how to add code in getSupportedOptions() ?
fyi, I have a new methoe of SpamFilter :
`
function isValidKey() {
$zp_galerieUrl = FULLWEBPATH; // Set the webpath for the Akismet server
$zp_akismetKey = getOption('Akismet_key');
$akismet = new Akismet($zp_galerieUrl, $zp_akismetKey);
if($akismet->isKeyValid()) {
return true;
} else {
return false;
}
}
`
how can I do to call this method on validation ?
how can I add a specific message on zenphoto admin : 'your Akismet key is empty or invalid' if the function returns false ?
function getOptionsSupported() { if (getOption('Akismet_key') && $this->isValidKey()) { $msg = ''; } else { $msg = Gettext('You need to provide a valid Akismet key'); } return array( gettext('Akismet key') => array('key' => 'Akismet_key', 'type' => 0, 'desc' => gettext('Proper operation requires an Akismet API key obtained by signing up for a Akismet account.').$msg), gettext('Forgiving') => array('key' => 'Forgiving', 'type' => 1, 'desc' => gettext('Mark suspected SPAM for moderation rather than as SPAM')) ); }
Here is a simple example based on your plugin. Of course the text of the message could be better, and maybe also styled as a notice.
I guess a wrong key is actually an error. We have serveral predefined class for styling you can use:
.errorbox, .warningbox and .notebox. The latter is the orange box we often use to highlight. We have also one for "successes" .messagebox which is used on successful saves for example.
thanks !
the new release of the plugin is ready.
improvement :
I have to do some testing and I will give it to the community when the 1.4.2 release of Zenphoto will be published.
hi
to make it more convenient for you, I will host my plugin akismet_php5 on my website.
there is 2 releases of the plugin :
1.0.0 : intial release for zenphoto =< 1.4.1.6
1.1.0 : with improvements described above, for zenphoto >= 1.4.2 (beta included)
You can find a news here: http://www.vincentbourganel.fr/news/akismet-spam-filter-for-Zenphoto
Can you change the link on the page http://www.zenphoto.org/news/spamfilter-akismet_php5 ?
As said in my news, please report bugs and feedback on the Zenphoto forum and I will try to fix as soon as possible.
Hi Vincent,
Thanks for this plugin.
However, How can i check that the plugin is working ?
My catpha is sitll live with the akismet working ... Is the correct way to use this ?
Thanks
Laurent.
== In French, it's more accurate for me ==
Salut Vincent,
Merci pour ce plugin.
Cependant, comment être sur que celui-ci soit fonctionnel ? Le Captcha est-il toujours nécessaire et/ou compatible avec aksimet ?
Un petit Tuto
Merci beaucoup pour ton implication.
Laurent
hi,
you can check if the plugin works on your website by sending a comment with "viagra-test-123" as the author.
Akismet always detect the comment as spam.
maybe you could read
http://akismet.com/how/
http://akismet.com/support/
http://akismet.com/development/api/#comment-check.
information :
according to me, captcha is not necessary on comment if you use Akismet.
and in my case, I had maybe 20 spam a day before, and now, I have maybe 1 spam a week.
so it seems to work :-)
be carrefull :
Hervé Queyranne (who helps to on release 1.1.0) gives a patch on zenphoto 1.4.1.5/1.4.1.6 to use the new release of Akismet (but it's a hack of zenphoto : do that at your own risks) :
follow the link : http://www.queyranne.ch/site/news/aksimet-ver-1.1
hi
Sometimes, I have some SPAM on my website and I notice that there is a time-out from akismet server (maybe server is too busy).
I made some improvements on my plugin : if Akismet API key is invalid or akismet doesn't give a response to request, comments are moderated.
before publish this new version, I need some tests :
you can download a beta version here :
http://www.vincentbourganel.fr/data/akismet_php5%201.2.0.RC.zip
thanks in advance to beta users.
please report any bugs or any troubles on forum.
thanks !
there is a new RC to download :
http://www.vincentbourganel.fr/data/akismet_php5%201.2.0.RC2.zip
I need to know if someone have some
====> $akismet->Exception : ...
in debug log (admin of zenphoto)
follow install instructions in install.txt