<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
		<link>https://punbb.informer.com/forums/topic/22611/midwestlanpartycom-vbulletin-to-punbb-conversion/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/22611/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in MidwestLanparty.com (vBulletin to punBB conversion).]]></description>
		<lastBuildDate>Thu, 13 May 2010 15:33:26 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/135287/#p135287</link>
			<description><![CDATA[<p>nice script</p>]]></description>
			<author><![CDATA[null@example.com (fantasma)]]></author>
			<pubDate>Thu, 13 May 2010 15:33:26 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/135287/#p135287</guid>
		</item>
		<item>
			<title><![CDATA[Re: MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/135276/#p135276</link>
			<description><![CDATA[<p><img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><br /><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thanks for the suggestion you give that&#039;s very helpful&nbsp; for me and to others too <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><p><a href="http://creditcard.net.ph/"><span style="color: #f9f9f9"><span class="bbu">credit card</span></span></a></p><br /><p><a href="http://creditcard.net.ph/credit-card-application"><span style="color: #f9f9f9"><span class="bbu">credit card application</span></span></a></p><br /><br /><p>Thanks and regards</p>]]></description>
			<author><![CDATA[null@example.com (orangewine6)]]></author>
			<pubDate>Wed, 12 May 2010 15:39:15 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/135276/#p135276</guid>
		</item>
		<item>
			<title><![CDATA[Re: MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/135004/#p135004</link>
			<description><![CDATA[<p>I have vBulletin on one of my sites. I only have a few hundred members but was there any issues with anyone when using this script? Is there other fixes that work well with converting logins?</p>]]></description>
			<author><![CDATA[null@example.com (barsrmerrill)]]></author>
			<pubDate>Fri, 30 Apr 2010 17:36:43 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/135004/#p135004</guid>
		</item>
		<item>
			<title><![CDATA[Re: MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/132721/#p132721</link>
			<description><![CDATA[<p>It&#039;s not pretty, but I&#039;m sure it can be easily tied into the existing conversion script (or hopefully one that works with 1.3 in the future).</p><p>Convert avatars (run this in the /img/avatars/ directory):<br /></p><div class="codebox"><pre><code>&lt;?php
  /* db info &amp; connect */
  $db_name = &#039;vbulletin_db&#039;;
  $db_username = &#039;username&#039;;
  $db_password = &#039;password&#039;;
  $conn = mysql_connect(localhost, $db_username, $db_password);
  mysql_select_db($db_name);
  
  /* query */
  $sql = &quot;select userid, filedata, filename from customavatar where filename != &#039;&#039;&quot;;
  $result = mysql_query($sql);

  /* parse the rows for avatar information, default to jpg
  /* and output in format &quot;userid.format&quot; - run this 
  /* script from within the img/avatars directory */
  while($row = mysql_fetch_assoc($result)){
    $file_type = explode(&quot;.&quot;, strtolower($row[&#039;filename&#039;]));
    if($file_type[1] == null){ $file_type[1] = &#039;jpg&#039;; }
    if($file_type[1] == &quot;jpeg&quot;){ $file_type[1] = &#039;jpg&#039;; }
    $filename = $row[&#039;userid&#039;].&quot;.&quot;.$file_type[1];
    echo &quot;Saving: &quot;.$filename.&quot;...&lt;br&gt;&quot;;
    $fp = fopen(&quot;./&quot;.$filename,&quot;w&quot;);
    fwrite($fp, $row[&#039;filedata&#039;]);
    fclose($fp);
  }
?&gt;</code></pre></div><p>I regret to say the code for the PM conversion is lost it seems, I probably overwrote the file when writing the avatar converter; however it was not difficult and I can probably throw it together in a few minutes when I have some time.</p><p>Here are the bits I modified in the login script to allow for vBulletin passwords:</p><p>First, I added a new column to the users table; called vb_salt. I then did a query of:<br /></p><div class="codebox"><pre><code>UPDATE punbb.users SET vb_salt = (select userid, salt from vb.user where users.id = user.userid), punbb.password = (select user.password from vb.user where users.id = user.userid)</code></pre></div><p>This pulls the old password and the salt from vBulletin&#039;s database over to the punBB database on a per-userid basis. Once this was done, I first modified the login code in login.php</p><div class="codebox"><pre><code>    // Get user info matching login attempt
    $query = array(
        &#039;SELECT&#039;    =&gt; &#039;u.id, u.group_id, u.password, u.salt, u.vb_salt&#039;,
        &#039;FROM&#039;        =&gt; &#039;users AS u&#039;
    );</code></pre></div><p>..to include the new column vb_salt that was added. The only other change I made was to the actual login logic:</p><div class="codebox"><pre><code>    $authorized = false;
    if (!empty($db_password_hash))
    {
        $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false;
        /** include vb salt stuff here - eventually everyone should 
    /*  migrate to the sha1/salted password that punbb supports natively */
        $form_password_hash = forum_hash($form_password, $salt);

        if ($sha1_in_db &amp;&amp; $db_password_hash == $form_password_hash)
            $authorized = true;
        else if ((!$sha1_in_db &amp;&amp; $db_password_hash == md5(md5($form_password).$vb_salt)) || ($sha1_in_db &amp;&amp; $db_password_hash == sha1($form_password)))
        {
            $authorized = true;

            $salt = random_key(12);
            $form_password_hash = forum_hash($form_password, $salt);

            // There&#039;s an old MD5 hash or an unsalted SHA1 hash in the database, so we replace it
            // with a randomly generated salt and a new, salted SHA1 hash
            $query = array(
                &#039;UPDATE&#039;    =&gt; &#039;users&#039;,
                &#039;SET&#039;        =&gt; &#039;password=\&#039;&#039;.$form_password_hash.&#039;\&#039;, salt=\&#039;&#039;.$forum_db-&gt;escape($salt).&#039;\&#039;&#039;,
                &#039;WHERE&#039;        =&gt; &#039;id=&#039;.$user_id
            );

            ($hook = get_hook(&#039;li_login_qr_update_user_hash&#039;)) ? eval($hook) : null;
            $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);
        }
    }</code></pre></div><p>Basically the old algorithm used in punBB is replaced with vBulletin&#039;s hashing algorithm. Once a user logs in the logic detects that an MD5 hash is used and generates the SHA1 hash. </p><p>I almost didn&#039;t switch to punBB because the existing (outdated!) migration script did not support migration of passwords, had I not found this method of utilizing them I would never have switched (too much of a hassle to ask users to &#039;reset&#039; their password).</p><p>Edit: Upon checking the conversion script it looks like there is a &#039;removed&#039; function to migrate PMs and polls. Wish I&#039;d have known that existed!</p>]]></description>
			<author><![CDATA[null@example.com (kagaku)]]></author>
			<pubDate>Mon, 07 Dec 2009 18:39:04 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/132721/#p132721</guid>
		</item>
		<item>
			<title><![CDATA[Re: MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/132715/#p132715</link>
			<description><![CDATA[<p>You have done a great work! Could you share your DB migrating script, please? There are users who want to migrate from vBulletin.</p>]]></description>
			<author><![CDATA[null@example.com (Slavok)]]></author>
			<pubDate>Mon, 07 Dec 2009 09:25:38 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/132715/#p132715</guid>
		</item>
		<item>
			<title><![CDATA[MidwestLanparty.com (vBulletin to punBB conversion)]]></title>
			<link>https://punbb.informer.com/forums/post/132685/#p132685</link>
			<description><![CDATA[<p>I&#039;ve recently converted a forum I administer from vBulletin 3.x to punBB. Converting a medium-sized forum consisting of 70,000 posts was a bit of a challenge, however punBB is definitely much faster and leaner than vBulletin could ever hope to be.</p><p>You can check it out here: <a href="http://www.midwestlanparty.com">MidwestLanparty.com</a></p><p>Some notes:</p><p>Using quite a few extensions, among note are the CSS/JS &#039;fancy cache&#039; plugin, portal by daris, pun_attachment/poll/move_posts/etc, private messaging and post karma. In addition I&#039;ve done quite a few modifications myself (unfortunately not in extension format, though I might port them over someday) - among them are integration with jquery (for a nice popup calendar, tooltips, bbcode editor and the toggle for the poll settings), a calendar (tied to a specific forum - upcoming events - this is used for tracking new LAN parties and what dates are used/available), thread prefixes (stole this from a vBulletin addon - you can see it in action on the buy/sell/trade forum), and an enhancement to the current format_time function - fuzzy time! You&#039;ll notice the dates will say &quot;less than a minute ago&quot; or &quot;3 days ago&quot;, all the way out to 4 weeks; after that it just displays the actual date. </p><p>There are minor changes elsewhere that I cannot think of, however those are the larger features. I&#039;m planning more additions in the coming months as I get some spare time - among these include using a custom style on a per-forum level. This is a feature I miss from vBulletin. I also had to write a few custom conversion scripts to pull private messages, user titles and avatars over from vBulletin. About the only thing I lost was the attachments, and that&#039;s simply because I didn&#039;t think they were worth the effort of porting over.</p><p>Converting passwords was interesting but I was helped out quite a bit by what looks to be a legacy way of storing passwords in punBB - looks like older versions used MD5 vs. the SHA1 hashing used in newer versions of punBB. With this I was able to import the salt used by vBulletin into my punBB user table and then modify the login code a bit to use that if it finds an MD5&#039;d password. Once the user logs in it&#039;s converted to SHA1 and they never notice! Works perfectly thus far.</p><p>The style is more or less stock punBB Oxygen with few enhancements; I loved the default theme and it actually fit in nearly perfect with our existing &#039;light blue&#039; theme from vBulletin, as you can see by how the default style matches our header image. However we also had a dark style that was used by just under half our users and that also needed to be converted; I regret to say you can only see that one by registering and picking the &#039;Classic&#039; style. Dark black/grey mixed with a bluish teal and our classic (nearly 10 year old) logo on top.</p><p>Overall I&#039;m very happy with how this project turned out. punBB was a dream to customize since the code actually makes sense; I&#039;ve got to say that was one of the first reasons I picked this software over some of the alternatives.</p><p>Thanks for making great software, looking forward to the updates!</p>]]></description>
			<author><![CDATA[null@example.com (kagaku)]]></author>
			<pubDate>Sun, 06 Dec 2009 23:01:24 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/132685/#p132685</guid>
		</item>
	</channel>
</rss>
