News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Success Story - vBulletin 4.2.0 to SMF 2.0.14

Started by GL700Wing, June 30, 2017, 10:05:38 PM

Previous topic - Next topic

GL700Wing

After several months of intense planning, preparation and testing I recently converted a Vbulletin forum (vBulletin 4.2.0 Patch Level 3 with PHP 5.4) to SMF 2.0.14 with PHP 7.1.6.

Stats as follows:

Members:
~10,000
(Only about ~2,500 were legitimate and there were more than 2,000 accounts that had never been activated)
Posts:
~142,000
Topics:
~8,000
Attachments/Avatars:
~10,000

The new SMF forum is successfully running 130 official mods (including one that I wrote specifically to implement functionality that existed on the vBulletin forum - see Membergroup-based Signature Permissions and another that I cloned to add a similar feature) plus quite a few other customisations that I either coded myself or found via the SMF community.  In addition, the new forum is using Simple Portal (with a shoutbox), a customised theme (with the option to choose the default theme or a third theme), a separate mobile theme and has Tapatalk enabled.

The conversion process had to be done in several stages as I discovered that the vBulletin converter wouldn't work with SMF 2.0.14, I had to clean up some of the imported data, vBulletin 4.2.0 wouldn't work with PHP versions later than 5.4 and a few mods needed minor changes to work with PHP 7.x.  In addition, the new forum URL dropped the 'www' prefix, was converted to https and was moved from the root directory to a sub-directory.

The final - and one of the most important - changes I had to implement was to update .htaccess to redirect links to the previous forum address format (which took two forms due to the recent removal of vBSEO) to the SMF forum address format.  This was achieved as follows:

RewriteEngine On
RewriteBase /
Redirect /index.htm /forum_smf/

# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /forum_smf/index.php?topic=%1.msg%2#msg%2 [L,R=301]

RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /forum_smf/index.php?topic=%1.0 [L,R=301]

RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?forumdisplay.php$ /forum_smf/index.php?board=%1.0 [L,R=301]

RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?newthread.php$ /forum_smf/index.php?board=%1.0 [L,R=301]

# SMF rewrites for vBulletin before vBSEO removed
RewriteRule ^f[\d]+/.+-([\d]+).*/index([\d]+).html/?$ /forum_smf/index.php?topic=$1.0? [L,R=301]
RewriteRule ^f([\d]+)/index([\d]+).html/?$ /forum_smf/index.php?board=$1.0? [L,R=301]
RewriteRule ^f[\d]+/.+-([\d]+)-post([\d]+)/?$ /forum_smf/index.php?topic=$1.msg$2#msg$2? [L,R=301]
RewriteRule ^f[\d]+/.+-([\d]+).*/?$ /forum_smf/index.php?topic=$1.0? [L,R=301]
RewriteRule ^f([\d]+)/?$ /forum_smf/index.php?board=$1.0? [L,R=301]
RewriteRule ^archive/index.php/t-([\d]+).*html/?$ /forum_smf/archive2.php?topic=$1.0? [L,R=301]
RewriteRule ^archive/index.php/f-([\d]+).*html/?$ /forum_smf/archive2.php?board=$1.0? [L,R=301]
RewriteRule ^archive/index.php/?$ /forum_smf/archive2.php? [L,R=301]
RewriteRule ^members/([\d]+).html/?$ /forum_smf/index.php?action=profile;u=$1? [L,R=301]

# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ /forum_smf/index.php?action=profile;u=%1? [L,R=301]

# SMF rewrite for calendar
RewriteRule ^calendar\.php /forum_smf/index.php?action=calendar? [L,R=301]

# Rewrite all non-existent directories and folders to /forum_smf/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /forum_smf/index.php? [QSD,L,R=301]


The end result is a forum that is much faster and more secure and which has all the functionality - plus some! - the forum community had wanted for quite some time (unfortunately the admin of the vBulletin forum had not had the time to devote to managing it for several years which is why I got involved) and a bunch of very happy forum members!
Life doesn't have to be perfect to be wonderful ...

vbgamer45

That's good to hear. Very smart in rewriting the urls most people forget that when changing forum software.

I just did two site updates as well recently yabb and smf 1.1.x to smf 2.0.x with ssl.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GL700Wing

Quote from: vbgamer45 on June 30, 2017, 10:26:52 PM
Very smart in rewriting the urls most people forget that when changing forum software.
Broken links - both internal and external (eg, other forums, Google, etc) was one of the biggest complaints following the removal of vBSEO earlier this year (which started being hacked on a regular basis from late last year with the result that clicking on external links to the forum took people to other websites) - the other was the loss of the 'Likes' system that was part of vBSEO.

Having been through the pain of broken links after vBSEO was removed I was determined not to inflict the same pain again just a few months later when I implemented SMF mainly because apart from the inconvenience there were some rather vocal forum members who weren't keen on having to learn something new (which I find just a little bit amusing as there are many forum software products and even more customised implementations!) and were looking for *anything* to complain about (the *only* complaint following the move to SMF was that the PM system does not have a folder structure - but this was from a single member who feels the need to keep 600 PMs!). 

That said, having two sets of URLs to rewrite - and trying to find all the possible vBulletin permutations - just made getting .htaccess right a little bit more challenging/interesting ...
Life doesn't have to be perfect to be wonderful ...

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Ricsca

Where can I download the converter?
I can't find the converter for vbulletin 4 in the download area
Thanks

shadav

Quote from: Ricsca on April 17, 2021, 01:51:00 PM
Where can I download the converter?
I can't find the converter for vbulletin 4 in the download area
Thanks
the first pinned message in this board...
https://www.simplemachines.org/community/index.php?topic=404729.0

Advertisement: