Spambayes
Spambayes
Hi,
at the moment I am experiencing problems with my comment spam filter. Completely legit comments are market with a spam probability of 95% or higher... Is there a bulk method to train the filter with older comments?
I tried the recycler but a) in Safari / Mac the script seems to be overwhelmed by the number of messages and I have to stop it ("slow script" error) and b) there is no possibility to mark multiple messages there as ham?
Daniel
at the moment I am experiencing problems with my comment spam filter. Completely legit comments are market with a spam probability of 95% or higher... Is there a bulk method to train the filter with older comments?
I tried the recycler but a) in Safari / Mac the script seems to be overwhelmed by the number of messages and I have to stop it ("slow script" error) and b) there is no possibility to mark multiple messages there as ham?
Daniel
Re: Spambayes
Indeed, there isn't. It's normally mostly spam in the recycler. But you can chose a few comments, restore them, and then use the buttons in the comments-section.I tried the recycler ... b) there is no possibility to mark multiple messages there as ham?
I can't use or test with that browser. You could try chromium, the javasript-performance is probably better in that browser.I tried the recycler but a) in Safari / Mac the script seems to be overwhelmed
Yes. Go into the Spamblock-bayes-menu, there to database, and click the button "learn from old". This will learn old comments as ham and comments from your spamlog as spam.Is there a bulk method to train the filter with older comments?
Re: Spambayes
Another question on the same topic:
At the moment I experience a lot of comment spam, which is assigned a too low probability (eg. 80 % or less).
1) Could I train this as spam to raise the probability?
2) If I click the valid or spam buttons nothing happens (like a confirmation) is this the designed behavior or something wrong with my backend?
Daniel
At the moment I experience a lot of comment spam, which is assigned a too low probability (eg. 80 % or less).
1) Could I train this as spam to raise the probability?
2) If I click the valid or spam buttons nothing happens (like a confirmation) is this the designed behavior or something wrong with my backend?
Daniel
Re: Spambayes
1) Yes.
2) It is not intended. There should be a "load-circle" and spam should vanish afterwards. Have a look in the javascript-messages (strg+shift+j probably) and see if there is an error.
2) It is not intended. There should be a "load-circle" and spam should vanish afterwards. Have a look in the javascript-messages (strg+shift+j probably) and see if there is an error.
Re: Spambayes
You are right, i get the following error:
/plugins/serendipity_event_spamblock_bayes/bayes_commentlist.js:222
SyntaxError: Parse error
serendipity_admin.php:740ReferenceError: Can't find variable: spam
Same error for "Valid"
The other links work well (information, edit, approve, ...)
Daniel
/plugins/serendipity_event_spamblock_bayes/bayes_commentlist.js:222
SyntaxError: Parse error
serendipity_admin.php:740ReferenceError: Can't find variable: spam
Same error for "Valid"
The other links work well (information, edit, approve, ...)
Daniel
Re: Spambayes
Ok, I just checked with my test installation of s9y:
Preparation: completely new installation of the spambayes plugin, change of s9y front and backend to serendipity 2.3
Result: Same error as above for spam and ham clicks.
ps: could someone move this thread to the bugs area please?
Preparation: completely new installation of the spambayes plugin, change of s9y front and backend to serendipity 2.3
Result: Same error as above for spam and ham clicks.
ps: could someone move this thread to the bugs area please?
Re: Spambayes
I think this belongs in here, as this is a plugin and not a bug of serendipity itself.
Please show me the line the second errormessage is pointing to, line 740 of your commentpage.
Please show me the line the second errormessage is pointing to, line 740 of your commentpage.
Re: Spambayes
Ok here is the step by step:
In the Admin Interface I click Comments -> Result:
SyntaxError: Parse error /plugins/serendipity_event_spamblock_bayes/bayes_commentlist.js:222
Then I click "Spam" and the second error appears:
ReferenceError: Can't find variable: spam serendipity_admin.php:731
Which file should I cat? serendipity_admin does not have more than 400 lines. the comments.tpl neiter...
Daniel
In the Admin Interface I click Comments -> Result:
SyntaxError: Parse error /plugins/serendipity_event_spamblock_bayes/bayes_commentlist.js:222
Then I click "Spam" and the second error appears:
ReferenceError: Can't find variable: spam serendipity_admin.php:731
Which file should I cat? serendipity_admin does not have more than 400 lines. the comments.tpl neiter...
Daniel
Re: Spambayes
When you are in the commentlist, the html of that current page is accessible via your browser, probably strg+shift+u. There the line should be present.
Re: Spambayes
Ahh. Sure here it is (lines 731 and following)
I dont know Javascript very well, but isn't the onclick just standard code (maybe a ";" missing) but it just does not find the functions "ham" and "spam"?
Daniel
Code: Select all
<a id="ham99"
class="serendipityIconLink spamblockBayesControls"
onclick="ham(99)"
title="Spamblock (Bayes): Valid"><img
src="/templates/default/admin/img/accept.png"
alt="" />Valid</a> <a
id="spam99"
class="serendipityIconLink spamblockBayesControls"
onclick="spam(99)"
title="Spamblock (Bayes): Spam"><img
src="/plugins/serendipity_event_spamblock_bayes/img/spamblock_bayes.spam.png"
alt="" />Spam</a>
<span class="spamblockBayesRating">
<a href="serendipity_admin.php?serendipity[adminModule]=event_display&serendipity[adminAction]=spamblock_bayes&serendipity[subpage]=4&serendipity[comments][99]">
<span id="99_rating">0%</span>
</a>Daniel
Re: Spambayes
Maybe. But those are functions defined in /plugins/serendipity_event_spamblock_bayes/bayes_commentlist.js. They are probably missing because of the prior parsing-error. But line 222 contains no error i can detect...
Re: Spambayes
Ok, the error seems to be limited to safari (most current version). firefox works...
anyone a idea why this does not work in safari? The code below seems to be faulty.
In line 222 of the bayes_commentlist.js is this code:
Daniel
anyone a idea why this does not work in safari? The code below seems to be faulty.
In line 222 of the bayes_commentlist.js is this code:
Code: Select all
//Something like this don't exist in Javascript
function getElementByClass(class, node, tag) {
if (node == null) {
node = document;
}
if (tag == null) {
tag = "*";
}
var allHTMLTags = node.getElementsByTagName(tag);
var classes = new Array();
var length = allHTMLTags.length;
for (var i=0; i < length; i++) {
//multiple classes are in the same string, so search carefully
if (allHTMLTags[i].className.indexOf(class) != -1) {
classes.push(allHTMLTags[i]);
}
}
return classes;
}Re: Spambayes
It's possible that one of the arguments, maybe class, is a reserved keyword in safari. Try to change the name of the arguments (in the whole function).
Re: Spambayes
Great hint!
the "class" parameter seems to be a reserved name. changing it to "_class" or anything else works!
Can you change the source?
Daniel
the "class" parameter seems to be a reserved name. changing it to "_class" or anything else works!
Can you change the source?
Daniel
Re: Spambayes
Can I help here somehow to speed up implementation?