Advertisement:

Author Topic: Success Story - vBulletin 4.2.0 to SMF 2.0.14  (Read 1661 times)

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Success Story - vBulletin 4.2.0 to SMF 2.0.14
« on: June 30, 2017, 10:05:38 PM »
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:
Code: [Select]
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!

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Success Story - vBulletin 4.2.0 to SMF 2.0.14
« Reply #1 on: June 30, 2017, 10:26:52 PM »
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

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Success Story - vBulletin 4.2.0 to SMF 2.0.14
« Reply #2 on: July 01, 2017, 02:49:51 AM »
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 ...

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,765
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Success Story - vBulletin 4.2.0 to SMF 2.0.14
« Reply #3 on: July 02, 2017, 12:24:30 PM »
Great to hear and thanks for sharing.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin