Page 1 of 1

author's & comment author's names not shown

Posted: Wed Nov 16, 2005 6:28 pm
by littlerabbit
Hey guys, greetings.

In the list of articles, the "Posted by" is not showing the author's name.
http://cailun.info/

However, the author name 's shown in the entry page itself, for example,
http://cailun.info/index.php?/archives/ ... art-5.html

On the other hand, weird stuff, is there a way to re-enable comment author's name in the comments area? It's show on the comments sidebar but every name is listed as "Anonymous" in the entry page.

My version: Serendipity 0.8.4 and PHP 4.4.2-dev

s9y rocks! thanks a millions.

Re: author's & comment author's names not shown

Posted: Wed Nov 16, 2005 6:33 pm
by Col. Kurtz
littlerabbit wrote:Hey guys, greetings.

In the list of articles, the "Posted by" is not showing the author's name.
http://cailun.info/

However, the author name 's shown in the entry page itself, for example,
http://cailun.info/index.php?/archives/ ... art-5.html
thats not a bug. the list of articles is defined in the "index.tpl" of your template, the full entry in the "entries.tpl". they can differ from each other. [note: if your theme is missing these files, copy them from the default folder and edit em]

Posted: Wed Nov 16, 2005 8:39 pm
by littlerabbit
thanks! i can edit the .TPL files. but looks like the "username" veriable in the following 2 places are not being processed. hence the empty username in entry and "Anonymous" in comments. any idea?

entries.tpl -
$CONST.POSTED_BY} {$entry.username}

comments.tpl -
{$comment.username|@default:$CONST.ANONYMOUS}

Posted: Thu Nov 17, 2005 2:54 pm
by garvinhicking
I think this might be a bug of your Serendipity 0.8 version in combination with your template. Please check the entries.tpl file of the default template and look which variable is shown there. it might be $entry.realname instead of $entry.username or so.

Something in this variable name has changed during a 0.8 version, but this was announced in the upgrader...

Regards,
Garvin

Posted: Thu Nov 17, 2005 10:36 pm
by littlerabbit
Thank you so much. That totally works. It must be my old TPL file before upgrade that caused the error. All I have to do is the change all the instances of "username" to "author".

$CONST.POSTED_BY} {$entry.username} --> $CONST.POSTED_BY} {$entry.author}

{$comment.username|@default:$CONST.ANONYMOUS} --> {$comment.author|@default:$CONST.ANONYMOUS}