Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 05-27-2005, 11:25 PM
anela's Avatar
anela Offline
pp regular
 
Join Date: May 2005
Posts: 21
Recent Comments

Now, I am pretty positive that while going through the board archives yesterday I stumbled on a post by someone who was offering an addon for the most recent comments - it showed the user's name and their comment, in a list. However, it wasn't what I was looking for at the time, and now I can't find it... go figure.

Does anyone know of an addon like this?

Thank you!
__________________
resonate.ws
Reply With Quote
  #2  
Old 05-27-2005, 11:51 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
http://www.pixelpost.org/v1/devfiles/?id=48
__________________
i should say more clever stuff
Reply With Quote
  #3  
Old 05-28-2005, 02:49 PM
anela's Avatar
anela Offline
pp regular
 
Join Date: May 2005
Posts: 21
Thanks, once again!
Very nice, I like this addon! http://resonate.ws/index.php?x=recent
__________________
resonate.ws
Reply With Quote
  #4  
Old 05-28-2005, 04:05 PM
doffer Offline
pixelpost guru
 
Join Date: Mar 2005
Location: Oslo
Posts: 159
I've made a list of recent comments on my site too... But i want images too... So that the image commented is showed together with the comment... I guess this should be possible somehow, but I don't know how
__________________
o b s c u r e
My photoblog, proudly presented and powered by Pixelpost 1.4
Reply With Quote
  #5  
Old 05-28-2005, 06:16 PM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Should be easy to include an image since you already have the id. Just get the imagename from the db and include the thumb or whatever.

// unk
__________________
icq: 66760929
Reply With Quote
  #6  
Old 05-28-2005, 09:05 PM
doffer Offline
pixelpost guru
 
Join Date: Mar 2005
Location: Oslo
Posts: 159
Hi punk

Could you describe how to do this? I tried the <IMAGE_NAME> stuff, but it didn't work out...

BTW... Did you get my email?

Regards
__________________
o b s c u r e
My photoblog, proudly presented and powered by Pixelpost 1.4
Reply With Quote
  #7  
Old 05-29-2005, 01:53 AM
anela's Avatar
anela Offline
pp regular
 
Join Date: May 2005
Posts: 21
I have been trying on and off all day to get this plugin to function like the WordPress plugin here: http://meidell.dk/archives/2004/09/1...test-comments/ (see http://meidell.dk, right sidebar, "activity" for example) only with showing the image. So far I'm not having any luck, but I'll keep working on it. Guess I need to get out my PHP books and refresh myself. :lol:
__________________
resonate.ws
Reply With Quote
  #8  
Old 05-29-2005, 02:09 AM
anela's Avatar
anela Offline
pp regular
 
Join Date: May 2005
Posts: 21
Oh wait, I think I got it... or at least partially (to what I want to end up with).
This code should show you the thumbnail followed by the same info as was before in a table.

Line 39 becomes:
Code:
    $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_pixelpost t2 on t1.parent_id = t2.id where t1.name != '-mark-' ORDER BY t1.id DESC limit $limit_comments");
Add just below line 44:
Code:
	    $theimage = pullout($theimage);
Change line 51 (now 52) to:
Code:
	    $recent_comments .= "<table><tr><td valign=\"top\"><img src=\"thumbnails/thumb_$theimage\"></td><td valign=\"top\"><b>$comment_name</b> on <b>$comment_headline</b><br />$comment_message</td></tr></table>";
Example: http://www.resonate.ws/index.php?x=recent

Now I want to group them together, have only each thumbnail/image listed once with most recent comments below it... etc...

Of course, the above code does not link the thumbnail to the image, but that can very easily be done...
__________________
resonate.ws
Reply With Quote
  #9  
Old 05-29-2005, 09:03 PM
doffer Offline
pixelpost guru
 
Join Date: Mar 2005
Location: Oslo
Posts: 159
Somehow I didn't get it right... Could you just post the entire code here?
__________________
o b s c u r e
My photoblog, proudly presented and powered by Pixelpost 1.4
Reply With Quote
  #10  
Old 05-29-2005, 09:19 PM
anela's Avatar
anela Offline
pp regular
 
Join Date: May 2005
Posts: 21
This is everything except for the author's notes and the copyright info.

If you find the part where it says ◊ valerie ◊ you can change that to your own name. Keeps your own comments, if you leave any at your site, from appearing in the recent comment list. When the code is all put together, it's somewhere around line 39...

Code:
$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 = 20;  // 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, t2.headline, t2.id, t2.image from ".$pixelpost_db_prefix."comments as t1 inner join pixelpost_pixelpost t2 on t1.parent_id = t2.id where t1.name != '◊ valerie ◊' ORDER BY t1.id DESC limit $limit_comments");
    while(list($parent_id, $comment_message, $comment_name, $comment_url, $comment_headline, $comment_image_id, $theimage) = mysql_fetch_row($recentquery)) {
	    $comment_message = pullout($comment_message);
	    $comment_name = pullout($comment_name);
	    $comment_headline = pullout($comment_headline);
	    $comment_image = pullout($comment_image);
	    $theimage = pullout($theimage);
	    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'>$comment_name</a>";
	    	}
	    $comment_headline = "<a href='/index.php?showimage=$comment_image_id' title='$comment_headline'>$comment_headline</a>";
	    $recent_comments .= "<table><tr><td valign=\"top\"><img src=\"thumbnails/thumb_$theimage\"></td><td valign=\"top\"><b>$comment_name</b> on <b>$comment_headline</b><br />$comment_message</td></tr></table>";
	    }
    $recent_comments .= "";
    $tpl = ereg_replace("<LAST_COMMENTS>",$recent_comments,$tpl);
__________________
resonate.ws
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 12:57 PM.

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