Last Comment

jelzi

Joined: 2004-09-14
Posts: 4
Posted: Sun, 2005-11-06 10:27

I write a module for joomla to show the latest comments.
The comments are in xxx_Comment Table.
But i don´t know the place of the connection to the picture.
Please tell me where it is. The g_id in the xxxx_comment table is not right..

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-06 14:16

this forum is actually for the development of g2 modules...
i can help you on the g2 side of your joomla module.

use the G2 API to interact with g2, do not use your own SQL / SQL connection.
- load the g2 api with GalleryEmbed (the g2 integration for joomla does that already).
- load the comments module (i'm sure there's example code in the existing joomla integration)
- GalleryCoreApi::relativeRequireOnce('modules/comment/classes/GalleryCommentHelper.class');

list ($ret, $comments) = GalleryCommentHelper::fetchComments($itemId);
( the connection comment <-> itemId is in ChildEntity)