View Full Version : Hack to display alternate text (name) for logname.
hwitten
09-01-2001, 07:05 PM
I'd like to set up my 2.0.3 vB to give the registered user an optional text field that (if not blank) is displayed wherever the logname is normally displayed.
I.e. my logname is hwitten but I'd like to display Heinz.
Hello Heinz in emails is much friendlier than Hello hwitten :-)
Anyone done it? Anyone want to do it? Can it be done (reasonably easy/reasonable cost)?
Heinz
ozone2000
09-02-2001, 11:12 AM
i too would like this hack, and i think it is done, because i think i have seen something like:
Username: <you vbb username>
Screen name: <your prefered name on the screen>
password...
... etc
can this be done, or is it already done?
Admin
09-02-2001, 11:21 AM
You can just add a custom field, and use it for the Screen Name.
If you want to use that field for the emails, you would have to change email_notify template, and replace $touser[username] with $touser[field5] but change 5 to the ID of the custom field you added.
To use this new screen name on the posts, replace $post[username] with $post[field5], and again, change the ID.
hwitten
09-02-2001, 04:40 PM
By custom field I assume you mean add a field to the user table in mySQL?
Or alternatively use one of the icq,aim,yahoo fields as a screen name field?
Thanks very much for pointing out where/what the required changes need to be made. I think I can handle that ok.
Heinz
Admin
09-02-2001, 04:47 PM
No problem. :)
You can add custom fields in your admin cp - User profile fields => Add.
hwitten
09-02-2001, 05:07 PM
You've just opened the floodgates for me.
Thank you VERY much. And thanks to the vB crew for thinking flexibility duirng design :-)
Heinz
Admin
09-02-2001, 05:38 PM
No problem. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.