View Full Version : User Display Name Hack
Foxtroter
06-28-2002, 10:00 PM
User Display Name Hack v0.2
-Updated HTML file
User Display Name Hack v0.1
-Release
Hello this is my first hack so don't really have much to say but here it goes:
This hack will allow for a user to enter their display name to use in the forum instead of the default username. It requires a display name profile field to be created, if there is not a display name field then nothing will be displayed. This hack fixes it so that the normal Username display is replaced withthe new userdisplay field name all over the forum. This has been tested and it works. I will only offer support in the vbulletin.org hacking forum for this hack. Teh amount for support I can provide is limited as I have a very busy schedule right now and just put this hack together.
If you see another place that the userdisplayname should be used just post it here and I will see if I can add it in sometime.
I think that is basically it.
If you could all test it out for me and tell me if it works for you then that would be a great help
Screenshots
My username for my board is Foxtroter but with the display name hack it shows ->SOF<-Foxtroter-|CSN|- as shown below
Welcome panel on forumhome
http://cybersportsnet.net/images/dnhack/welcome.gif
Whos Online
http://www.cybersportsnet.net/images/dnhack/online.gif
Last Post
http://www.cybersportsnet.net/images/dnhack/lastpost.gif
Thread Starter
http://www.cybersportsnet.net/images/dnhack/threadstarter.gif
Currently Active Users:
http://www.cybersportsnet.net/images/dnhack/currentlyactive.gif
Thanks,
Foxtroter
Kinox
06-29-2002, 11:07 AM
demo would be nice...
AndyTSJ
06-29-2002, 01:27 PM
Screenshots seem fairly clear to me, nice work Foxtroter
heretic
06-29-2002, 01:38 PM
I'd like to have the ability to have the 2nd name in specific forums, maybe an option to turn it on in off per forum?
Foxtroter
06-29-2002, 01:41 PM
Originally posted by heretic
I'd like to have the ability to have the 2nd name in specific forums, maybe an option to turn it on in off per forum?
do you mean like the admin to have the ability to turn it on and off?
heretic
06-29-2002, 03:51 PM
yeah, but per forum.
I need to have members have 2 names, one for the regular board and another for a couple forums on it
Foxtroter
06-29-2002, 04:06 PM
I will see what I can do about it
heretic
06-29-2002, 07:03 PM
thanks :)
Velocd
06-30-2002, 05:26 AM
Sounds i n t e r e s t i n g ;)
Although I'm not seeing why you just didn't rename your username to "->SOF<-Foxtroter-|CSN|- ", but all is good 'n well.
Foxtroter
06-30-2002, 06:34 AM
well for two reasons. one beign that it is running side by side with a windows box for a website for a clan. They log in with their username with has no clan tags the ->SOF<- when they register for that site they automatically recieve their username as they registered for the site on the windows box with is a simple name with no tags. After the site opens and all our members transfer then it just wouldn't the practical thing to do. Plus with members moving and with them having guilds which adds an entire extra factor to their name i.e. the -|CSN|- on my name.
alanvo
06-30-2002, 05:11 PM
if the user dont put in a display name, will it display the username instead?
Foxtroter
06-30-2002, 05:18 PM
what you do is you make the display name field a required field... and yes if they don't put anything in it then it doesn't display anything. this is just a beta hack and has a lot to work on. I will try to work on hte admin part of the deal when i can but im not sure that i can. i just did this to help out those who needed it as i saw it requested in the requests forum.
Velocd
06-30-2002, 07:09 PM
Originally posted by Foxtroter
well for two reasons. one beign that it is running side by side with a windows box for a website for a clan. They log in with their username with has no clan tags the ->SOF<- when they register for that site they automatically recieve their username as they registered for the site on the windows box with is a simple name with no tags. After the site opens and all our members transfer then it just wouldn't the practical thing to do. Plus with members moving and with them having guilds which adds an entire extra factor to their name i.e. the -|CSN|- on my name.
I see it now. This would defiantly make a great addition then for any clan forums :D
BigJohnson
07-11-2002, 01:37 PM
So where do you actually go to change the login name not the display name?
Foxtroter
07-17-2002, 09:55 AM
Originally posted by BigJohnson
So where do you actually go to change the login name not the display name?
to change the login name just goto the admin panel and do so --- this hack is just for display name u do not use it as a name to log in with. also sorry for lack of development with this hack im fighting time and its not looking to god :(
BigJohnson
07-17-2002, 12:36 PM
O. Because I was looking for a hack like when you register you have a display name and a login name. And then you use your login name to login and the display name for everyone to see on the board.
Foxtroter
07-17-2002, 12:39 PM
thats what it does
BigJohnson
07-17-2002, 01:18 PM
Does it allow you to do it when you register?
Like add your display name there also? Like for an option if you want to use it.
BigJohnson
07-17-2002, 01:57 PM
I get this error after installing it. Do you no why. I dont no what to do and i wanted this hack so badly.
Database error in vBulletin 2.2.5:
Invalid SQL: SELECT userfield.userid,userfield.field9,moderator.forumi d
FROM moderator
LEFT JOIN userfield
ON (moderator.userid=userfield.userid)
ORDER BY user.field9
mysql error: Unknown table 'user' in order clause
mysql error number: 1109
BigJohnson
07-17-2002, 02:09 PM
I installed it and i see that it works perfectly now. I fixed it. But How can I make it so it shows my display name everywhere. I mean EVERYWHERE. I dont want the login name being shown for my showthread and stuff. How would i go ahead for doing something like this? Please help.
Foxtroter
07-20-2002, 02:12 PM
could u tell me how ya fixed, and also could ya give me a list of everywhere you want it to be displayed in a PM to me? Ill see what i can do
BigJohnson
07-21-2002, 05:55 AM
Well I mean everywhere. AS IN EVERYWHERE. I just want the display name to be displayed and the login name to be the login. I dont want the login showing up anywhere on the forums at all for other members to see.
Chris M
07-22-2002, 08:00 PM
Just saying everywhere wont help him...
He needs a list of the places that he hasnt covered yet...
Satan
Foxtroter
07-22-2002, 08:50 PM
Yeh exactly, thanks satan
BigJohnson
07-26-2002, 10:05 AM
Like the showthread. even in the Last Post column on the forum home. Everywhere you see the persons name show up can it be changed.
I was thinking wouldnt it be easier if the names on all part of the board were the display name? And you just change the login name to make it a log in name. I think that would be easier. What do you think.
Chris M
08-29-2002, 08:04 PM
Sounds like a great idea;)
Satan
chad777
09-02-2002, 10:08 PM
I add it i get this error:
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT userfield.userid,userfield.field7,moderator.forumi d
FROM moderator
LEFT JOIN userfield
ON (moderator.userid=userfield.userid)
ORDER BY user.field7
mysql error: Unknown table 'user' in order clause
mysql error number: 1109
When I try to add:
$mod = array();
$forummoderators=$DB_site->query('SELECT userfield.userid,userfield.fieldX,moderator.forumi d
FROM moderator
LEFT JOIN userfield
ON (moderator.userid=userfield.userid)
ORDER BY user.fieldX');
while ($moderator=$DB_site->fetch_array($forummoderators)) {
$imodcache["$moderator[forumid]"][] = $moderator;
$mod["$moderator[userid]"] = 1;
}
and on the forum home where it says posted by: username
It now only says "by"
and in the whos online box it has 2 of me
one with no name and one with display name
:(
I hope I added this right i know I followed th direction good except what I posted above
Also is there a way to make the display name show up for the following?
1. in profile
2. private messages (regular private message and the private message box at the buttom of forum home)
3. in number of active users today
4. for thread starter
5. in messages posted
That is all i can see as of now, but i would like the display name to be everywhere the login name usally is on the forum.
This way on the user knows there login and everyone else thinks the display name is the login ?
Thanks and btw nice hack
Foxtroter
09-14-2002, 01:55 AM
$forummoderators=$DB_site->query('SELECT userfield.userid,userfield.fieldX,moderator.forumi d
change fieldX to your username display field
These is a pretty good idea... one I already had and started working on... LOL.
I've already ensured that in mine, the DisplayedName is not required.... working just like the Displayed Name in UBB.
When I put out the hack, feel free to take a look at the code and see how I did it.
My Hack actually makes a new field in the USER table of the database... allowing me to, with some template modification, put the Displayed Name field EXACTLY where it is in UBB on the Profile/Options pages. You might want to try that.
blackice912
09-23-2002, 04:57 AM
Seems like a neat script...
For the problem about nothing displaying if the field is empty....
Couldn't you just do something like if $fieldID = NULL then display the username?
Also:
What about the problem of two people choosing the same display name? I'm guessing right now two people can choose the same display name...
Actually, stay tuned for my version.... I've added a new field to the user table, allowing me to add a new index and perform a check against other users having the same Displayed Name.
BTW, if anyone gets any ideas...
1] I'm not trying to discredit the work being done on this particular hack.
2] I needed this for my own forums, and started writing it before I saw this one
3] I am using all MY original code.
blackice912
09-23-2002, 03:48 PM
Sweet stuff :)
Chris M
09-29-2002, 11:49 AM
@DraX - I would love to see this:)
I would write my own, but I dont have the time:) (And I am too lazy:p)
Satan
Yeah, i'm still working on it... I'm having some trouble in the search engine, and noone seems to want to help me out.
Chris M
10-04-2002, 07:00 PM
I could try:)
Satan
CtrlAltDel
10-06-2002, 02:45 AM
heh, i think its great you all are doing all this work, keep it up. i just think that something this simple shoulda been included in the base product *shrugs*
I definately agree on that one
BTW, hellsatan, I'll send you the hack as soon as I've got everything else worked out, and then you could see about the search engine stuff. I appreciate it.
And obviously, I'm not trying to use this thread to steal Foxtroter's fire. I think he did a great job with the beginnings of this hack, and in my readme I've giving him credit even though I'm not using any of his code.
johnr
10-06-2002, 09:33 AM
I can't wait...Been dying for a public name hack for Vbulletin since I switched from UBB6 :)
rishel
10-06-2002, 12:26 PM
.
Chris M
10-06-2002, 01:33 PM
Ok cool:)
I look forward to it:p
Satan
Graphics
10-06-2002, 02:17 PM
Looks like a sweet hack. Although, you might want to include a sensor. ;)
Chris M
10-06-2002, 05:49 PM
Possibly...
Satan
Chris M
10-29-2002, 11:48 AM
So DraX...Any news?
Satan
Foxtroter
04-12-2003, 02:34 AM
sorry guys about lack of updates and DraX no worries and i hope to look forward to your hack, mine kinda just lost it's fire on its own because of my lack of attention to it.
also sorry for bumping this old post up
sidman
11-10-2008, 10:01 AM
bumping this up - this hack is really needed!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.