Anubis_The_Jackal
Court Jester
![](modules/Forums/images/avatars/4208f6973f8cc902be6ef.gif)
Joined: Sep 20, 2003
Posts: 106
|
Posted:
Wed Mar 07, 2007 12:21 am |
|
I'll quote myself from PHPBB.com
No one hardly replies to me there.
(Censored)
Anubis_The_Jackal wrote: | I am attempting to restore several ancient archives as well as some more recent ones, I have no problems with this... however many of the posts do not display because the former owner of the site used to delete users from the database manager... and not the admin panel. I need to know if there is a way to replace these six thousand or so users with dummy users (a script) and also if there is one to bring these owner-less posts back from the dead by either making them anonymous or a script to fix them as anonymous. Both methods are needed because of the deficient way these old boards were run into the dirt.
I'm working with databases as old as 2003, so they are extremely important to the archive project... they're the first incarnations of the site and hold information lost over time. (In fact I have several databases like this all the way until December 2005 when I took over and started fixing things and completely overhauled the site with a fresh new vanilla install) |
And then on to missing the point but offering a few suggestions (that cannot be done because of no other existing copies, or isnt what I am looking for)
espicom wrote: | You have a daunting project, indeed! Without the user database to work with, it would be very difficult to associate posts with users. At best, you could restore the posts as "anonymous", assuming that you do not have an overlap of old user IDs and new ones (the numeric ID, not the username).
And another obstacle is that the "poster name" field is not filled in in the posts tables unless the user is a guest, or the deletion of the user took place through the ACP (or a tool like the Only registered users can see links on this board! Get registered or login! that faithfully recreates the steps that the ACP deletion goes through).
Best bet would be to attempt to find contemporary "full backups", and restore the users and everything to a local board (see Only registered users can see links on this board! Get registered or login! for a tool for this), then do the clean-up more carefully than the former owner. You could then use something like the tool in Only registered users can see links on this board! Get registered or login! to merge a backup of the restored data into the current forum. |
Und then my reply
Anubis_The_Jackal wrote: | Well, is there an automated solution (I cant merge, too many incarnations exist and there are no other backups from this time period) that would add users from ID 2 to 3,500. Dummy users essentially, each account identical and called "Dummy" thereby giving every post a UID to associate with.
As for making all posts anonymous that would be fine, except I cant be expected to hand do tens of thousands of posts...
If the posts were never altered when the users were brutally deleted would the first option I listed work? If not... am I allowed to ask for modders help on creating some sort of script that would fix it (like the user group fix)? I am sure I am not the only person in the world that is dealing with this kind of issue... |
Then some crickets chirped here.
And some more
Anubis_The_Jackal wrote: | H'ok, I have done some of my own testing and I hath found what I needed as far as SQL goes... but I do not have the PHP skill to do the following:
INSERT INTO `phpbb_users` (`user_id`, `user_active`, `username`, `user_password`) VALUES ('{variable}', '0', 'Dummy{variable}', 'X');
Where {variable} would be the number that is missing, starting with 2. It would go 2 3 4 5 6 7 8 9 10 11 12 13 14 but then when it detected 15 it would skip 15 and go on to 16 17 18 19 20 21 etc.
Could anyone help me? |
And then sixty million more crickets.
>.>
<.<
Like that commercial with the man on the lawnmower: "Somebody help me" I must reiterate how important this is: getting back posts from the early days of a site that has grown very large, but suffered detestable mismanagement from previous owners until I took the reigns. It is important because no backups or archives are currently online that go back further than late 2006, while I have the SQL and the files as far back as 2003. (I saved all of this before the files were deleted completely from the servers). This is just one part of many things I will have to do to get these "Archive" sites up and running, seeing I have been hired to do this project so that I can afford food. And I like food. In fact, I dare say I love food, and being able to afford college books. So, if anyone can help me get this one part working, I will be eternally grateful.
It'll save me the time of doing 200,000 users by hand, since there are 12 archive sites and each one had the horror of bad deletions happen until the very last two archives (which is when I became owner for a few months until I sold the thing to someone who would take care of it). |
|
|
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Mar 10, 2007 3:30 am |
|
Surely all you would need to do is create a dummy user, for arguments sake lets call him 'Archive_Post' than have something insert that user_id where there is no match found for user_id and username?
Have you looked at the phpBB delete user routine to see how it handles associated topic post user id's when the user is deleted? In nuke they change the users id to that of the admin. |
|
|