PDA

View Full Version : Change Username via UserCP v2.0


Scott MacVicar
06 Aug 2001, 13:40
This hack has been completely rewritten, i recommend that you simply uninstall this hack and install the new version. If you don't want to do that then this is what has changed.

Table structure of namelogs, drop and readd from install file and all the coding within member.php has changed. There has been NO template changes or changes in the admin panel.

This was written in 2.2.6 and worked fine with no problems.

Scott

smithy256
06 Aug 2001, 14:15
thanks for this cool hack

Dakota
07 Aug 2001, 02:38
Thanks, I requested this hack a while back, but no one was willing to make it.

Great job. :D

VirtueTech
07 Aug 2001, 02:49
First off....great job. This was needed.

I think it would be best if you could set a rule...so that users could only change their usernames once a month themselves...otherwise...on my boards for example...a user could change their name...to spam a user or flame a user...then go back and say it wasn't them much easier then re-registering a new account.

Also...a question for all of you. Do you think we should allow the users to change their username at will like this...or are we only asking for trouble?

Dakota
07 Aug 2001, 03:19
Well even if they changed their name to flame somebody, when they changed it back, the name would change on the flame post as well as every other post the user has made.

This hack is just saving me alot of trouble because I have a forum that is for a Quake3 total conversion based on Dragonball Z, and alot of the time when someone registers they use a name that relates to the show, but then later on they grow tired of that name and want to use a more original name that they may use every where else or something like that.

VirtueTech
07 Aug 2001, 03:37
Originally posted by Dakota
Well even if they changed their name to flame somebody, when they changed it back, the name would change on the flame post as well as every other post the user has made.

DOH! Your right. Good point. :)

Lordmusic
07 Aug 2001, 05:47
Is there a way to add a once a month or week, or whatever name change limit? That would be great before I install this.

eva2000
07 Aug 2001, 06:16
Originally posted by VirtueTech
First off....great job. This was needed.

I think it would be best if you could set a rule...so that users could only change their usernames once a month themselves...otherwise...on my boards for example...a user could change their name...to spam a user or flame a user...then go back and say it wasn't them much easier then re-registering a new account.

Also...a question for all of you. Do you think we should allow the users to change their username at will like this...or are we only asking for trouble? although i get a few requests for username changes, i wouldn't use such a hack.. allowing members to change their usernames would and can interfere with building a tighter knit community group of users on my forums ... members are use to particular usernames and well it wouldn't be the same

then you might also have those who like to imitate with similar spelt usernames i.e. how about VirtueTechi :)

VirtueTech
07 Aug 2001, 06:17
also good points...

PPN - Please keep in mind these comments have nothing to do personally with your hack. You did a fantastic job. :)

Lordmusic
07 Aug 2001, 15:12
How about adding a log of what people have changed their names. Say the limit is 5, and after 5 name changes the first is deleted, that way not much space is used. That way it keeps track of the last 5 months of name changes (if you add the once a month limit) and your set.

Dakota
07 Aug 2001, 18:50
Ok, I have found a bug. Users who do not have the required number of posts have not been able to change their profile since I updated to the version where you added it. It works fine for me, but it seems that everyone who is having trouble has less than the required number of posts.

