Go Back   vb.org Archive > Community Central > Community Lounge
Prev Previous Post   Next Post Next
  #1  
Old 01-22-2015, 10:57 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Impex is Open Source now

I just now saw that, I don't remember getting a email or anything about it, so it's news to me. So I figured it's probably news to many people here too.

Source: http://www.vbulletin.com/forum/forum...ual-file-fixes

Impex has been released as an open source project. The official open source release is here: https://github.com/internetbrands/vbimpex

However a more updated version (with updates by VB Support member Zachery) is available here: https://github.com/vBZachery/vbimpex

Impex is no longer available in the Members Area.

The Impex Manual is here: http://www.vbulletin.com/docs/html/i...rsion=40202603

Please be aware this version of Impex does not work natively with VB5. In order to import into VB5 you must first import into VB4 and then upgrade to VB5.


The existing Impex software is old, there are some file edits you should do before you begin your import to reduce the chance of errors.

Note- If you use the Impex maintained by Zachery above these fixes have already been made.


Caution: Windows users should not use notepad to edit these files. Instead download a true code editor like Notepad2 or Notepad++. (Both are free and easily found with Google.)
The first edit is simple- open the index.php file in the /impex/ directory.

On or about line 271 fine the code: Code:

) TYPE=MyISAM";
Change the word TYPE to ENGINE, so... Code:

) ENGINE=MyISAM";
And save changes. This is required because the word TYPE is depreciated in newer versions of MySQL and will produce a database error if used.
Edit #2 is in the file ImpExDatabaseCore.php also in the /impex/ directory.

On or about line 1857 fine the code: Code:

'" . $caption . "',
and change it to: Code:

'" . addslashes($caption) . "',
And save changes. This is required to fix a bug in the code- if any attachment contains a single-quote ' character you would get a database error without this fix.
Edit #3 is only necessary if you are importing CMS data. In the ImpExDatabase_cms_001.php file in the /impex/ folder.

On or about line 848 fine the code: Code:

'" . addslashes($this->get_value('nonmandatory', 'workflowstatus')) . "',
and change it to: Code:

'$vbenumval',
Then several lines up (around line 832) you will fine the code: Code:

// MySQL database case 'mysql': { $Db_object->query("
Now, directly above the $Db_object->query... line add some blank lines and paste in the code: Code:

$vbenumval = addslashes($this->get_value('nonmandatory', 'workflowstatus')); if (empty($vbenumval)) { $vbenumval = "NULL"; }
So your final code will look like: Code:

// MySQL database case 'mysql': { $vbenumval = addslashes($this->get_value('nonmandatory', 'workflowstatus')); if (empty($vbenumval)) { $vbenumval = "NULL"; } $Db_object->query("
And save changes. This is because the word NULL must be explicitly stated if the value in question is blank, empty or zero.
Last Update: January 1, 2015
Reply With Quote
 

Thread Tools
Display Modes

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 01:03 AM.


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.05035 seconds
  • Memory Usage 2,704KB
  • Queries Executed 12 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (15)post_thanks_box
  • (10)post_thanks_box_bit
  • (15)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit
  • (15)post_thanks_postbit_info
  • (15)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • 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_threaded
  • showthread_threaded_construct_link
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete