Templates

How do I display the real name instead of username?

Scenario:
"How do I change the "Posted by" when you post a blog? I want it to say the real name instead of the username."

Solution:
Change the author variable in your template.

Original forum thread:
http://forum.nucleuscms.org/viewtopic.php?t=8592

Method:
Go into your Admin area and click on Templates. Find the template you're using and click on the edit link.

Using the Default skin

If you're using the default skin, scroll down to the Item Body box and you'll find some code like this:

Posted by: <a href="<%authorlink%>" title="Author: <%author%>"><%author%></a>

Just change that to this:

Posted by: <a href="<%authorlink%>" title="Author: <%author(realname)%>"><%author(realname)%></a>

You will need to do this for both the default/index template and the default/item template.

Other skins

Find anywhere the Nucleus variable

<%author%>

is used and replace it with

<%author(realname)%>

and Nucleus will display the real name instead of the username.

section: Templates | submitted by Leng on 2005.Sep.10 | 2963 views

item rate
Total votes: 4 - Rating: 9.50

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10