Scott MacVicar
07 Aug 2001, 19:45
Ok change
if ($username != $bbuserinfo[username]) {
to
if ($username != $bbuserinfo[username] && isset($username)) {

updated install file

Delhaze
07 Aug 2001, 22:08
I would like to see it working like this.

The user has a button to request a change in their control panel, at this stage it doesn't allow them to change it, just request a future change.

When they hit the button they are told a request has been sent to the admin/mod and they should continue to use there current username, and wait for confirmation that the request has been authorised.

The admin would have to allow/moderate the request, at which point the user is informed by PM/mail etc that they can now change it.

Now the users control panel actually lets him change it, and any cookie would be updated etc.

This would be all controlled by a global "allow password change requests" in the admin control panel, and could be set to no, the way I have desribed, or always like this hack.

This is not a simple hack, but would be a nice feature to be added to VB in a future release.

Dakota
08 Aug 2001, 05:06
Thanks, that fixed it. Now if only you could get the limiting the number of times a user is allowed to change their name, it would make it much better. But great job. I have not found any other bugs, and I doubt there are since it is a fairly small hack.

Franky
10 Aug 2001, 08:31
Sounds like a great hack, one I would install.

I think it definitely needs either 1. or 2. below and possibly 3.

1. A log of username changes (maybe by user number).
2. Admin moderation of username changes.
3. A limit to the number of changes (per year maybe)

If it had either 1. or 2. I would definitely install it :D

Scott MacVicar
10 Aug 2001, 10:25
1 is done and 3 is being tested.

Franky
10 Aug 2001, 11:18
Uhm how do you view the log please?

J_PC
10 Aug 2001, 11:22
Thanks buddy

Scott MacVicar
10 Aug 2001, 15:47
posted updated file with
name loggin and limits so an admin can set they can only change once every defined number of days.

Franky
10 Aug 2001, 17:44
I now get when submitting the form:

Warning: Argument to array_reverse() should be an array in D:\inetpub\wwwroot\forums\member.php on line 388

And no previous usernames show up. Keep up good work :D

Scott MacVicar
10 Aug 2001, 18:27
What version of PHP, are you running.

Just comment out the lines with array_reverse

it just means that newer nicknames are at bottom in profile and not top.

Franky
10 Aug 2001, 19:10
PHP 4.0.6 - MySQL 3.23.40

okay thanks it seems to work fine with that line edited out.

Pie'oh'pah
11 Aug 2001, 16:38
*thumbs up*

Great hack dude, I was lookin 4 it quite some time. I'm running a Gaming-Clanboard and from time to time, users change their clans or leaving them, so a change would be necessary.
Finally, they can do it on their own! Big Thanx again.

If you'd do me a favor by telling me, where to set the values for the period, users are not permitted to change their name, i'd be eternally grateful :D

-Alex

Scott MacVicar
11 Aug 2001, 17:03
Look in control panel in options under User and Registration Options

it should be the bottom one in that group.

Pie'oh'pah
11 Aug 2001, 17:53
D'oh :D

Thanx man. Great.

Franky
11 Aug 2001, 22:18
I have found a bug. I changed my username as a test, and now in every single user's profile, it lists their previous name as mine.

My profile: http://www.mpz.co.uk/forums/member.php?s=&action=getinfo&userid=119

See any other userid and they are all the same.

Scott MacVicar
11 Aug 2001, 23:35
3 people downloaded it before i uploaded a fixed version

open member.php and go down to line 1227

if ($oldnames=$DB_site->query_first("SELECT usernames FROM namelogs WHERE userid='$userinfo[userid]'")) {

is what it should be

i had $bbuserinfo[userid] its $userinfo[userid]

Enny
13 Aug 2001, 14:48
Great Hack!!!!

Please, can add these hack in the next vB release, with admin option to enable/disable username-change !?

Franky
13 Aug 2001, 17:46
**** wrong thread sorry :p

Pie'oh'pah
13 Aug 2001, 17:51
Am I missing something here? It's completely in the wrong ...... THREAD i suppose :D

May be thats meant to be for the Usenet hack?

-Alex

Dakota
13 Aug 2001, 21:23
umm...that file seems to be the same as the last for me. I don't see anything about the log, or the number of times a user can change their name.

Franky
13 Aug 2001, 21:37
There is no log, just in the user's profile the user's previous names are displayed.

Scott MacVicar
13 Aug 2001, 22:09
i never realised you ran a site bout ntl :)

i got my cable installed but they moaned about line quality and some technician broke somethin :/

so i'm stuck on ntlworld

Dakota
14 Aug 2001, 00:20
well...still when I download the attachment I get the old version. There is nothing in it that adds the previous names to a profile, or how long before a user can change their name again.

Franky
17 Aug 2001, 14:30
A possible bug. A user changes their name, and in their profile under previous usernames, it shows the username they have just changed to, not the old username.

Dakota
17 Aug 2001, 16:28
I have also noticed that.

Pie'oh'pah
17 Aug 2001, 17:15
Originally posted by Dakota
well...still when I download the attachment I get the old version. There is nothing in it that adds the previous names to a profile, or how long before a user can change their name again.

Maybe a cache prob? Try this.

Scott MacVicar
17 Aug 2001, 22:27
change
array_splice($oldnames,4,4, addslashes($username));
to
array_splice($oldnames,4,4, addslashes($bbuserinfo[username]));

AND

array_push($oldnames,addslashes($username));
to
array_push($oldnames,addslashes($bbuserinfo[username]));

AND

$DB_site->query("INSERT INTO namelogs (userid, usernames,lastchange) VALUES ('$bbuserinfo[userid]','".addslashes(htmlspecialchars($username))."', '".time()."')");
to
$DB_site->query("INSERT INTO namelogs (userid, usernames,lastchange) VALUES ('$bbuserinfo[userid]','".addslashes(htmlspecialchars($bbuserinfo[username]))."', '".time()."')");
will modify original now.

Franky
17 Aug 2001, 22:50
Okay excellent job PPN, all works perfectly now :D

Scott MacVicar
18 Aug 2001, 00:48
know why ntl wasn't workin last night :P

it stopped workin mid evening for a couple of hours.

Franky
18 Aug 2001, 01:35
Probably because it's ntl :D Try having a look here (http://www.frankw.net/network/nthellworld/vbb/forumdisplay.php?s=&forumid=14).

Thomas P
18 Aug 2001, 10:27
Hi PPN,

veeery useful hack!! https://www.vbulletin.org/forum/

Something that vB is really missing,
Thanks man,
-Tom

Sneakz
18 Aug 2001, 15:07
Thanks, usefull hack.. needed one like this :D

Mike D One
19 Aug 2001, 14:16
great hack :)
How do you add a table to the Database ?

thankyou

Mike D

Franky
19 Aug 2001, 14:34
With phpMyAdmin

http://www.phpwizard.net/projects/phpMyAdmin/

Mike D One
19 Aug 2001, 15:17
any other way to do it ?
there must be a easyer way !!

Franky
19 Aug 2001, 16:13
well if you read the instructions, it tells you. phpMyAdmin IS the easiest way, otherwise you can use the cmd line mysql monitor.

Pie'oh'pah
28 Aug 2001, 13:51
I hate to bring this up, but i've encountered a problem after all:

Some users keep getting the message:

Username already exist, please go back and try again

when they simply modify their profile in any kind, say date of birth.

Anyone else got this problem? And more important: how to fix?

-Alex

Dakota
28 Aug 2001, 15:56
I have had afew users report that to me.

Scott MacVicar
28 Aug 2001, 20:13
make sure the code in line 352 of member.php has

if ($username != $bbuserinfo[username] && isset($username)) {

at the top if not download the hack again and re apply, else it could be the characters within the persons username, can you show me one of the usernames of people who were trying to change their profile.

Pie'oh'pah
29 Aug 2001, 13:40
Yes mate the line is applied.

Usernames are mostly like this:

[NĐE]-=Pie'oh'pah=-

and this one is working perfectly, even with the ' in it.

It only happens to a few poeple. [LoC]Racoon for example

-Alex

Writers Blockk
03 Sep 2001, 19:36
I'm not sure how to do the beginning part:

The first thing you got to do is run these two sql queries which will create variables for use, either via phpMyAdmin

INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES ('', '6', 'Posts to change username', 'postuserchange', '50', 'Number of posts required for the user to change their own username within the user control panel. If you wish anyone to be able to change username set to 0.', '', '18')

INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES ('', '6', 'Days between user change', 'dayuserchange', '7', 'Number of days between each time a user is allowed to change their nickname. If you wish the user to be able to change username at any time set to 0.', '', '19')

OR

go to www.yourdomain.com/forums/admin/setting.php?action=add
Setting Category: User and registration options
Title: Posts to change username
Variable Name: postuserchange
Value: 50
Description: Number of posts required for the user to change their own username within the user control panel. If you wish anyone to be able to change username set to 0.
Code to generate option: LEAVE THIS BLANK
Display Order: 18

Setting Category: User and registration options
Title: Days between user change
Variable Name: dayuserchange
Value: 7
Description: Number of days between each time a user is allowed to change their nickname. If you wish the user to be able to change username at any time set to 0.
Code to generate option: LEAVE THIS BLANK
Display Order: 18

Adding a table to your forums database

I saw that in my phpadmincenter but I had no idea how to change it or what, I didn't see any add or edit button. It's a bunch of stuff I'm not sure to do, that's the only part I'm not sure what to do on. Can someone help me?

Pie'oh'pah
04 Sep 2001, 00:53
You need to have phpMyAdmin installed.

If you do, you go to your database by clicking it's name on the left.

You'll see it's tables listed and right under it, there's a textfield named

Run SQL query/queries on database 'database name'

This is the field where you drop the text (querries)

INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES ('', '6', 'Posts to change username', 'postuserchange', '50', 'Number of posts required for the user to change their own username within the user control panel. If you wish anyone to be able to change username set to 0.', '', '18')

INSERT INTO setting (settingid, settinggroupid, title, varname, value, description, optioncode, displayorder) VALUES ('', '6', 'Days between user change', 'dayuserchange', '7', 'Number of days between each time a user is allowed to change their nickname. If you wish the user to be able to change username at any time set to 0.', '', '19')

and run them by pressing GO

You can run both INSERT's mentioned at the same time, or one after another.

However, since you are obviously not familiar with phpMyAdmin, make sure you backup your database before messing with it!

-Alex

Writers Blockk
04 Sep 2001, 21:51
Ok I see that now, I just put that stuff in that big box then hit go?

Well in that box it says this before I did anything:

SELECT * FROM setting WHERE 1


That was already in there, do I remove that then add that stuff and hit go?

Also how do I back up my database? lol

Sorry, fairly new at this heh.

Thanks

Pie'oh'pah
04 Sep 2001, 23:23
No problem :)

Yes, just remove that line

afterwards run those querries mentioned above.

The backup is done either via the adminCP of you vBulletin or the phpMyAdmin tool.

Using phpMyAdmin, you need to dump (thats the term for backing up) the database, by selecting Structure and Data and Send.

You may select Add drop tables, too. This tells it, to drop existing tables before restoring your database from the backup. It prevents the Table already exists error.

When you checked all the boxes I suggested, press GO and you should be getting a dialog on where to store the file on your local PC.

Depending on the size of you database, the connection and the speed of Server, the proceedure may take some minutes.

hth

-alex

Writers Blockk
04 Sep 2001, 23:48
Ok I'm pretty sure thats finished lol.

I'm now not sure about this part :(

Adding a table to your forums database
---------------------------------------
Now you will need to create this table for logging of the username and last time they updated.

CREATE TABLE namelogs (userid INT (5) not null , usernames LONGTEXT not null , lastchange INT (12) not null )

Adding New Templates

Am I still in the the phpadmincenter for this? If so I see nothing about create new table, I see rename to: and Copy table to:

Then I see table maintenance and table comments.

I'm confused lol

Writers Blockk
05 Sep 2001, 00:22
Now I get an erroer when people try to register and when I tried to access the edit options and change profile and change password all in user control panel. It says

Parse error: parse error in /home/ashleigh/public_html/forum/member.php on line 1337

Hmmmph

Pie'oh'pah
05 Sep 2001, 13:59
Hey,

sorry i havent said this, yes

CREATE TABLE namelogs (userid INT (5) not null , usernames LONGTEXT not null , lastchange INT (12) not null )

is to run with phpMyAdmin, too. Just paste this and hit GO
This is the last you need to do within phpMyAdmin.

Regarding the parse error you get, thats probably because the hack is not yet completely done.

As for the next step, adding templates, this is to be done in your adminCP

After you created those templates, the last step is to edit the necessary php-files.

I recommend making a copy of the orignals as well.
Just in case you haven't got a good editor, I would also recommend UltraEdit

Ok, hope this is it :)

-Alex

Writers Blockk
05 Sep 2001, 16:20
I did everything and the only wrong still is the pasre error, I redid it and everything

Scott MacVicar
05 Sep 2001, 17:33
paste the contents of member.php

1330 to 1340 please

I'm thinking you have pasted some code in at the wrong point.

DarkReaper
14 Sep 2001, 20:38
Problem:

I just tested it by changing my username twice. The first time worked fine, and showed my old one in my user profile. But when I changed it again, "Previous usernames: " was blank. Any ideas?

btw...the field that holds the previous usernames in the MySQL DB is empty.

VirtueTech
02 Oct 2001, 03:25
Pie'oh'pah - I had the same problem. I found that in the instructions the edit said to edit this:

//Make sure user didn't try to bypass the maxchars for the fields
$$varname=substr($$varname,0,$profilefield[maxlength]);
$userfields.=",$varname='".addslashes(htmlspecialchars($$varname))."'";
}


Well...my version 2.0.3 ...didn't have the ending " } " in that code above...it was further down the page. I found it and added the necessary code after it and that fixed my problem.

Try that. I hope this helps. :)

DarkReaper
14 Oct 2001, 04:37
Originally posted by DarkReaper
Problem:

I just tested it by changing my username twice. The first time worked fine, and showed my old one in my user profile. But when I changed it again, "Previous usernames: " was blank. Any ideas?

btw...the field that holds the previous usernames in the MySQL DB is empty.

...

DarkReaper
30 Oct 2001, 23:11
Help... :)

J. Hung
30 Oct 2001, 23:13
Just what I was looking for!

Kumaro
31 Oct 2001, 00:50
Along the installation, it asks me to Creat A Table CREATE TABLE namelogs (userid INT (5) not null , usernames LONGTEXT not null , lastchange INT (12) not null )

How do i do this?

VirtueTech
31 Oct 2001, 05:22
I must say there are some bugs here:

Signatures don't seem to carry over. I'm not sure if it is just my site though.
I think it is case sensitive on the check to see if the username exists already.

MrLister
31 Oct 2001, 15:05
although this hack seems really good... i just htink it's a bit too much power for the users.. just switiching one between another as they feel like it, is a bit too much for me..

VirtueTech
31 Oct 2001, 15:26
The nice thing about it is the allowance of mandatory time intervals between username changes.

MrLister
31 Oct 2001, 15:40
oh didn't know that... i think i'll install it then and set a 30 day period inbetween. thx for telling me

Scott MacVicar
31 Oct 2001, 16:02
Its been so long since i last looked at these so bare with me.

The last time i checked the usernames are not case sensetive, so the username ppn and PPN are the same people. The check is also not case sensetive.

