| Author |
Message |
ideon
Beginner


Joined: Aug 12, 2003 Posts: 3
|
Posted: Sat Sep 27, 2003 2:06 am Post subject: latest comments bolck |
|
|
| hallo, I would so much need to have a block with latest comments to images, would that be possible? thank you for any help. Martin |
|
| Back to top |
|
|
AdBot
|
| Post subject: latest comments bolck |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Sat Sep 27, 2003 8:47 am Post subject: |
|
|
| hm....this might be easy to do with a hack to the add_comment.php file...i've got a lot of other things going on today, but i'll try to work one out... |
|
| Back to top |
|
|
wike
Beginner


Joined: Dec 14, 2003 Posts: 2
|
Posted: Fri Jan 30, 2004 8:40 pm Post subject: Re: latest comments bolck |
|
|
| I'm interested in this too, is there something already written? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Feb 02, 2004 8:57 am Post subject: Re: latest comments bolck |
|
|
| yeah i've got one written, still working out the kinks. keep your eyes open for it soon. |
|
| Back to top |
|
|
zyphichore
Beginner


Joined: Feb 05, 2004 Posts: 2
|
Posted: Mon Apr 19, 2004 5:16 pm Post subject: Re: latest comments bolck |
|
|
i've done a few searches on latest/newest comments.. this seems to be the most recent/active thread on the subject.
did anything ever come of this?
(i've tried to use some of the posting/fetching code from add_comment.php using the NewstPhoto block as a base.. unfortunately the kinks in mine break the whole page heheheh) |
|
| Back to top |
|
|
zyphichore
Beginner


Joined: Feb 05, 2004 Posts: 2
|
Posted: Tue Apr 20, 2004 12:09 pm Post subject: Re: latest comments bolck |
|
|
OK, this seems to work.. in "block-NG-NewestPhoto.php" insert this just before "return $content;" (i'm still interested in one that looks a bit nicer )
// BEGIN -- add/view comments modification to "Newest Photo" block --
// from add_comment.php
// $url = "add_comment.php?set_albumName={$gallery->album->fields['name']}&id=$id";
$url = "add_comment.php?set_albumName={$newestPhotoAlbum->fields['name']}&id=$id";
$content .= "<br>";
$content .= popup_link('[' . _("add comment") . ']', $url, 0);
$content .= "<hr>";
//from view_comments.php
$comments = $newestPhotoAlbum->numComments($index);
if($comments > 0)
{
for($j = 1; $j <= $comments; $j++)
{
$comment = $newestPhotoAlbum->getComment($index, $j);
//from layout/commentbox.inc
$content .= "";
$content .= $comment->getName();
$content .= " @ ";
$content .= $comment->getDatePosted();
$content .= " Said: <br>";
$content .= $comment->getCommentText();
$content .= "<hr>";
}
}
// END -- add/view comments modification to "Newest Photo" block -- |
|
| Back to top |
|
|
|
|
|
|
|