Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 04-10-2006, 07:46 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Addon: Akismet Anti SPAM AddOn/Hack

Tada!!! finally it is here a simpler way to integrate the all magical Akismet SPAM blocker! All hail the King!!

Ummm... whatever or whoever, lets cut the drama and get down to the job.

NOTE This is not a true addon and needs core files to tbe changed a bit - do it only if you know what you are doing. Also since I rarely get comment SPAM this addon has not be tested very extensively in real-life situation. Lastly this is for Pixelpost 1.5RC1 (and hopefully above)

Unzip the files in a convinient location on your local computer.

Upload the files from the zip file to corresponding directories on your webserver. That is index.php goes in the pixelpost root directory, files in admin folder go in the corresponding pixelpost admin folder on your webserver, addons to addons and...

Thats it you are done!!

Now hop over to http://akismet.com and read about how to get an API key - once you have that key login to your Pixelpost Admin Addon section, you should now see the "Pixelpost Akismet comment filter" Paste your key in the textbox and click update button - the page will reload and you should see a "API key validated succesfully." message when you scroll down to the Akismet Addon section.

Now wait for your first SPAM - anything which Akismet identifies as SPAM will be automatically flag it as Akismet SPAM and show in Red background. Also note if you have email notification turned on and the comment is identified as SPAM the notification will *NOT* be sent.

Comments marked as Akismet SPAM will be deleted automatically after 7 days

Also in the Comment section you should now be able to see few more buttons in the menu-bar "Report Spam to Akismet" and "Report HAM to Akismet" use it to do the needful after selecting a comment. Remember comments in Akismet Queue are highlighted Red and already reported to Akismet - need not report them again. In other words Report as Spam the Spam comments which Akismet missed, also Report as HAM the comments which Akismet marked as Spam but were not Spams.

Lastly I have added two convinence buttons "Show Akismet Spam" and "Show Published Comments" which do what they say

Download here



======Information below is depricated but helpful if you want to do manual install======

NOTE This is not a true addon and needs core files to tbe changed a bit - do it only if you know what you are doing. Also since I rarely get comment SPAM this addon has not be tested very extensively in real-life situation. Lastly this is for Pixelpost 1.5b (and hopefully above)

Now that the leagalese out of the way here is how to add Kick Ass Akismet SPAM protection for your Pixel Post Blog

Add following Lines to index.php

PHP Code:
//include the Akismet comment filter script.
include('addons/admin_akismet_comment.php'); 
After

PHP Code:
// send it to moderation if contains banned words but not black listed!
if(is_comment_in_moderation_list($message,$ip,$name)){
  
$cmnt_publish_permission 'no';
  
$cmnt_moderate_permission ='yes';

This is around line 990

--------------------

In file admin/comment.php
Add
PHP Code:
";
eval_addon_admin_workspace_menu('admin_akismet_links');
echo " 
Just Before

PHP Code:
<hr/>
<
ul>";
if ($_GET['show']=='masked')
  $moderate_where = " 
and publish='no' "; 
This is around line 223, please note the "; as the first line

--------------------

Lastly upload the file admin_akismet_comment.php in your addons folder. Thats all that is needed for modifications

Now hop over to http://akismet.com and read about how to get an API key - once you have that key, login to your Pixelpost Admin Addon section, you should now see the "Pixelpost Akismet comment filter" Paste your key in the textbox and click update button - the page will reload and you should see a "API key validated succesfully." message when you scroll down to the Akismet Addon section.

Now wait for your first SPAM - anything which Akismet identifies as SPAM will be automatically put in moderation queue

Also in the Comment section you should now be able to see 2 more buttons in the menu-bar "Report Spam to Akismet" and "Report HAM to Akismet" use it to do the needful after selecting a comment. Remember comments in Moderation Queue are highlighted and most probably already reported to Akismet - need not report them again. In other words Report as Spam the Spam comments which Akismet missed, also Report as HAM the comments which Akismet marked as Spam but were not Spams.

Download here
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software

Last edited by raminia; 04-25-2006 at 08:22 AM.
Reply With Quote
  #2  
Old 04-10-2006, 08:19 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
I'm really glad to having it. thanx
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #3  
Old 04-10-2006, 08:44 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
You are most welcome - let me know if it really works
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #4  
Old 04-10-2006, 07:51 PM
Paul Wood's Avatar
Paul Wood Offline
pixelpost guru
 
Join Date: May 2005
Location: Slidell, Louisiana, USA
Posts: 154
It is catching my normal spam (woohoo! 3 so far in the last hour or so), however I have this line on my comment page before it redirects back to the image. I don't think this was here before.

Code:
Array ( [0] => HTTP/1.0 200 OK X-Powered-By: PHP/4.4.2 Content-Type:
 text/plain; charset=utf-8 Content-Length: 5 Server: LiteSpeed Date: Mon, 10 
Apr 2006 19:47:40 GMT Connection: close [1] => false )
Is there an error here? Seems to work ok.
Reply With Quote
  #5  
Old 04-10-2006, 09:48 PM
sentinel's Avatar
sentinel Offline
pixelpost guru
 
Join Date: Sep 2005
Posts: 130
i think it's in line 115
PHP Code:
print_r($response); 
just for debugging purposes, no error (imho)
Reply With Quote
  #6  
Old 04-10-2006, 10:03 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
well you should get the api key from wordpress.org to make it work for you.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #7  
Old 04-10-2006, 11:50 PM
Paul Wood's Avatar
Paul Wood Offline
pixelpost guru
 
Join Date: May 2005
Location: Slidell, Louisiana, USA
Posts: 154
Quote:
Originally Posted by raminia
well you should get the api key from wordpress.org to make it work for you.
Ummm... I did. It caught about a dozen spam comments today. Only missed one, and I reported it to Askimet.
Reply With Quote
  #8  
Old 04-11-2006, 05:02 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Quote:
Originally Posted by sentinel
i think it's in line 115
PHP Code:
print_r($response); 
just for debugging purposes, no error (imho)
Very Correct - thanks for catching it - Updated the Zip (download link in the first post)
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #9  
Old 04-11-2006, 05:03 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Quote:
Originally Posted by Paul Wood
It caught about a dozen spam comments today. Only missed one, and I reported it to Askimet.
Hooray!!! It works....

Thanks for testing
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #10  
Old 04-11-2006, 09:48 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
the Akismet addon should act like this to have the best effect:

It should automatically send every received comment/trackback to Akismet servers and get the SPAM/NOT-SPAM flags. Then set a flag for that comment accordingly. Thus we need a additional field in the comment table for flagging something as spam. The Addon should have the option to delete the SPAM flagged commments in a predifined period of time. Meanwhile users could report the comments that are mistakenly flagged SPAM by akismet (HAM). Putting all Spam comments to moderation list is not the best way to use Akismet. With the above procedure human intervention to deleting/moderating the spmas will be limited.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs