Comment preview: first comment

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Comment preview: first comment

Post by yellowled »

I just noticed that the comment preview in my new template at http://matthias.yellowled.de does not display the preview comment if it is the first comment for an entry. Quite frankly, I don't even have an idea where exactly to start looking for the error. comments.tpl? entries.tpl? commentform.tpl? Which one is responsible for the preview and where?

I am assuming it is comments.tpl since that's the one with the most significant changes compared to default. But what part of it is responsible for the preview?

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Comment preview: first comment

Post by garvinhicking »

Hi!

I believe entries.tpl is the problem, if you only show comments when $entry.comments > 0 you will never get a preview area, because $entry.comments will be 0.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Comment preview: first comment

Post by yellowled »

garvinhicking wrote:I believe entries.tpl is the problem, if you only show comments when $entry.comments > 0 you will never get a preview area, because $entry.comments will be 0.
Yes, that was to be the problem. Yet it isn't in entries.tpl but in comments.tpl. I had some if statement in there which prevented the preview area.

All entries.tpl does to emit comments is

Code: Select all

{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
which I believe then "calls" comments.tpl.

Thanks :)

YL
Post Reply