![]() |
|
which $item with printLatestComment function for current image - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: which $item with printLatestComment function for current image (/thread-13661.html) |
which $item with printLatestComment function for current image - pled - 2021-11-01 Hi, I've seen the printLatestComments() function, and the $item parameter ("the record id of element to get the comments for") required when using 'image' as $type for that function. I tried the following : But then nothing is returned. When using : I can get latests comments from the gallery, so the function works. Any help woud lbe welcome ! which $item with printLatestComment function for current image - acrylian - 2021-11-01 You nearly got it. The id refers to the id of item in the database, you get this via But if you use comments, the comments would be listed below the comment form anyway so you would double them, wouldn't you? which $item with printLatestComment function for current image - pled - 2021-11-01 Thanks, it works ! Yes, latest comments would be duplicated... unless I use the printCommontForm function, setting the $displaycomments to false : Then only the "add a comment" section is displayed at the bottom. Perfect ! Ideally, I would like to display all comments in the sidebar (there are generally few comments for a specific image in my gallery, so it should size here well) ; but I guess the printCommentForm allows to only display comments ? This is why I am using printLastestComments in the side bar, and using a bigger $number should do the trick ! which $item with printLatestComment function for current image - pled - 2021-11-01 Sorry I meant printCommentForm() does not allow to display only comments (ie the add new comment section is included). which $item with printLatestComment function for current image - acrylian - 2021-11-01 printCommentForm() does not make much sense if you disable the form, does it. But you already found how to disable the comments listing. There are numerous way to display comments instead of using which $item with printLatestComment function for current image - pled - 2021-11-13 Right, the [code]next_comment[/code] loop is more appropriate for my purpose, and probably easier to use for me compared to object model ! I will use it. |