Previous Thread
Next Thread
Print Thread
Rate Thread
#210542 05/04/2001 12:03 PM
Joined: May 1999
Posts: 242
Coder
Coder
Offline
Joined: May 1999
Posts: 242
My first php hack... [Linked Image]

Hopefully I didn't mess it up. I've tested it on my site and it seems to be working like its perl version. If you find any errors (particularly in the documentation since I'm fairly sure the code is right, but let me know!) please let me know asap! [Linked Image]

This hack allows you to change a user's name (and all of the various stuff associated with their username, such as posts and PMs). It's pretty straight-forward.



[Linked Image] 6 [Linked Image]
Screamers
Attachments
35535-changename_hack_php.zip (0 Bytes, 26 downloads)

Sponsored Links
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
THANK YOU - I ll try it out the weekend!

Carl

----------
http://www.colour-ize.de/forum (test entry: user: 'test' pw: 'test')

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Just out of curiosity, has anyone modified this to 'Merge' usernames? I'm currently having to do it manually on my site when a user accidentally gets more than one account going... Kind of a pain! []/testimages/icons/wink.gif[/]

Thanks,

matt


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
yes yes this is what I'm looking for
anyone have this plugin ?

please need it bad for someone site

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
I know that I haven't had time to write it yet... has anyone else?? []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Sponsored Links
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
wopps sorry I'm looking for the change user name atm
it was listed on screamers hack php list but I did not grab it I had no idea the site was going down :-( so anyone have it handy
the links to the attached files here don't work

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
have you checked for it at http://screamers.wwwthreads.com ... That's where sixpack keeps all the hacks... you could also check Eileen's Hack Area but I don't believe she has this one posted there...

hope that helps!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
the sub domain is down do the the dns being change to infopop lol thats why I'm asking here

this is what I see
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

Premature end of script headers: /home/sixpack69/www/six-cgi/perl/index.pl

Joined: Apr 2001
Posts: 50
Journeyman
Journeyman
Offline
Joined: Apr 2001
Posts: 50
Actually, I think I was able to accomplish a merge by simply renaming a user's second account to the same name as the first account; consequently, all their posts now show up under the original name. The script is, fundamentally, a search & replace tool.


+++ Quis custodiet ipsos custodies? +++
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Okay, then a couple of questions... []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

1. when that user logs in, which passsword do they need?
2. which account gets updated with totalposts?
3. if they get sent a PM, to which account does it go?

those ones are the first I could think of... []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

Thanks!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Sponsored Links
Jeremy Harmon #210552 11/09/2001 10:54 AM
Joined: Apr 2001
Posts: 50
Journeyman
Journeyman
Offline
Joined: Apr 2001
Posts: 50
Okay, trusting that this board supports file attachments, I'm attaching my revision of the hack. The problem with escaping quotes (mentioned earlier in this thread) is no longer relevant.
Attachments
43173-changeusername.zip (0 Bytes, 190 downloads)


+++ Quis custodiet ipsos custodies? +++
Joined: Apr 2001
Posts: 50
Journeyman
Journeyman
Offline
Joined: Apr 2001
Posts: 50
Obviously, it's not a complete merge solution. I haven't tested it thoroughly, but maybe this will help.

I'll use a true-life example: after about 6 months, a user decided he wanted a new handle, so he abandoned the old account (we'll call it 'Bill') and created a new username (let's call this one 'Hoohah'). Now, to answer your questions...

1. I renamed the original account ('Bill') to Hoohah. As soon as I did that, Hoohah "inherited" everything from Bill. Hoohah will now need to log in with Bill's password. At login, Hoohah will now find all of Bill's messages in his inbox, including new, unread messages delivered to either account.

2. Unfortunately, this script is not a true merge, so the post total for the resulting account will not be incremented--in this example, Hoohah's new post total will equal Bill's. My solution was to note Hoohah's total beforehand, then manually increment Hoohah's new total (Bill's old total) by adding Hoohah's total (the one that existed before the change) using a db tool like PHPMyAdmin. More laborious, untidy, but it worked.

Post totals is a relatively minor fix. The real value of the changename script (besides changing the username) is this: every post in the database made using either account will now be attributed to (and linked to) Hoohah.

3. As noted earlier, PMs shouldn't be a problem. According to my test, the only problem is that now any PM's in somebody's inbox from Bill can't be answered (since 'Bill' now a nonexistent account). However, unless there's like 100 PM's from Bill out there, this can be fixed with a tool like PHPMyAdmin without too much fuss.

Bottom line: this hack is not ideal for merges, yet it does most of the job. (But, realistically, how many times will you need to merge?) Moreover, I'm sure a couple more basic SQL commands could be added to take care of the current shortcomings. I just haven't gotten around to it . . .


+++ Quis custodiet ipsos custodies? +++
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
ok where do I get this lol

you can email it to me [email protected]
please

Joined: Apr 2001
Posts: 50
Journeyman
Journeyman
Offline
Joined: Apr 2001
Posts: 50
Wake up and download the file attached to my post (made earlier today) titled "hack attached" -- that one works. []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]


+++ Quis custodiet ipsos custodies? +++
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
og I missed that sorry about the ya I'm awake now lol

Thanks a ton ;-)

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
FYI,
Line 12 of skdochangename.php should now read

require ("../languages/$lang[THIS_FILE]/ubbthreads.php");

Instead of the old wwwthreads.php :-)

Also, I tried to merge users, but the script ended up creating two users with the same name.

Regards,
Max


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)