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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 05:11 Go to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 07:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3634
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 08:03 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 08:40 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 12:34 Go to previous messageGo to next message
Fladi is currently offline  Fladi   
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 15:45 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3634
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
It's enforced by FUDforum.
Look at the users table, login, email and alias have unique indexes on them.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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 Jan 20 04:15:31 EST 2018

Total time taken to generate the page: 0.00763 seconds