Pages (3):    1 2 3   
Member
Member
vincent3569   02-12-2011, 13:29
#21

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 ?

Administrator
Administrator
acrylian   02-12-2011, 14:15
#22

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.

Member
Member
sbillard   02-12-2011, 17:42
#23

You do not actually have to change the option type. Just add code in the getSupportedOptions() method to check the validity of the key. If it is not valid (and probably also not empty) add the message to the option description.

Administrator
Administrator
acrylian   02-12-2011, 17:51
#24

True, why easy if possible complicated...;-)

Member
Member
vincent3569   03-12-2011, 17:34
#25

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 ?

Administrator
Administrator
acrylian   03-12-2011, 18:04
#26

Within getSupportedOptions() call your method and add the text about failure if it fails to the option text itself for example.

Member
Member
sbillard   03-12-2011, 18:52
#27

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.

Administrator
Administrator
acrylian   03-12-2011, 19:16
#28

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.

Member
Member
vincent3569   03-12-2011, 21:41
#29

thanks !

the new release of the plugin is ready.
improvement :

  • vadidate the provided akismet key in the admin
  • send feedback to Akismet and signal a false negative (no detected SPAM by akismet) / false positive.

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.

Administrator
Administrator
acrylian   04-12-2011, 09:24
#30

Great. You also could release it as a beta so people interessted could try it before 1.4.2 so possible bugs are sorted out.

Member
Member
vincent3569   04-12-2011, 23:26
#31

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.

Administrator
Administrator
acrylian   05-12-2011, 10:09
#32

Thanks for taking it over, very appreciated. I have updated the plugin entry.

Member
Member
Laurent   06-12-2011, 21:45
#33

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

Member
Member
vincent3569   06-12-2011, 23:46
#34

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 :

  • with 1.0.0, the akismet key is not checked by the plugin : if the key is invalid you have a fatal error when you send a comment.
  • with 1.1.0, the akismet key is checked by the plugin in the admin tabs, so this issue is fixed.

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 :-)

Member
Member
vincent3569   06-12-2011, 23:54
#35

be carrefull :

  • 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)

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

Member
Member
Laurent   07-12-2011, 22:40
#36

Ok, Thanks you. It's for the test on the 1.4.2 Beta release of ZP.

Laurent

Member
Member
vincent3569   22-09-2012, 20:38
#37

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.

Member
Member
Laurent   23-09-2012, 17:52
#38

Ok Vincent, i'll test it since i have quite the same trouble !

Cdlt,
Laurent

Member
Member
vincent3569   24-09-2012, 09:26
#39

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
====> &#36;akismet->Exception : ...
in debug log (admin of zenphoto)

follow install instructions in install.txt

Member
Member
Laurent   25-09-2012, 20:48
#40

Hi,
At this time all works great for me. I have no error in the debug log section.

I'll look for time to time.

Thanks a lot
Laurent

Pages (3):    1 2 3   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.