View Full Version : most recent comments - problem
-okapi-
05-12-2006, 09:08 AM
even when comments are queued for moderation, they are displayed by the "last comments" addon!
spam attacks are terrible at the moment. i'm considering completely turning off the comments function.
mykodachrome
05-12-2006, 12:35 PM
Hey don't turn off comments - you get lots of good comments on your site I just checked.
But I have the same issue, it is nice how the spam control is catching the spam and sending it to moderation at the moment, but if there was a way to have the spam comment only show up in the awaiting moderation area and not the messages area that would be even nicer.
Also I have a persistant spammer who makes comments that seem to be genuine but the link via there name goes to one of these sites about medication - so there are no links in the body of the message but in the link to their name. Darn annoying! It is from a different IP every tme and they can make the comment without even showing a hit on my image page stat counter.
-okapi-
05-14-2006, 07:23 AM
Hey don't turn off comments - you get lots of good comments on your site I just checked.
Also I have a persistant spammer who makes comments that seem to be genuine but the link via there name goes to one of these sites about medication - so there are no links in the body of the message but in the link to their name. Darn annoying! It is from a different IP every tme and they can make the comment without even showing a hit on my image page stat counter.
exactly the same issue that i have! maybe it's even the same spammer.
each day i have to delete about 20 spam messages. EDITED: today 200 !!
the sending to moderation queue works nicely - if only those messages wouldn't shown up in the "most recent comments"-section.
i like this addon, and i hope there is a way to solve that problem.
Joe[y]
05-14-2006, 02:53 PM
have either of you tried the akismet addon?
posefius
05-26-2006, 02:41 PM
I contacted the author Mark Lewin, he gave me the following answer:
yeah, im noticing that i didnt do a good job of looking into the future with my addon. I specifcally created it for Pixelpost 1.3 (i think) and I personally have never upgraded since im happy with my version. I was thinking of upgrading soon, so when i do, i'll definitely take a look at the recent comment stuff....
So we just have to wait until Mark has time to fix it, or perhaps someone else can fix it.
posefius
05-29-2006, 08:52 PM
I modified the Mark Lewis Recent Comments addon to display only comments in the published queue. The comments in the moderation queue and Akismet Spam queue are not displayed. I dont know how to upload the modified version 0.2. Below you see the modified source code:
<?php
/*
Requires Pixelpost version 1.3
Recent Comments Addon version 0.2
Written by: Mark Lewin
Modified by: Piet Osefius
Contact: info@markmyshots.com
To see it in action go to: http://www.markmyshots.com
Pixelpost www: http://www.pixelpunk.se/software/
License: http://www.gnu.org/copyleft/gpl.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
$addon_name = "Most Recent Comments";
$addon_description = "Adds one new tag to display the most recent set of comments. <br /><br />
<LAST_COMMENTS><br /><br />
This addon will show the most recent set of comments that were left. The value is decided by you.<br /><br />
";
$addon_version = "0.2";
$limit_comments = 10; // Change this to show however many you want
$recent_comments = ""; // comments stored in this string
if($_GET['showimage'] == "") { $imageid = $image_id; } else { $imageid = $_GET['showimage']; }
$recentquery = mysql_query("select t1.parent_id, t1.message, t1.name, t1.url, t1.publish, t2.headline, t2.id from ".$pixelpost_db_prefix."comments as t1 inner join pixelpost_pixelpost t2 on t1.parent_id = t2.id where t1.publish = 'yes' ORDER BY t1.id DESC limit $limit_comments");
while(list($parent_id, $comment_message, $comment_name, $comment_url, $comment_publish, $comment_headline, $comment_image_id) = mysql_fetch_row($recentquery)) {
$comment_message = pullout($comment_message);
$comment_name = pullout($comment_name);
$comment_headline = pullout($comment_headline);
$comment_image = pullout($comment_image);
if($comment_url != "") {
$comment_url = "http://$comment_url"; // i'm running for president...
$comment_url = str_replace("http://http://","http://",$comment_url); // you see?
$comment_name = "<a href='$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
}
$comment_headline = "<a href='/index.php?showimage=$comment_image_id' title='$comment_headline' target='_blank'>$comment_headline</a>";
$recent_comments .= "<b>$comment_name</b> on <b>$comment_headline</b><br />$comment_message <br /><br />";
}
$recent_comments .= "";
$tpl = ereg_replace("<LAST_COMMENTS>",$recent_comments,$tpl);
?>
debudguy
09-12-2006, 05:40 AM
Thsi is the solution, i finally figured it out after working on this for a while. I simply change the value of yes to YES in the query where it requests to know if the comment was published or not.
workign fine now.
<?php
/*
Requires Pixelpost version 1.3
Recent Comments Addon version 0.1
Written by: Mark Lewin
Contact: info@markmyshots.com
To see it in action go to: http://www.markmyshots.com
Pixelpost www: http://www.pixelpunk.se/software/
License: http://www.gnu.org/copyleft/gpl.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
$addon_name = "Most Recent Comments";
$addon_description = "Adds one new tag to display the most recent set of comments. <br /><br />
<LAST_COMMENTS><br /><br />
This addon will show the most recent set of comments that were left. The value is decided by you.<br /><br />
";
$addon_version = "0.1";
$limit_comments = 5; // Change this to show however many you want
$recent_comments = ""; // comments stored in this string
if($_GET['showimage'] == "") { $imageid = $image_id; } else { $imageid = $_GET['showimage']; }
$recentquery = mysql_query("select t1.parent_id, t1.message, t1.name, t1.url, t1.publish, t2.headline, t2.id from ".$pixelpost_db_prefix."comments as t1 inner join pixelpost_pixelpost t2 on t1.parent_id = t2.id where t1.publish = 'YES' ORDER BY t1.id DESC limit $limit_comments");
while(list($parent_id, $comment_message, $comment_name, $comment_url, $comment_publish, $comment_headline, $comment_image_id) = mysql_fetch_row($recentquery)) {
$comment_message = pullout($comment_message);
$comment_name = pullout($comment_name);
$comment_headline = pullout($comment_headline);
$comment_headline = htmlspecialchars($comment_headline,ENT_QUOTES);
$comment_image = pullout($comment_image);
if($comment_url != "") {
$comment_url = "http://$comment_url"; // i'm running for president...
$comment_url = str_replace("http://http://","http://",$comment_url); // you see?
$comment_name = "<a href='$comment_url' title='$lang_visit_homepage' target='_blank'>$comment_name</a>";
}
$comment_headline = "<a href='/index.php?showimage=$comment_image_id' title='$comment_headline' target='_blank'>$comment_headline</a>";
$recent_comments .= "<b>$comment_name</b> on <b>$comment_headline</b><br />$comment_message <br /><br />";
}
$recent_comments .= "";
$tpl = ereg_replace("<LAST_COMMENTS>",$recent_comments,$tpl);
?>
Connie
09-12-2006, 05:58 AM
thank you for fixing that and communicating the solution here!
-okapi-
09-12-2006, 12:26 PM
thank you very much!
FirstGateDreamer
12-14-2006, 05:29 PM
Thanks posefius and debudguy. Works great.
I used debudguy's solution since I wasn't sure what posefius did.
thanks both.
Personne
06-26-2007, 08:54 AM
Since I upgrade to 1.6 version this addon don't work ?
I try the fix but it make me a blank page ?:confused:
Personne
06-29-2007, 02:56 PM
Am I the only one ?
dejaone
09-20-2008, 06:00 PM
The recent comments addon is exactly what I've been looking for, but my blog is in a subdirectory (mydomain.com/photoblog/) and the link to the photo goes to it as if it were in the root folder. Any ideas?
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.