Disaplay Avatar in comments

mmln
Joined: 22 Jun 2008

Disaplay Avatar in comments

Posted:25 May 2009 (03:30 UTC)
I want to display user avatar (Similar to message board posts) in comments section so I am modifying 'liberty/templates/display_comment.tpl'.

Is there a pre-defined variable I can directly use in this display_comment.tpl or should I declare in read.php file and reference in display_comment.tpl
Lester Caine
Joined: 24 Apr 2004

Re: Disaplay Avatar in comments

Posted:25 May 2009 (06:19 UTC)
mmin
The quick answer to this in 'no' as the avatar information is not returned for 'comments'. The blog and boards method of getting a list of comments adds the avatar to the query, and if you look for `avatar_attachment_id` you will find the rather complex mechanism needed to extract the `storage_path` for the relevant picture.

( I really am getting annoyed with this unnecessary complexity that is required for some of these actions. `avatar_attachment_id` in my own case is a simply `content_id` and the path to it can be created without joins on two other tables :( )
  Page 1 of 1  1 
Post
If you are already registered, please enter your login credentials.
Anonymous Post