PDA

View Full Version : Addon - "Most Recent Comments"


mark
02-24-2005, 03:12 PM
Just added a new "addon" that will show the last however many comments you'd like to see.

New tag <LAST_COMMENTS>

The value is decided by you. Just change it in recent_comments.php.

The default value is - 20

To see it in action:

http://www.markmyshots.com

And then click on "Browse Photos"

raminia
02-24-2005, 04:20 PM
That's nice:)
I'll try it.

Zlato
02-25-2005, 12:19 PM
Hi Mark !

all is nice your website and...of course this addon, will put this on my site ( you're site is already in my links ;-))

Btw thanks again to Ramin for his great achivement on Page-by-Page archive addon...

Anonymous
04-04-2005, 06:53 PM
this is great. but anyway to include it in another page of my website (i.e. non pixelpost one)? just a question... :wink:

Joe[y]
04-04-2005, 09:24 PM
superb. :lol:

dorowski
06-12-2006, 03:16 PM
In the Admin Panel (PP 1.5):
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /www/htdocs/[...]/photoblog/addons/recent_comments.php on line 40

and LAST_COMMENTS doesn't display anything.

Any idea what went wrong?

dorowski
06-16-2006, 08:26 PM
Problem solved: wrong database in line 39...

Snoops
06-24-2006, 11:05 AM
all i get is this.. cant anyone help me pleaseCommenters Websites (comment_urls - version 0.5) - status: ON
This addon gives you a new tag - which will display a list of people who have commented on your photoblog, this list will be hyperlinked to the urls specified.
The list of comments is in an unordered list, with the "comment-urls" class, you may wish to define this in your CSS ;)
Future versions will allow for more customisation.


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/nastyone/public_html/addons/recent_comments.php on line 41
Most Recent Comments (recent_comments - version 0.1) - status: ON
Adds one new tag to display the most recent set of comments. <br /><br /> &lt;LAST_COMMENTS&gt;<br /><br /> This addon will show the most recent set of comments that were left. The value is decided by you.<br /><br />

Ubbe
06-29-2006, 04:28 PM
2 things: first of all i can't make this work at all, i do not have the same mysql problems as the previous people here, but it simply does not display.

secondly, yeah i think it could be great aswell if you could make something that would allow displaying comments on non pixelpost pages.

Snoops
06-30-2006, 11:40 AM
I got mine to work.. with the help of Mark :)

this is what works for me
<?php

/*

Requires Pixelpost version 1.3
Recent Comments Addon version 0.2.1
Written by: Mark Lewin
Modified by:Alfonso Bernal (http://www.reflectingmyself.com)
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 />
&lt;LAST_COMMENTS&gt;<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.1";

$limit_comments = 10; // Change this to show however many you want
$recent_comments = '<div id="rcomments">'; // 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, t2.headline, t2.id, t2.image from ".$pixelpost_db_prefix."comments as t1 inner join ".$pixelpost_db_prefix."pixelpost t2 on t1.parent_id = t2.id where t1.name != 'Leisa' ORDER BY t1.id DESC limit $limit_comments");// replace Leisa with your own name
while(list($parent_id, $comment_message, $comment_name, $comment_url, $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";
$comment_url = str_replace("http://http://","http://",$comment_url);
$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 .= "<li><b>$comment_name</b> on <i>$comment_headline</i><br />$comment_message <br /><br /></li>";
}
$recent_comments .= "</ul>";

$tpl = ereg_replace("<LAST_COMMENTS>",$recent_comments,$tpl);

?>

Hope this helps

Ubbe
06-30-2006, 06:01 PM
i got mine to work aswell now :) just a stupid typo in my case.

i was thinking, if i create a file in the pixelpost templates folder, that does nothing else but call upon the most recent comments, could i then maybe just make an include on that file on a "out of pixelpost" site, or am i totally of?

i'll just give it a try, but maybe i'm simplifying things?

dejaone
09-20-2008, 06:27 PM
Can this addon work if you have your blog in a subdirectory?

zac
10-23-2008, 06:14 PM
Hi Dejaone

I was having the same problem.. I got it to work by changing

$comment_headline = "<a href='/index.php?showimage=$comment_image_id' title='$comment_headline' target='_blank'>$comment_headline</a>";

to

$comment_headline = "<a href='index.php?showimage=$comment_image_id' title='$comment_headline' target='_blank'>$comment_headline</a>";

Removed the first slash.