![]() |
Post Edit History Importer
What is this?
The Post Edit History Importer (PEHI) is just that; an importer script. For those of us who were using Surviver's Post Edit History (PEH) hack, we are now pleased to see this functionality included in the default vBulletin package with the introduction of 3.7.0. However, the hack's and vBulletin's way of logging post edit histories are somewhat different. So, thus, the need for this importer script arose. In a nutshell, it will import your past edit histories into vBulletin's new system. What, exactly, does it do? This script is a seamless import of the edit histories from the PEH hack into vB's system. There are several key differences between vB's system and the hack's, among which are:
If you're truly interested in checking out everything this importer does to make it "vB standard," you can read the code. I've commented enough that it should be discernible. ;) Anticipated FAQ Q: Can I use this importer if I already have edit histories in vB's new system? A: Yes! This importer was designed to import everything seamlessly. After it is done organizing the old histories correctly, it will process new histories before clearing them altogether in order to rearrange them correctly. So, yes, you can. Q: Which version(s) of the PEH hack is this importer intended for? A: The importer has only be tested with PEH version 1.2.5. Since I haven't used the new beta version, I do not know the database structure and therefore this importer might not work on that version. Q: How long does the importer take to do everything? A: Not very long at all, I promise. But really, it depends on how many histories you have. Personally, I had 21,075 histories from the hack. After inserting the originals (14,033 of them), I ended up with 35,108 records total. How long did it take the importer to do all of that? 2 minutes. (More to come later if need be...) Using the importer To use the importer, just download the .zip file attached, unzip it, and open the 'readme' file. Instructions are included there. Afterward After you've used the importer, feel free to post your stats here! I'd love to hear how it worked out for you. :) Enjoy! :D |
Nice, Thank you very much. But I don't like the new post history, becaus the edit is only saved if you entere a edit reason.
|
Quote:
(which yes, I dislike as well ;)) |
i installed . working hard. thank for upgrade
|
Quote:
|
How do you feel this hack will load the system if you have several million posts? Is it very intensive to search this out?
Thanks, David |
Quote:
However, I would suggest you run the importer on a copy of your database, not your live website, first, just to be sure. :) |
I runned the script perfectly, I choose to remove the tables, but once I tried to uninstall the old product from the product page on admincp, I got this error:
PHP Code:
|
Ack. I didn't realize that the tables are removed by the uninstall script. Did it uninstall the product okay for you? This isn't going to cause a major problem, I just want to make sure you can uninstall it correctly.
However, I will remove the tables option from the script and just add a message to uninstall the product. :) |
Quote:
Any way you can help me out? |
I think the easiest way to get rid of it for you is to just create a table named "edithistory" and that way the uninstall script won't fail when you try to install it.
To do this, enter your ACP, click on "Execute SQL Query" under 'Maintenance' and enter this in the "Manual Query" field, and then click 'Continue' on the next page: [sql]CREATE TABLE edithistory ( blah INT UNSIGNED, blah1 SMALLINT, blah2 DATETIME )[/sql] Then, go and try to uninstall the product again. :) |
The importer has now been updated to only clear the old table and remove its records, rather than remove it entirely. This way, the uninstall script will not fail when someone tries to remove the product.
This importer is also now supported. :) |
Quote:
The product has been removed! :) thanks again! |
Omg if I only knew this, just deleted the entire database of PEH because vbulletin introduced it's own :(
|
Quote:
|
Just used the importer and it seemed to have worked fine however on the last step when it asked if it should clean-up the mess the old hack would leave behind I said yes but then got this error:
Unable to add cookies, header already sent. File: /v***/***/forum/post_edit_history_importer.php Line: 5 |
I'm not sure what would be causing your problem, Darat. Could you check to see that the importer ran smoothly, and that everything is looking fine?
Also please check to see that you can uninstall the product successfully. |
The import appears to have worked fine and I've removed the old PEH mod and armageddon hasn't happened so everything seems OK.
|
Great! I will look into the error though, so that no one sees it in the future. ;)
|
Edits Processed: 4,650
Unique Posts Processed: 2,108 Total Records Processed: 6,758 Total Time to Run Import Script: 3.40 minutes Step 1 - 0.02 minutes Step 2 - 0.08 minutes Step 3 - 0.03 minutes Step 4 - 0.72 minutes Step 5 - 0.03 minutes Step 6 - 0.00 minutes :) |
Thanks for posting. Glad to see it worked out for you. :D
|
In case anyone is wondering, I have just used this on my live board after an upgrade from 3.6.10 to 3.7.2 and it worked great! :)
|
Just wanted to say thanks and show credit. Marked as uninstalled, cleaning up my install page.
|
Any idea if this will work when converting PEH 1.2.5 to a database running vbulletin 4.0.2?
|
I noticed that you must set "$config['Database']['dbtype'] = 'mysql';" in your config.php. If you use mysqli then $db->query_read returns a mysqli resource and the script incorrectly tries to use it as a mysql resource, which results in "mysql_fetch_array(): supplied argument is not a valid MySQL result resource" on line 116.
I received errors that the script was unable to set cookies because the headers were already sent. The problem might be because the script prints html before it includes global.php. A workaround was to open the forum front page once, so that the forum could set the cookies, and then get back to PEHI. Otherwise the script worked nicely. :) |
All times are GMT. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|