Convert Invision Forums to Vanilla (instructions) - script complete
I've put together a basic script to help you convert your Invision Forums content and import this new content into a BLANK Vanilla install. This script assumes that you have your Vanilla Database Tables in the same Database as your Invision Tables
How to Use:
1) Download the Invision to Vanilla Conversion Scripts (invision_vanilla_0_5.zip - 11kb)
2) Open the config.php and enter the appropriate details - table names, passwords. The admin email is there so that you can match YOUR Invision account details with an ADMIN role in Vanilla
3) Upload to any directory on your server (eg: http://yourdomain.com/convert/)
4) Run the index.php file
Around 60 seconds from now it'll be all done (depending on the size of your forum of course) ...
The script will take you set by step through 6 steps ... the final step will partially clean up your Invision Posts removing BBCodes & Invision Comments (it's not 100% accurate)
Post Conversion
1) You will need to use the FORGOT PASSWORD to reset your password (as will all users)
2) You will need to rest all Category Permissions
3) You will need to manually rest all user Roles & Permissions (moderators etc)
4) Install any themes and extensions AFTER you have finished
5) remove all scripts as you don't someone naughty getting these scripts
Caution:
This script comes with a warning or two:
1) it will remove ANY existing content in the Vanilla tables - the ones it uses anyway
2) it has been tested with Invision 2.1.x - not with earlier versions
3) it assumes a default Vanilla install is in place - it makes use of the default ROLE settings
If anyone wants to modify, or continue development of these scripts - please do
Comments
If you're gonna do it this way keep in mind that the invision-bbcode in comments can contain some bad coding. I wrote some queries that convert the bbcode to html so the old invision formatting is still visible in Vanilla when you're using an extension like FCKeditor. If you're interested I can post them here.
-- # Change FormatType in Html UPDATE `LUM_Comment` SET FormatType ="Html"; --# Convert linebreaks to html breaks UPDATE `LUM_Comment` SET Body = replace(Body, " ", "<br />"); -- # Images UPDATE `LUM_Comment` SET Body = replace(Body,"[img]","<img alt=""image"" src="""); UPDATE `LUM_Comment` SET Body = replace(Body,"[/img]",""" />"); -- # Formatting UPDATE `LUM_Comment` SET Body = replace(Body,"[b]","<strong>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/b]","</strong>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[i]","<em>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/i]","</em>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[u]","<u>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/u]","</u>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[list]","<ul>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/list]","</ul>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[*]","<li>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[code:1]",""); UPDATE `LUM_Comment` SET Body = replace(Body,"[/code:1]",""); -- # Remove target='blank' from links UPDATE `LUM_Comment` SET Body = replace(Body,"<a href='","<a href="""); UPDATE `LUM_Comment` SET Body = replace(Body,"' target='_blank'>",""">"); -- # Update Quotes UPDATE `LUM_Comment` SET Body = replace(Body,"[quote=""","<blockquote><cite>"); UPDATE `LUM_Comment` SET Body = replace(Body,"""]",":</cite>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/quote]","</blockquote>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[quote]","<blockquote>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[/QUOTE]","</blockquote>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[QUOTE]","<blockquote>"); UPDATE `LUM_Comment` SET Body = replace(Body,"[QUOTE ","<blockquote>"); UPDATE `LUM_Comment` SET Body = replace(Body,"author=","<cite>"); UPDATE `LUM_Comment` SET Body = replace(Body,"link=board=","</cite>"); UPDATE `LUM_Comment` SET Body = replace(Body,"<!--QuoteBegin-","<blockquote><cite>"); UPDATE `LUM_Comment` SET Body = replace(Body,"+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><strong>QUOTE</strong>",""); UPDATE `LUM_Comment` SET Body = replace(Body,"</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->",":</cite>");