<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bybjorn.com &#124; Bjørn Børresen - freelance web developer &#187; simplemachines</title>
	<atom:link href="http://www.bybjorn.com/tag/simplemachines/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bybjorn.com</link>
	<description>bybjorn.com &#62;&#62; Bjørn Børresen - freelance web developer</description>
	<lastBuildDate>Tue, 27 Jul 2010 11:08:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Converting from SMF to ExpressionEngine Forum</title>
		<link>http://www.bybjorn.com/71/</link>
		<comments>http://www.bybjorn.com/71/#comments</comments>
		<pubDate>Sat, 01 Sep 2007 14:07:55 +0000</pubDate>
		<dc:creator>Bjørn Børresen</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[simplemachines]]></category>

		<guid isPermaLink="false">http://bie.no/blog/expressionengine/2007/09/converting-from-smf-to-expressionengine-forum/</guid>
		<description><![CDATA[This will describe how I converted my norwegian webmaster forum which ran the SimpleMachines forum software to ExpressionEngine with the forum module installed. The SMF_Import module I&#8217;ve created can be used to import both users and forum messages to EE, or just the users if you only want to import these. Please note that the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This will describe how I converted my <a href="http://www.skitx.com">norwegian webmaster forum</a> which ran the <a href="http://www.simplemachines.org">SimpleMachines</a> forum software to <a href="http://www.expressionengine.com/index.php?affiliate=bjorn">ExpressionEngine</a> with the forum module installed.</strong></p>

<p>The SMF_Import module I&#8217;ve created can be used to import both users and forum messages to EE, or just the users if you only want to import these.
<span id="more-71"></span>
Please note that the module you can download here (SMF_Import) is not a full module release, but more like a &#8216;scratch-an-itch&#8217; plugin I created to solve my specific problem (converting <em>my forum</em>) &#8211; so you will need to do some editing to get it to work. The good news is &#8211; it worked for me, and it&#8217;s not too difficult. Also, if you have problems, just leave me a comment and I&#8217;ll try to help you.</p>

<p>Make sure you have EE set to use standard MD5 password encryption (you do this during install). Also note that since SMF uses a seed the passwords cannot be transferred <em>and all your users, including you, will have to go through the forgot password procedure</em>.</p>

<h2>How to do it</h2>

<h3>Downloading the SMF Import module</h3>

<ol>
<li>Download the module here: <a id="p73" rel="attachment" href="/products/smf_import.zip" title="smf_import.zip">smf_import.zip</a></li>
<li>Unzip it in a directory &#8211; and open mcp.smf_import.php in a text editor</li>
</ol>

<h3>Edit some settings</h3>

<p>At the beginning in mcp.smf_import.php there are a couple of settings:</p>

<pre><code>var $smf_db = "database_name";
var $smf_prefix = "smf_";
</code></pre>

<p>Pretty self-explanatory. The smf_prefix is the simplemachines database table prefix (smf_ is standard).</p>

<h3>Creating the usergroups</h3>

<ol>
<li><p>Go to EE Admin -> Usergroups and create the usergroups you want. These may be the same groups you already have in your SMF install, or new ones. The point is that you want to transfer people from <smf_GROUP> to <ee_GROUP>. In my case my SMF install was very messy and I had a lot of different groups &#8211; so I ended up with just a few EE groups which was much more managable <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></li>
<li><p>Go to SMF Admin and check out the usergroups you have there. Now it&#8217;s time to link the SMF groups to the EE groups. You already have mcp.smf_import.php open I presume? You need to edit the array around line 90:</p>

<pre><code>// link SMF membergroups to EE membergroups ... SMF_MEMBERGROUP_ID =&gt; EE_MEMBERGROUP_ID
$smf_ee_membergroup_link = array(
    0 =&gt; 5,         // random people?
    1 =&gt; 1,         // Admin
    2 =&gt; 5,
    3 =&gt; 5,
    4 =&gt; 5,
    5 =&gt; 5,
    6 =&gt; 5,
    7 =&gt; 5,
    8 =&gt; 5,
    9 =&gt; 1,
    10 =&gt; 5,
    11 =&gt; 7,        // VIP
    12 =&gt; 6,        // Adult
    13 =&gt; 2,        // Banned
    14 =&gt; 5,
    15 =&gt; 5,
    16 =&gt; 5,
    17 =&gt; 5
);
</code></pre></li>
</ol>

<p>Ok, you see what I&#8217;ve done here? I&#8217;ve linked my SMF usergroup database id&#8217;s => EE usergroup database id&#8217;s. Pretty simple.</p>

<p>Also, right above that array there are some settings. Please go over them as well:</p>

<pre><code>    $admin_id = 1;          // we don't want to insert a new admin, but update the exisitng EE admin with data from SMF
    $update_only = false;   // default = false, set to true if you run more than one time and only want to update users
    $time_format = 'eu';    // default timeformat for the users
    $language = 'english';  // default language for the users
</code></pre>

<h3>Creating the forums</h3>

<p>The process is the same for the forums as for the usergroups.</p>

<ol>
<li><p>Go to the forum administration and add the forums you already have on your old forum (or, new ones, the most important thing is that you have somewhere to transfer the old messages). <strong>Make a note of the forum database IDs</strong></p></li>
<li><p>Go to SMF admin and make a note of the forum ids.</p></li>
<li><p>Edit the section in mcp.smf_import.php, around line 249:</p>

<pre><code>$smf_ee_forums_link = array(
    2 =&gt; 2, // Generelt
    5 =&gt; 3, // Offtopic
    7 =&gt; 4,
    3 =&gt; 5,
    4 =&gt; 2,
    34 =&gt; 3,
    9 =&gt; 2
);
</code></pre></li>
</ol>

<h3>Installing the module</h3>

<p>Now that we have everything customized for our need, we&#8217;re ready to upload the module.</p>

<ol>
<li>Copy the mcp.smf_import.php file to modules/smf_import</li>
<li>Copy the lang.smf_import.php to language/</li>
<li>Click &#8220;Install&#8221; like you usually do with modules</li>
</ol>

<p>Voilá &#8211; and on to the next step:</p>

<h3>Importing the users</h3>

<ol>
<li>Go to the &#8220;Modules&#8221; tab in EE admin</li>
<li>Ok, this might seem a bit weird, but I told you it was scratch-an-itch software so &#8212; for some reason you won&#8217;t get a clickable &#8220;SMF Import&#8221; link. Thus, click one of the other modules (e.g. Referer) and replace the end in the URL (e.g. &#8220;M=Referer&#8221;) with &#8220;M=smf_import&#8221; &#8211;> then you should see the SMF import dialog <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>To import the users click &#8220;Import SMF users&#8221;. This will be a memory intensive operation! (I converted 3000 members and needed to ask my host to up my ram during the operation, anyway).</li>
</ol>

<p>You should now have imported all users.</p>

<h3>Importing the forum posts</h3>

<ol>
<li>Go back to the SMF_import dialog and click &#8220;Import forum posts&#8221;.</li>
<li>Go to EE Admin tools and run all the &#8220;recount statistics&#8221; stuff for members and forum <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ol>

<p>That&#8217;s it.</p>

<p>Enjoy <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>You can do whatever you want with this script &#8211; if you do decide to improve it please drop me a note so I can let everyone know <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  (e.g. one good idea would be to do the users convert in batches instead of all at once).</p>

<p>As a last note &#8211; <strong>I&#8217;ve converted my forum from <a href="http://www.invisionpower.com">InvisionBoard</a>, then to <a href="http://www.phpbb.com">phpBB</a>, and finally to <a href="http://www.simplemachines.org">SimpleMachines</a></strong>. So, whatever you&#8217;re using it should be possible to do the convert (just search around for converters from those others to SMF and use this from SMF to <a href="http://www.expressionengine.com/index.php?affiliate=bjorn">ExpressionEngine</a>. Yes, it&#8217;s quite a task but it&#8217;s possible <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p><strong>And if I saved you some time and you feel like buying me a beer my PayPal account is bjorn@root.no</strong> <img src='http://www.bybjorn.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bybjorn.com/71/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