Signatures are stored in the user table, all it does is rename the username for that id to another username.

DarkReaper
31 Oct 2001, 21:15
I'm having problems with it. As I said before, it tracks the first name change just fine, but after that the table is empty.

Scott MacVicar
31 Oct 2001, 21:26
I suppose i'll re-write the logging code. I'm sure that i've done something wrong there :P

Matt
04 Nov 2001, 20:43
Sorry, just to verify, if I install this will it work? *lol*

I am confused :(

Scott MacVicar
04 Nov 2001, 20:45
yes everything works apart from name logging which i have yet to get around to fiddling with.

Matt
04 Nov 2001, 21:27
Thanks, so far its working great :) :)

Syphin
05 Nov 2001, 03:10
Ok, I installed this a while back... But now how do i change it where they can change there names at any time?

Im kinda confused now... lol


-Syphin

Syphin
05 Nov 2001, 05:25
Anyone?? >_<

Scott MacVicar
05 Nov 2001, 07:10
In the admin cpanel under User and Registration Options

DarkReaper
06 Nov 2001, 21:57
Have you fixed name logging yet?

Matt
08 Nov 2001, 14:51
Anyway of stopping banned users with over the amount of posts from changing their name?

Scott MacVicar
08 Nov 2001, 15:27
I haven't really had time to do more work on name logging, as far as i knew banned users shouldn't be even able to view the board never mind change their username.

Will do work on name logging tonight after working on my backend a bit more.

heretic
08 Nov 2001, 21:33
excellent hack!

|DarkManX|
23 Nov 2001, 16:13
getting this error....

Parse error: parse error in /home/***/public_html/tof/member.php on line 1467

|DarkManX|
23 Nov 2001, 16:50
ok i got it

what i did was instead of pasting this

if ($bbuserinfo[posts] >= $postuserchange) {
$oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"));
$diff = time() - $oldnames[lastchange];
$limit = (86400 * $dayuserchange);
if ($diff > $limit) {
eval("\$changeuser = \"".gettemplate("changeuser")."\";");
}
}


i pasted this

