Topic: Show the real name in post

How to show the real/nick name (not user name) in post?
Thanks!

Re: Show the real name in post

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 big_smile

Simplest way will be force users to use real name as username cool

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: Show the real name in post

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)

Re: Show the real name in post

@Garciat
but it is showing it only on post list (viewtopic)

even "Last edited by" will keep username

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: Show the real name in post

I know, but that's what he asked for, right?

Re: Show the real name in post

Garciat wrote:

I know, but that's what he asked for, right?

Generally yes wink But I think he mean more than just this wink
Cheers

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: Show the real name in post

Maybe... but I think hiding the username completely would be a nice thing to do, because it would make account theft harder, right?

Re: Show the real name in post

Garciat wrote:

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 smile 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.

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

9 (edited by leoleo 2009-01-22 15:49)

Re: Show the real name in post

Garciat wrote:

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.

10

Re: Show the real name in post

Anyone can make a extension hide login name and display the real name only? Thanks!

11

Re: Show the real name in post

I'm interested in this too. More here.