FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Howto show users realname in singel message?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Howto show users realname in singel message? [message #167853] Thu, 25 October 2012 09:11 Go to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
Hi!

I got another problem where I need your help. While we are using SSO and merge with the mailing list we would like to show the realnames in the messages.
This is found in drawmsg.tmpl

{SECTION: dmsg_reg_user_link}
<a href="{TEMPLATE: dmsg_reg_user_link_lnk}">{VAR: user_login}</a>
{SECTION: END}


When looking at drawmsg.inc.t I found

$user_login = $obj->user_id ? $obj->login : $GLOBALS['ANON_NICK'];


where the shown user_login is assigned the login-name (!= realname). So, what is the best way to show the stored realname of the author?

Thank you for the help.
Re: Howto show users realname in singel message? [message #167854 is a reply to message #167853] Thu, 25 October 2012 11:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Edit 'msg.php.t' and change 'u.alias AS login' to 'u.name AS login' in the query.
Remember to rebuild your themes when done.

Aw: Re: Howto show users realname in singel message? [message #167855 is a reply to message #167854] Thu, 25 October 2012 12:03 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
Unfortunately not working. Changed the source, recompiled (without errors). Same output. If I put debug on I can see the SQL with a statement still pointing to u.alias:

SELECT m.*, COALESCE(m.flag_cc, u.flag_cc) AS disp_flag_cc, COALESCE(m.flag_country, u.flag_country) AS disp_flag_country, t.thread_opt, t.root_msg_id, t.last_post_id, t.forum_id, f.message_threshold, u.id AS user_id, u.alias AS login, u.avatar_loc, u.email, u.posted_msg_count, u.join_date, u.location, u.sig, u.custom_status, u.icq, u.jabber, u.affero, u.aim, u.msnm, u.yahoo, u.google, u.skype, u.twitter, u.last_visit AS time_sec, u.users_opt, l.name AS level_name, l.level_opt, l.img AS level_img, p.max_votes, p.expiry_date, p.creation_date, p.name AS poll_name, p.total_votes, pot.id AS cant_vote FROM fud30_msg m INNER JOIN fud30_thread t ON m.thread_id=t.id INNER JOIN fud30_forum f ON t.forum_id=f.id LEFT JOIN fud30_users u ON m.poster_id=u.id LEFT JOIN fud30_level l ON u.level_id=l.id LEFT JOIN fud30_poll p ON m.poll_id=p.id LEFT JOIN fud30_poll_opt_track pot ON pot.poll_id=p.id AND pot.user_id=6 WHERE m.id=667096 AND m.apr=1 AND m.thread_id=192342


When I search for "u.alias AS login" I get a number of other files which might affect this?
[img]index.php?t=getfile&id=6306&private=0[/img]

Any other idea?
Thanks
Tim
Aw: Re: Howto show users realname in singel message? [message #167856 is a reply to message #167855] Thu, 25 October 2012 12:40 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
Figured it out. tree.php.t needs to be adjusted in the same way.

Thanks for the hint into the right direction!
Aw: Re: Howto show users realname in singel message? [message #167857 is a reply to message #167856] Thu, 25 October 2012 16:34 Go to previous messageGo to next message
Fladi is currently offline  Fladi   
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
While playing around I found out that the easiest way would be to put the realname into the alias-field. Our SSO-Adapter says that "alias" has to be unique. Is this needed by FUDForum or is it just our Adapter?
Re: Aw: Re: Howto show users realname in singel message? [message #167858 is a reply to message #167857] Thu, 25 October 2012 19:45 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It's enforced by FUDforum.
Look at the users table, login, email and alias have unique indexes on them.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Error when creating custom theme -> mnav.tmpl
Next Topic: Upgrading 3.0.3
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 21:14:07 GMT 2024

Total time taken to generate the page: 0.02637 seconds