if ($bbuserinfo[posts] >= $postuserchange) {
$oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"));
$diff = time() - $oldnames[lastchange];
$limit = (86400 * $dayuserchange);
if ($diff > $limit) {
eval("\$changeuser = \"".gettemplate("changeuser")."\";");


:rolleyes: dumb mistake on my part......great hack PPN :)

Syphin
27 Nov 2001, 03:08
I keep getting this error when i change user names:

Warning: Argument to array_reverse() should be an array in /***/***/***/***/***/***/***/member.php on line 459


And this is whats on that line:

$DB_site->query("UPDATE user SET username='".addslashes(htmlspecialchars($username))."' WHERE userid='$bbuserinfo[userid]'");
if ($oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"))) {
$oldnames = array_reverse($oldnames);
$oldnames = explode("<~>", $oldnames[usernames]);
if (count($oldnames) >= 5) {
$oldestuser = array_shift($oldnames);
array_splice($oldnames,4,4, addslashes($bbuserinfo[username]));
}
else {
array_push($oldnames,addslashes($bbuserinfo[username]));
}
$oldusers = implode($oldnames, "<~>");
$oldusers = array_reverse($oldusers); <<**>> LINE 459 <<**>>
$DB_site->query("UPDATE namelogs SET usernames='".addslashes($oldusers)."',lastchange='".time()."' WHERE userid='$bbuserinfo[userid]'");
}
else {
$DB_site->query("INSERT INTO namelogs (userid, usernames,lastchange) VALUES ('$bbuserinfo[userid]','".addslashes(htmlspecialchars($bbuserinfo[username]))."', '".time()."')");
}
$bbuserinfo[username] = $username;
}
}


Any Ideas? =/


-Syphin

Scott MacVicar
27 Nov 2001, 18:26
hmm documentation wrong?
$oldnames = array_reverse($oldnames);
$oldnames = explode("<~>", $oldnames[usernames]);

these lines are the wrong way round, should be

$oldnames = explode("<~>", $oldnames[usernames]);
$oldnames = array_reverse($oldnames);

Syphin
29 Nov 2001, 17:14
thnx... =)

I have no clue how i messed that up tho.. lol it also said implode instead of explode... >_< oh wel, all is good now.. thnx.. :p


*and sry for the late reply*

-Syphin

DarkReaper
09 Dec 2001, 03:48
Name...logging? :(

Shadowz
09 Dec 2001, 16:21
Great Hack!!!

I was wondering can I just offer this feature to just a certaint user group?

DarkReaper
31 Dec 2001, 06:34
I fixed it all up. Everything works now - name logging, and the original goal of this hack. The problem was that it didn't change the username everywhere it was needed. Things such as the lastposter store the username, not the userid, so that didn't change.

I've tested it on my current vB running 2.2.1 and it works perfectly. File attached.

Scott MacVicar
01 Jan 2002, 21:22
thanks Darkreaper
i'll update the attachment on the first post.

Dakota
15 Jan 2002, 23:47
When I try to change names, it says the name is already in use, but I know its not. anyone know how to fix this?

Shenlong
19 Jan 2002, 20:34
hey can u make an install file for the mySQL tables plz?

haas
02 Feb 2002, 06:38
Hey great, just downloaded!

Im gonna test it on my local board.

neal
09 Feb 2002, 03:40
Bug for ya:

Whenever I use a username with - at the end, it says the username is already in use, even though it isn't, and won't let you change to it.

Soma
15 Feb 2002, 16:07
thanx man w00tit00t

neal
22 Feb 2002, 03:35
Originally posted by neal
Bug for ya:

Whenever I use a username with - at the end, it says the username is already in use, even though it isn't, and won't let you change to it.

amity
13 Mar 2002, 18:31
ok, i am sorry to be clueless, but i followed the instructions perfectly and i don't see these new fields anywhere... i am looking around to find the coppa info and the parent e mail info, thinking it would be in the general vacinity and i can't find that either. hee hee.

someone help me out?
always,
amity

syion
22 Mar 2002, 18:07
Will this hack work on my board ?

Thanks

abc
28 Mar 2002, 02:31
I'm having trouble with the name logging component of this hack. It works fine as long as a user only changes their name once, but upon the second name change all records of previous names are wiped out. This was true in the initial hack instructions as well as in the most recent update.

any clues?

CeleronXL
31 Mar 2002, 00:50
Does this work on 2.2.4? I'd really like to use this if it does to keep those people who keep signing up with new names when they get bored of their old ones from doing that.

Webmasta XT
04 Apr 2002, 10:14
sorry but it stopped working.. i installed vb pad and rating hack and now it yust doesnt show up anymore ( username change thing)

help??

*edit* i attached my member.php file *edit*

bart
07 Apr 2002, 14:43
Great hack, thanks.

But look out when you have hacked register.php to not allow certain characters in a name.

After this:

$username = trim($username);
$username = eregi_replace("( ){2,}", " ", $username);


I added this:

if (!eregi("^[_a-z0-9-]+([_a-z0-9-]+)*$", $username)) {
eval("standarderror(\"".gettemplate("error_usernamespecialchars")."\");");
exit;
}

Webdude™
12 Apr 2002, 00:45
I installed this hack, now sigs dont show. How do I fix that?

Zachariah
12 Apr 2002, 23:18
nice hack , and it does work.

Q: what did i do wrong ? I have 2 of the settings in the options area.

Wildthinks
28 Apr 2002, 20:44
Hi,

nice hack. I have installed on my 2.2.5 , but I don't see the List of old nciks (show nothing) and the second is, that the names are not updatetd in the forum home, but in the threadview is it ok.
What can I do, that the display be correct?

N9ne
09 May 2002, 20:44
May I request a reviewed version for 2.2.5/2.2.6? I have seen many replies with bug reports on 2.2.5 and I have also experienced problems because of the version difference. It's a VERY useful hack and a MUST HAVE for me :) But I really need an updated version for great functionality :)

HughJorgen
10 May 2002, 02:26
Have the array error, as well as the change appearing in some places and not others, as well as the old names not appearing in the list if you change the name back to the original...

other than that it's a neat hack.. it definitely does what it says it does... thanx PPN

HughJorgen
10 May 2002, 14:15
Also, it was real tough trying to find all the line coordinates in your instructions (eg go to line 1255) since I use Pico. (Yes I am a n00b) Can anyone recommend a good .php editor that shows line position et al?

N9ne
10 May 2002, 23:03
BUMP!

PPN PLEASE READ and update this hack please :) I really want this hack to work perfectly :)

