Retrieving comments for items of universal module

More
10 years 3 months ago #49323 by ROZZA
Hello,
please using flexicontent module is it possible to get only list of comments and not articles with comments?
Thank you in advance for your support.
Salvatore

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #49330 by ggppdk
Hello

this is not implemented, but a developer can easily use the item ids that are available inside the template files of the module to query the DB table:

#__jcomments


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #49333 by ROZZA

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #49348 by ggppdk
Hello

-- in r1954 try/test editing
mod_flexicontent.xml

uncomment parameters:

list_comments
list_comments_feat


and then inside your custom module template you will have the comments available via the array:
Code:
$comments_arr[...item_id...]


-- Other option use the items ids to query the #__comments table yourself inside you custom module template:
Code:
$item_ids = ...; // an array with item ids $query = 'SELECT * FROM #__jcomments AS com ' .' WHERE com.object_id IN (' . implode($item_ids, ",") .') AND com.object_group="com_flexicontent" ' .' ORDER BY com.object_id, com.date DESC' ;


but using the built-in helper function should be faster ...

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #51798 by fifasw2
please using flexicontent module is it possible to get only list of comments and not articles with comments?

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #51821 by ggppdk
Hello

well, yes, do what the previous answer said:

- the code to retrieve comments (which is performance wise) is there but not yet enabled):


1. create custom module template, copy:
news.php
as
news2.php

2. uncomment the parameter as described above

3. disable display of ALL fields (except title ??) inside module parameters

4. use inside news2.php, this:
$comments_arr[...item_id...]


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.479 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline