Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-02-28 12:11:02
- K2member
- Member
- Registered: 2006-10-24
- Posts: 19
How to display nickname instead of real name (txp:author)
Hi,
is it possible to display my username instead of my real name when using <txp:author>?
Or am I able to add a new tag which does this?
Thanks
Last edited by K2member (2009-02-28 12:11:53)
Offline
Re: How to display nickname instead of real name (txp:author)
Hi
insert this code into an article form :
<txp:php>
global $thisarticle;
$name0 = fetch('name','txp_users','name',$thisarticle['authorid']);
echo '<p>::: '.$name0.' :::</p>';
</txp:php>
NB: Change the echo string to match your need.
Cheers
Offline
#3 2009-02-28 14:15:17
- K2member
- Member
- Registered: 2006-10-24
- Posts: 19
Re: How to display nickname instead of real name (txp:author)
Thanks – looks ugly but it works ;)
Offline
Re: How to display nickname instead of real name (txp:author)
K2member wrote:
Thanks – looks ugly but it works ;)
If you want less ugly, try one of these plugins:
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: How to display nickname instead of real name (txp:author)
Thanks bloke,
I searched for an existing plugin but havent found one! (i must improve my search skills ;) ).
I think it s better with a plugin!
Offline