PDA

View Full Version : username display request


bast
11-19-2002, 09:25 PM
I've looked around quite a bit and have been unable to find anything like this, but if I have overlooked it, sorry in advance.

On one of the newer versions of UBB, there is an option for a 'displayname'. You have your username that you registered with that is unchangeable, but you can select a display name that you can change on the fly.

I really don't want a hack where people can change their actual login name, becuase it gets confusing...and so something more temporary might be the solution for all my members who keep asking for name changes.

Is it possible?

Erwin
11-19-2002, 09:30 PM
Very easy to do without hacking.

Go to Admin CP.

Make a new custom user profile field. Call it "Display Username".

Make it editable by member, but not show up in user profile.

Put your mouse over the link to edit it and look at the number at the end of the URL - that is the custom user profile id - remember it (it is NOT the same as the order number).

Go to your postbit template.

Add $post[fieldx] underneath $post[username] (x being the custom profile id number).

Go to your getinfo template.

Add $userinfo[fieldx] underneath $userinfo[username] (x being the custom profile id number).

Your members can now edit "Display Username" in their profile which will show up in their posts and profile. :)

bast
11-19-2002, 09:33 PM
Thanks so much!

Edit: Okay, I have another question...

If I wish to put [fieldx] in place of [username] so that only the chosen display name shows, is there a way to display [username] by default if they don't have a username for [fieldx] selected? I 'could' make the display name mandatory, but it will also take 3 years to get everyone to fill it out, AND just as long to explain to everyone why their username is not displaying...even if I make an announcement and sticky thread in each forum explaining the need to select a display name.

That way, they can have whatever name they wish, and if anyone get's confused as to who they might be, they can just click on their profile and it show their original login name.

...of course, by then it would just be easier to change everyone's username in the admin panel, lol.

Erwin
11-19-2002, 09:54 PM
You're welcome! Don't underestimate the power of custom user profiles!

Hurricane
11-19-2002, 10:33 PM
I really like this idea. I am going to play around and see what I can come up with. ;)

jluerken
01-20-2004, 12:48 PM
Hi,

I am searching the same thing for vb3 now cause this is still not a normal function.

Has anyone a hack for this or a documentation how to do this in vb3?

Thanks in advance...

jluerken
03-16-2004, 04:59 PM
Go to your getinfo template.

Add $userinfo[fieldx] underneath $userinfo[username] (x being the custom profile id number).



Whats this for a template in RC4? How is it called cause I can't find this string in several templates but there is none named getinfo

I create an extra field which is called DISPLAY NAME
The id is 5 cause its my first custom field

profilefieldid5

I went into my postbit_legacy Template and changed:

$post[username]

to

$post[field5]. I also tried $post[profilefieldid5]

but nothing works.

I want on ALL my pages the displayname to be shown.

Any idea what I am doing wrong? Please help me cause I need to implement this urgently.

Many thanks in advance...