Thanks - discovered that Moderators are not carried over fully - with 70 forums, it was a lot of PM's that suddenly went out when they were all in place Still we are up and running - now to install a few hacks..... I've also got to add another 150 forums later today or tomorrow!!
This is getting off-topic for this thread, but I don't think there's been a correct fix posted for this. I've hacked the import script to do this (among other things, which I'm still working on), and it involves numerous changes.
Not sure if you have covered this one yet - but if you change a username of a moderator it keeps the old username in the $modlist variable under postlist.php
Hmm, this hack deleted one of my moderators when I went to change their name to have some caps. Then I re-added them to the two forums they are a moderator in since they had been removed when they were accidentaly deleted due to the name change hack bug. Anyways... now I added them back as moderator to two boards, and one of the boards they show up twice at the bottom as a moderator. The other board they are listed only once as they should be. I have removed them as moderator and re-added them to the board, and their name is showing up twice again.
Any ideas how I can get this corrected? I am getting razzed about this fairly regularly from the mod, and I just keep telling her she has to do twice the job! hehe
Maybe this is the same as the post above is mentioning?
To fix that, you will need to actually view the contents of the B_Board table and manually correct the moderators listed for the board. I've had to do this once or twice.
Make absolutely sure that you leave a comma before and after the names of the moderator. For example:
Could you dump out the moderator info from the database?
SELECT U_Username,U_Status,U_Groups FROM w3t_Users WHERE U_Status='Moderator'
SELECT G_Name,G_Id FROM w3t_Groups WHERE G_Name='Moderators'
SELECT Mod_Board,Mod_Username FROM w3t_Moderators
SELECT Bo_Keyword,Bo_Moderators FROM w3t_Boards
In w3t_Boards.BoModerators, are all the moderator names both preceded and followed by a comma? It should look like: ",mod1,mod2,mod3,". If the comma at the beginning or end of the string is missing, that would explain the problem, because the hack assumes they're present.
If the commas are present, there may be an inconsistency among the above tables.
Do you know how to view/update your MySQL database using phpMyAdmin or with direct MySQL queries?
If not, if you'll show me the results of those SELECT queries, I can tell you how to fix the problem (if you don't have a large number of boards and moderators).
I have a suggestion for the Change Username hack. If one wants to change a username as an admin one might click on the 'Edit this user' link under showprofile.php. To reduce the chances of changing the wrong old username, especially when two names could be very similar, I would propose to add the change username option to the selectionoption.php screen under admin.
Therefore I have added the following code to admin/selectoption.php
code:// -------------------------------------------------- // Change Username additional mod ICW 13-07-02
if ( ($user['U_Status'] == 'Administrator') && ($Number != '1') ){ echo " <tr><td class=lighttable valign=top> <a href="{$config['phpurl']}/admin/sk_changename.php?Cat=$Cat">Change a username</a> </td><td class=darktable> Change the username. </td></tr> "; }
// -------------------------------------------------- // End of Change Username additional Mod by ICW
Now comes the problem, this works fine to only appear for an admin, and not for a moderator, and also will not show if an admin clicks on the first admin (perhaps that check could be added as default to protect the first admin) - the problem I have is that I cannot pass the username to the sk_changename.php file.
I am guessing that the form neads to be changed to two option fields as in banuser.php - could also the cat bit be added as well so that this is retained in the url.
My problem is that I am starting to get out of my depth so would appreciate some assistance, especially as it will mean me altering the core files.
Also I wondered if we could add in sending a message to both the other admins, and also to the user to inform them off the change - just in case another admin decided to do the dirty
Another feature I'd like to have is a confirmation page.
But I really need to get back to some other work, and probably won't have time to make substantial changes to this hack in the near future. Enhancing the user interface wouldn't be difficult, just time-consuming.
At this point, I think the priority should be to have someone else review the hack's code (primarily the database stuff) for correctness.
It's been sitting there for almost a month, and it needs another pair of eyes to determine whether it's correct. In particular, I'm not sure if too many or too few rows are getting deleted for the old username.
I'm an idiot when it comes to coding, so I'm not much help. I'm curious though, why do you need to use the deletes? Whenever I've changed names manually (meaning through the database) I've been able to do it all just using updates (at least I thought!). Am I missing something? I've always gone back through and done a search for any reference to the old username and I've never found it still showing up (not counting references inside of posts). Have I just been getting lucky?
I had a quick look on the code. Looks very advanced. If i'm read, you always delete the new username, if it already exists, cause you wanna merge them. I'd prefer to have "merge" as an option (checkbox) cause most of the time, i don't wanna merge users. I simply don't want to change anything, if the new username already exists. Then the User has to choose another name, he wants to change to.
Hopefully, i can do some testing tomorrow. I'll post my results here, but everything looks fine so far.:)
WOW!, I was hoping to get some help with changing a registar'd users ID as he used an email address for his ID.
I have to admit, I'm lost. I have no idea what and how to even attempt this so I'm afraid to even try this.
I have about 180,000 page views the last month, and this is the first time for me to ever do this. I'm not exactly dumb, but I'd consider myself a little ignorant when trying to understand what you all have been talking about.
Point is, when the smoke is clear, have any of you got a safe way to change a current users name with the newest 6.?? version ubb board. I just set this up in may of this year and I'm scared as He$$ to modify this thing as I have so many that are on here and I'm not wanting to have problems doing a little simple thing I'd thought would have been incorporated.
Any suggests or ideas that might get me in the right direction would really be appreciated.
Just make sure to backup all changed files and your database so you can restore your board and posts to original condition if things go bad for you. Also, make sure you close your board first to help make things go as smoothly as possible.
It's been sitting there for almost a month, and it needs another pair of eyes to determine whether it's correct. In particular, I'm not sure if too many or too few rows are getting deleted for the old username.
Thanks
There is a bug when merging users.
I had someone create a new user (RoadRunner) and we merged his old user into this one. Well, all his old posts came over just fine, but any posts made under the new user before the merge disappeared. I found that they were still in the db, but the B_PosterId was still listed under the U_Number of the new user before the merge.
Changing the B_PosterId to the old U_Number made his posts reappear again.
Here's the db changes that were necessary:
// new user number, deleted after merge mysql> select U_Number from w3t_Users where U_Number = '10195'; Empty set (0.00 sec)
mysql> select B_Number,B_Username,B_PosterId from w3t_Posts where B_Number = 4677; +----------+------------+------------+ | B_Number | B_Username | B_PosterId | +----------+------------+------------+ | 4677 | RoadRunner | 10195 | +----------+------------+------------+ 1 row in set (0.00 sec)
mysql> select U_Number from w3t_Users where U_Username = 'RoadRunner'; +----------+ | U_Number | +----------+ | 906 | +----------+ 1 row in set (0.00 sec)
I have a question about an earlier version I used. I changed a member's name (merged his old acct with the new so he could use his old public displayed name from ubb.classic) and it worked fine. But now his signature doesn't appear under his posts (double-checked a few times that it is actually there), his rating isn't showing, nor is his avatar.
Is there some kind of update command I can run in phpmyadmin to clear it up and allow those to show?
Thanks I used that and it seemed to be ok to the forum, but it said: Rows Affected : 0
Does that mean it didn't make any changes? '3' is the U_Number and 'Allen' is the new name of the user. Should I use the old username in that spot? Or does this not affect older posts, only newer?
hmmm... he's the admin, user number 1, with >5k posts I did run it on his original name and it said 5k+ rows were affected, maybe it fixed it then, if not, I'll run the updated modification here again and see if it fixes it.
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.