Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Real Name
I wasn’t sure where to put this so it’s here. In the txplib_head file $txp_user
is called for the “logged in as” block. Is it possible to get the Realname as well?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Offline
Re: Real Name
Sorry Jukka. My PHP isn’t up to your standard. :)
Here’s the line I want to modify. It isn’t in the usual txplib_head file:-
$user_info = ($txp_user) ? gTxt('<span class="user">Welcome </span>').' '.tag($txp_user, 'span', ' class="user"').'<span class="logButton">'.tag(gTxt('logout'), 'a', ' href="?logout=1" class="logLink"'). '</span>' : '';
$txp_user
is a “global”. How would I modify that?
Last edited by thebombsite (2008-02-16 12:39:11)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Real Name
Basically it is like I said:
$user = array();
$user = safe_row('*','txp_users',"name = '". doSlash($txp_user)."'");
$user_info = ($txp_user) ? '<span class="user">Welcome </span><span class="user">'.$user['RealName'].'</span><span class="logButton"><a href="?logout=1" class="logLink">'.gTxt('logout').'</a></span>' : '';
PS. There isn’t language string named <span class="user">Welcome </span>
;D
Offline
Re: Real Name
Gocom wrote:
PS. There isn’t language string named <span class="user">Welcome </span>
;D
I know but I didn’t want to remove the gTxt because of things like brackets and periods and I didn’t want to break it. ;)
Thanks for the code anyway. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1