Topic: Show the real name in post
How to show the real/nick name (not user name) in post?
Thanks!
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 extensions → Show the real name in post
How to show the real/nick name (not user name) in post?
Thanks!
You mean instead of it? You want to use login/pass just for logging in, and then real name value?
If yes, it's almost impossible. Username value exist in hundreds of places in code (like viewtopic, viewforum, index, search, profile, extern, edit, post.... omg - it's just everywhere)
In theory it is possible, but I'll not do this
Simplest way will be force users to use real name as username
It shouldn't be that hard...
First, replace line 275 on 'viewtopic.php' with:
'SELECT' => 't.subject, t.posted, t.poster, t.first_post_id, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, u.realname',
Next, replace line 317 from the same file with:
if ($cur_post['realname'])
$forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), (($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['realname']).'</a>' : '<strong>'.forum_htmlencode($cur_post['realname']).'</strong>')).'</span>';
elseif ($cur_post['poster_id'] > 1)
And... you're done! (It worked for me)
@Garciat
but it is showing it only on post list (viewtopic)
even "Last edited by" will keep username
I know, but that's what he asked for, right?
I know, but that's what he asked for, right?
Generally yes But I think he mean more than just this
Cheers
Maybe... but I think hiding the username completely would be a nice thing to do, because it would make account theft harder, right?
Maybe... but I think hiding the username completely would be a nice thing to do, because it would make account theft harder, right?
Yes, it will It's very good for security.
But in this case easier will be to use emial address to logging in, because it is currently required, usually hidden and unique, and it will not make any problems if you have any special national chars in your name, and you will need to log in on machine without your keyboard layout installed.
I know, but that's what he asked for, right?
Yes, don't want display the login name to public.
sorry for my bad english.
Anyone can make a extension hide login name and display the real name only? Thanks!
I'm interested in this too. More here.
PunBB Forums → PunBB 1.3 extensions → Show the real name in post
Powered by PunBB, supported by Informer Technologies, Inc.