Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 11-24-2004, 07:38 AM
horix Offline
forum loafer
 
Join Date: Nov 2004
Posts: 6
all comments on one page

wondering if there is a quick/easy way to do this? assuming there is some while loop i can put somewhere that will grab all comments from an image and repeat that to get all comments from all images? with some formatting tags thrown in this could be a powerful function to add...? if someone wants to give me the general tags or where to look im sure i could figure it out, just not really sure where to start!

thanks, horix - galexkeene.wornpath.net
Reply With Quote
  #2  
Old 11-24-2004, 08:16 AM
Connie
Guest
 
Posts: n/a
I think this topic is on the way already

I assume you want to see all the comments in the admin-area? In the "public area" their are shown already ;=)
Reply With Quote
  #3  
Old 11-24-2004, 08:22 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
I am not exactly sure what you want to accomplish. But to print out all comments from the blog you can do something like this.
Code:
<?php

$addon_name = "Grab all comments";
$addon_description = "Will print out all the comments from the blog.
";
$addon_version = "0.1";

if($_GET['x'] == "grabcomments") {
    // will print out all comments from the blog ordered by newest first and oldest last
    $cquery = mysql_query("select parent_id, datetime, message, name, url from ".$pixelpost_db_prefix."comments order by id desc");
    while(list($comment_parent,$comment_datetime, $comment_message, $comment_name, $comment_url) = mysql_fetch_row($cquery)) {
	     // all comments, do stuff
	     echo "
	     $comment_datetime<br />
	     $comment_message<br />
	     <a href='$comment_url' target='_blank' title='Visit website'>$comment_name</a>
	     <hr />
	     ";
	     } // end while loop
exit;    
} // end grabcomments
    
?>
This will work, however you obviously need more formatting and stuff if you want it as a separate page. You could also hook it up with a custom template if you wish. But this is a basic writeup to show you how it can be done, this is as an addon.

Put this in a file, upload to your addons directory and call it with index.php?x=grabcomments

// punk
__________________
icq: 66760929
Reply With Quote
  #4  
Old 11-24-2004, 10:29 AM
horix Offline
forum loafer
 
Join Date: Nov 2004
Posts: 6
cant seem to get this working.. did a read over myself but i dont know enough php or about pixelpost to troubleshoot... can you do a quick proof? thanks!
Reply With Quote
  #5  
Old 11-24-2004, 12:27 PM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
grab it here

Probably just gremlins when copy/pasting from the web.

demosite

// punk
__________________
icq: 66760929
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:15 AM.

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