Webmasta XT
11 May 2002, 17:11
it stops working after some time... ive installed it, and a week later it stopped showing?

N9ne
11 May 2002, 23:00
I didn't have that happen, but the problem I have with my 2.2.5 is when I change my username, an error will appear at the top of the page however the username will change. It doesn't update the username around the forum either. In the profiles, their previous usernames are also not listed.

N9ne
21 May 2002, 20:39
PLEASE SOMEBODY? I'm having to bump up a lot of topics on this forum now, and none get answered :(

N9ne
22 May 2002, 21:14
This is unbelieveable, I've had to bump this topic up about 4 times now.

Lucrecia
23 May 2002, 01:37
I'm new at this. Where in your instructions it says to do this

Adding a table to your forums database
---------------------------------------
Now you will need to create this table for logging of the username and last time they updated.

CREATE TABLE namelogs (userid INT (5) not null , usernames LONGTEXT not null , lastchange INT (12) not null )

1) What do you I put in for The name and field of where it says this in my phpmyadmin (Create new table on database )

2) Also there is a screen that comes after and has options:

Field, Type, Length/Values*, Attributes, Null, Default, Extra, Primary Index Unique Fulltext

Table comments : Table type :

What do I put in for these options? Thanks in advance.

Scott MacVicar
23 May 2002, 11:40
I'm gonna rewrite this hack as soon as i get time, its mainly the checking in member.php that needs to be done.

Scott MacVicar
23 May 2002, 12:40
ok its rewritten and tested
just modification to the code in member.php and you'll need to drop the namelogs table and recreate it.

Will post it in the first post in a few moments.

Lucrecia
23 May 2002, 18:04
Thanks PPN

mashby
28 Jun 2002, 12:20
I'm anxious to install this hack on my new board, but I've ran into a small snag. I could be doing something wrong, so I hope someone here can help. :)

When I paste in the SQL queries into phpMyAdmin, I'm getting errors. For example, when I paste in CREATE TABLE 'namelogs' (
'userid' int(5) NOT NULL default '0',
'username' longtext NOT NULL,
'time' int(12) NOT NULL default '0'
) TYPE=MyISAM; I get the following error from phpMyAdmin, "You have an error in your SQL syntax near '\'namelogs\' (
\'userid\' int(5) NOT NULL default \'0\',
\'username\' long' at line 1"

I'm using a text editor (EditPlus) to read the instructions and I'm pasting the info in from there. Anyone have any suggestions on what I'm doing wrong?

