View Full Version : User Display Name Hack
Foxtroter
29 Jun 2002, 12:57
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
AndyTSJ
29 Jun 2002, 15:27
Screenshots seem fairly clear to me, nice work Foxtroter
heretic
29 Jun 2002, 15:38
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
29 Jun 2002, 15:41
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
29 Jun 2002, 17:51
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
29 Jun 2002, 18:06
I will see what I can do about it
heretic
29 Jun 2002, 21:03
thanks :)
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
30 Jun 2002, 08:34
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.
if the user dont put in a display name, will it display the username instead?
Foxtroter
30 Jun 2002, 19:18
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.
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
11 Jul 2002, 15:37
So where do you actually go to change the login name not the display name?
Foxtroter
17 Jul 2002, 11:55
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
17 Jul 2002, 14:36
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
17 Jul 2002, 14:39
thats what it does
BigJohnson
17 Jul 2002, 15:18
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
17 Jul 2002, 15:57
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.forumid
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
17 Jul 2002, 16:09
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
20 Jul 2002, 16:12
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
21 Jul 2002, 07:55
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
22 Jul 2002, 22:00
Just saying everywhere wont help him...
He needs a list of the places that he hasnt covered yet...
Satan
Foxtroter
22 Jul 2002, 22:50
Yeh exactly, thanks satan
BigJohnson
26 Jul 2002, 12:05
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
29 Aug 2002, 22:04
Sounds like a great idea;)
Satan
chad777
03 Sep 2002, 00:08
I add it i get this error:
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT userfield.userid,userfield.field7,moderator.forumid
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.forumid
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
14 Sep 2002, 03:55
$forummoderators=$DB_site->query('SELECT userfield.userid,userfield.fieldX,moderator.forumid
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
23 Sep 2002, 06:57
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
23 Sep 2002, 17:48
Sweet stuff :)
Chris M
29 Sep 2002, 13:49
@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
04 Oct 2002, 21:00
I could try:)
Satan
CtrlAltDel
06 Oct 2002, 04:45
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.
I can't wait...Been dying for a public name hack for Vbulletin since I switched from UBB6 :)
Chris M
06 Oct 2002, 15:33
Ok cool:)
I look forward to it:p
Satan
Graphics
06 Oct 2002, 16:17
Looks like a sweet hack. Although, you might want to include a sensor. ;)
Chris M
06 Oct 2002, 19:49
Possibly...
Satan
Chris M
29 Oct 2002, 13:48
So DraX...Any news?
Satan
Foxtroter
12 Apr 2003, 04:34
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
bumping this up - this hack is really needed!!
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.