displaying comments on weblog page
Posted: 26 May 2008 05:58 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  73
Joined  04-28-2008

Hi,

I have a weblog called ‘noticeboard’, and would like to display recent comments under each entry. I have successfully added a comment submission form and comment display option to my single entry page, but I would like comments to be displayed on the main weblog page as well.

Is this possible? The documentation states that the comment display should be used only in a single page, but I would like visitors to be able to see a list of weblog entries and approved comments under each post.

Here is the code for my weblog diaplsy:

{exp:weblog:entries disable="categories|member_data|pagination|trackbacks" weblog="noticeboard" sort="asc" }

<h2>{title}</h2>
{body}  {/exp:weblog:entries}

(I tried taking the disable= part off but this made no difference)

And here is the code I’ve used after the above piece to display the comments:

{exp:comment:entries sort="asc" limit="20"}

{comment}

<p>By {name} on {comment_date format="%Y %m %d"}</p>

{/exp:comment:entries}

The comments aren’t showing up, any suggestions on how I can make this work would be appreciated.

Thanks.

UPDATE:

I’ve managed to list the recent comments by using the code from this page (http://expressionengine.com/docs/modules/comment/recent_comments.html) but these are displayed as a list at the bottom of the page. I would really like each comment to be displayed under the relevant entry.

Profile
 
 
Posted: 26 May 2008 07:08 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12918
Joined  05-15-2004
mork - 26 May 2008 05:58 AM

The documentation states that the comment display should be used only in a single page, but I would like visitors to be able to see a list of weblog entries and approved comments under each post.

Exactly. Comments, as we know them, are meant to go on single weblog entry pages only. EE does not natively have the ability to show the comments on “mutli-page” templates. For a workaround, involving PHP, see the wiki.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 26 May 2008 10:34 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  73
Joined  04-28-2008
Ingmar Greil - 26 May 2008 07:08 AM
mork - 26 May 2008 05:58 AM

The documentation states that the comment display should be used only in a single page, but I would like visitors to be able to see a list of weblog entries and approved comments under each post.

Exactly. Comments, as we know them, are meant to go on single weblog entry pages only. EE does not natively have the ability to show the comments on “mutli-page” templates. For a workaround, involving PHP, see the wiki.

Hmmm...not sure I like the idea of putting an extra burden on my hosting, I’ll stick with a list at the bottom for now.

Thanks for the information.

Profile
 
 
Posted: 26 May 2008 10:45 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12918
Joined  05-15-2004

It will depend on your setup, the number of page visits and a number of other factors. I have done it on occasion, and it was not all that bad. You may just try it, if you like, see how it goes. Just be aware of potential issues and limitations. Marking this thread as “Resolved”. If anyhting else comes up, kindly start a new thread, thanks.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 60728 Total Logged-in Users: 21
Total Topics: 73190 Total Anonymous Users: 15
Total Replies: 394731 Total Guests: 462
Total Posts: 467921    
Members ( View Memberlist )
Newest Members:  Chethansisiharmonijoe_carneypsykonautJitsunROPasterfredpwsAnita VJMaxthehuskybear