Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Edit History Importer Details »»
Post Edit History Importer
Version: 1.0.1, by Gray Matter Gray Matter is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.0 Rating:
Released: 12-23-2007 Last Update: 05-02-2008 Installs: 16
DB Changes
Additional Files Translations  
No support by the author.

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:
  • vB stores iconid edits, the hack didn't
  • The hack stored edits by comparing them in each record, while vB instead stores the original post once and subsequently all edits in a separate record
This importer will correct any mishaps between the two systems; it will assign postedithistoryids in the exact same order as they would have been if vB had inserted them, it will store original posts in the same way that vB does, it will assign iconids to make up for the missing ones that the hack never logged, and many other things.

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-03-2008, 02:09 PM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 05-03-2008, 02:19 PM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 05-03-2008, 10:32 PM
tuwebfacil tuwebfacil is offline
 
Join Date: Jan 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gray Matter View Post
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.
thanks for the support!!

The product has been removed!

thanks again!
Reply With Quote
  #15  
Old 05-05-2008, 03:56 PM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Omg if I only knew this, just deleted the entire database of PEH because vbulletin introduced it's own
Reply With Quote
  #16  
Old 05-06-2008, 01:43 AM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dutchbb View Post
Omg if I only knew this, just deleted the entire database of PEH because vbulletin introduced it's own
I'm sorry to hear that. You don't have a backup or anything you could use? It's a shame to lose all those histories.
Reply With Quote
  #17  
Old 06-15-2008, 11:17 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #18  
Old 06-17-2008, 01:20 AM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 06-17-2008, 05:37 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The import appears to have worked fine and I've removed the old PEH mod and armageddon hasn't happened so everything seems OK.
Reply With Quote
  #20  
Old 06-17-2008, 03:00 PM
Gray Matter Gray Matter is offline
 
Join Date: May 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great! I will look into the error though, so that no one sees it in the future.
Reply With Quote
  #21  
Old 07-19-2008, 12:17 AM
WildSoftCat WildSoftCat is offline
 
Join Date: Mar 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05097 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete