Example using comments_by_author.tpl ?

Discussion corner for Developers of Serendipity.
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Example using comments_by_author.tpl ?

Post by Don Chambers »

1) Under what circumstances is this smarty template used? I have never noticed it before, but see it located in the default template folder.

2) What I was really looking for was a a tpl for entries by author... I want to consider formatting a pageview for author entries that is different from the usual entries.tpl. Does that possibility already exist?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Example using comments_by_author.tpl ?

Post by garvinhicking »

Hi!
Don Chambers wrote:1) Under what circumstances is this smarty template used? I have never noticed it before, but see it located in the default template folder.
The access to this template is not really wired into s9y. It can show comments by authors, see docs/NEWS if you search for [AUTHORNAME]. It can be access with URLs like

/blog/comments/AUTHORNAME/ ...
2) What I was really looking for was a a tpl for entries by author... I want to consider formatting a pageview for author entries that is different from the usual entries.tpl. Does that possibility already exist?
The file used for that is entries.tpl. So you'd need to evaluate the $view variable, it should hopefully point to "authors" in those cases. :-)

Else, you would need to check for the $serendipity['GET']['viewAuthor'] or $_GET['viewAuthor'] variable. I don'T know if this var is assigned to smarty scope, so you might need to set that through the tempaltes config.inc.php.

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

1) thanks Garvin - I found the reference to it in the NEWS file....

2) I know how to do it with $view, I was just curious if we had the ability to use a specifically named tpl if it existed, much like archives.
=Don=
Post Reply