mashby
30 Jun 2002, 19:28
Anyone? I can't even begin the install because phpMyAdmin won't accept the queries.

Scott MacVicar
30 Jun 2002, 22:16
Its

CREATE TABLE `namelogs` (
`userid` int(5) NOT NULL default '0',
`username` longtext NOT NULL,
`time` int(12) NOT NULL default '0'
) TYPE=MyISAM;


note the use of ` and not '

mashby
30 Jun 2002, 22:26
meaning that it SHOULD or SHOULD not use the '?

Scott MacVicar
01 Jul 2002, 00:54
use the code i posted :)

it should be `

Merjawy
14 Sep 2002, 10:51
Thank I been needing something like this.. and thnx for the question about where the control is.. found it :)


thnx PPN

ghroob
15 Sep 2002, 02:34
Thank you
very nice hack

Larry@IOG
15 Sep 2002, 07:14
3 questions will this work with 2.2.7? And is there a script to allow name changes only once every 30 days? How about someone changes their name and someone else takes it? Is three a script where they can not take or choose a name that was already reigstered


Thanks


Larry

Decoder
26 Sep 2002, 08:34
SQL-query :

CREATE TABLE `namelogs` (
`userid` int(5) NOT NULL default '0',
`username` longtext NOT NULL,
`time` int(12) NOT NULL default '0'
) TYPE=MyISAM

MySQL said:


You have an error in your SQL syntax near '`namelogs` (
`userid` int(5) NOT NULL default '0',
`username` longtext NOT' at line 1

ZiRu$
14 Oct 2002, 17:56
I just installed it......works perfectly! thx

Fuitad
26 Oct 2002, 22:14
My users are having a problem with this hack. When someone have a space in their names and they do any kind of modification to their profile, even if they don't change their username, it says that the name is already taken. Any ideas?

prcast
26 Nov 2002, 22:54
can this be set up so only certain usergroups can use this feature

Larry@IOG
30 Nov 2002, 00:50
Ok I installed this with no errors on 2.2.9 but I do not see it in my admin panel or do I see where I can change my own name in my profile


Did I miss something?


Larry

N9ne
15 Dec 2002, 18:22
I made a tiny tiny addon for this, I made it so admins can bypass the days between each change.

This is what I did:

in member.php find BOTH instances of:

$limit = (86400 * $dayuserchange);


And in both cases, Add this below the code:

if ($bbuserinfo[usergroupid]==6) {
$limit = 0;
}


Just thought I'd post that incase it's of any use to anyone else.

Rose
18 Jan 2003, 18:50
Works great in 2.2.8. Thanks, Scott!

N9ne
11 Feb 2003, 22:02
http://www.vbulletin.org/forum/showthread.php?s=&threadid=48813

I've released 2 addons for this hack.

kevin_r1
21 Mar 2003, 19:20
This works fine for 2.3.0 in case anyone is wondering. FOLLOW THE INSTRUCTIONS!!! They are perfect.

Angelus
24 Apr 2003, 21:42
Hello.

How can I into the Memberlist in extra a column indicate let the announcement of the changed user names?

David Bott
18 Aug 2003, 12:54
Ok, I have this hack installed and ran into one issue. If a user changes his name from AAA to BBB someone than can take his old name AAA and cause issues under the new ID.

Can something please be added to check the log to see if the name was used at one time, and if so, was it by the same person looking to make the change again. If so, allow it, if not, disallow it.

Thank you.

David Bott
21 Aug 2003, 14:19
Hello....Please....Anyone. I will need to remove this hack unless I can make the issue go away.

Also, in the "namelogs" table, I see the old user name that was changed, but it would be good to also see what it was changed to. (Using PHPMyAdmin to look at the table for their is no other way.)


Scott...Willing to PAY for the help!!! :)

Holidazed
18 Sep 2003, 21:39
Scott, awesome hack. I love this. If there is a way, I think it would be even sweeter if this could be controlled via the Admin CP.

Can this be done?

Maybe have an on/off feature
Change minimum posts
Change days between name changes

All so we do not have to modify the database directly.

Adi211
16 Jun 2004, 17:32
hi, i would like to have that the original registered name of the user is shown in postbit template, how can i realize that?

Kaelon
22 Feb 2005, 19:01
Works in vB 2.3.6.

vishalsachar
24 Feb 2005, 00:11
awesome