<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
	<atom:link href="http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/feed" rel="self" type="application/rss+xml" />
	<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html</link>
	<description>Tiny bits of bioinformatics, [web-]programming etc</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:46:15 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103323</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Sun, 03 Jan 2010 22:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103323</guid>
		<description>I feel a little dumb by not offering the use of &lt;a href=&quot;http://api.drupal.org/api/function/db_query/5&quot; rel=&quot;nofollow&quot;&gt;db_query&lt;/a&gt; in &lt;a href=&quot;http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html?trashed=1&amp;ids=8#comment-103093&quot; rel=&quot;nofollow&quot;&gt;my comment&lt;/a&gt; above - that could have solved the problem Zmeharen had, and improve the script by extending the use of proper Drupal API...

Here&#039;s an example of the proper use of db_query (with 2 substitution variables):
&lt;pre&gt;&lt;code&gt;
  $query = &quot;SELECT nid, title, created FROM &quot; .
    &quot;{node} WHERE created &gt;= &#039;%d&#039; &quot; .
    &quot; AND created &lt;= &#039;%d&#039;&quot;;

  $query_result =  db_query($query, $start_time, $end_time);
&lt;/code&gt;&lt;/pre&gt;

For SELECT, we could then proceed with e.g.
&lt;pre&gt;&lt;code&gt;
while ($links = db_fetch_object($query_result)) {
  // $content .=  $links;
}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->I feel a little dumb by not offering the use of <a href="http://api.drupal.org/api/function/db_query/5" rel="nofollow">db_query</a> in <a href="http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html?trashed=1&#038;ids=8#comment-103093" rel="nofollow">my comment</a> above &#8211; that could have solved the problem Zmeharen had, and improve the script by extending the use of proper Drupal API&#8230;</p>
<p>Here&#8217;s an example of the proper use of db_query (with 2 substitution variables):</p>
<pre><code>
  $query = "SELECT nid, title, created FROM " .
    "{node} WHERE created >= '%d' " .
    " AND created < = '%d'";

  $query_result =  db_query($query, $start_time, $end_time);
</code></code></pre>
<p>For SELECT, we could then proceed with e.g.</p>
<pre><code>
while ($links = db_fetch_object($query_result)) {
  // $content .=  $links;
}
</code></pre>
<p><!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103129</link>
		<dc:creator>zmeharen</dc:creator>
		<pubDate>Sat, 19 Dec 2009 07:10:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103129</guid>
		<description>Hey Bogdan,

Still working on the script.

I was able to figure out the solution to my previous problem, since I created another connection to the drupal database outside the function I had to declare the global database link in the function. I added this in all areas that the global d_sequences was declared.

&lt;blockquote&gt;
	$d_sequences = $GLOBALS[&quot;d_sequences&quot;];
	$link_drupal = $GLOBALS[&quot;link_drupal&quot;];
&lt;/blockquote&gt;

I am now able to get the max id at least for users, but I think this should work for the other areas of the code too.

The second problem that I&#039;m running into is copying the Nuke users and moving them to the Drupal database. Initially in the script this was done with a single INSERT ... SELECT query. This is doable in the script if you have the same username and password for both databases. This was not going to work with me however. I decided then to divide the query into two sections. 

First to execute the SELECT query on the Nuke database. Then loop through the results and INSERT them individually into the drupal database.

Here is that section of the code, and this is all I have so far.

&lt;pre&gt;&lt;code&gt;
$maxuid = get_max_id(&quot;users_uid&quot;);
message(&quot;Transferring User Details to Drupal.&quot;);
$query = &quot;SELECT user_id, username, user_password, user_email, user_regdate, user_lastvisit, user_email&quot;;
$query .= &quot; FROM $n_users&quot;;
$query .= &quot; WHERE 1=1&quot;;
for ($i = 0; $i &lt; count($user_array); $i++) {
	$query .= &quot; AND username != &#039;$user_array[$i]&#039; &quot;;
}
message(&quot;$query&quot;);
$result = mysql_query($query, $link);
while ( $row = mysql_fetch_array($result, MYSQL_NUM) ) {
	//set user id
	$u_id = $row[0]+$maxuid+1;
	$date_c = strtotime($row[4]);
	//$date_created = UNIX_TIMESTAMP(STR_TO_DATE($row[4], &#039;%b %d, %Y&#039;));
	$query = &quot;INSERT into $d_users(uid, name, pass, mail, created, access, status, init, data) &quot;;
	$query .= &quot;VALUES ($u_id, &#039;$row[1]&#039;, &#039;$row[2]&#039;, &#039;$row[3]&#039;, $date_c, &#039;$row[5]&#039;, 1, &#039;$row[6]&#039;, &#039;$role_string&#039;) &quot;;
	message(&quot; $query &quot;);
	$result = mysql_query($query, $link_drupal);
	if ($result) {
		// ...
	}
	else {
		failure(&quot;Users could not be added.&quot;);
		echo &quot;Query used: $query ; \n&quot;;
		echo &quot;Error returned by MySQL: (&quot; . mysql_errno() . &quot;) &quot; . mysql_error() . &quot; \n&quot;;
		exit();
	}
}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hey Bogdan,</p>
<p>Still working on the script.</p>
<p>I was able to figure out the solution to my previous problem, since I created another connection to the drupal database outside the function I had to declare the global database link in the function. I added this in all areas that the global d_sequences was declared.</p>
<blockquote><p>
	$d_sequences = $GLOBALS["d_sequences"];<br />
	$link_drupal = $GLOBALS["link_drupal"];
</p></blockquote>
<p>I am now able to get the max id at least for users, but I think this should work for the other areas of the code too.</p>
<p>The second problem that I&#8217;m running into is copying the Nuke users and moving them to the Drupal database. Initially in the script this was done with a single INSERT &#8230; SELECT query. This is doable in the script if you have the same username and password for both databases. This was not going to work with me however. I decided then to divide the query into two sections. </p>
<p>First to execute the SELECT query on the Nuke database. Then loop through the results and INSERT them individually into the drupal database.</p>
<p>Here is that section of the code, and this is all I have so far.</p>
<pre><code>
$maxuid = get_max_id("users_uid");
message("Transferring User Details to Drupal.");
$query = "SELECT user_id, username, user_password, user_email, user_regdate, user_lastvisit, user_email";
$query .= " FROM $n_users";
$query .= " WHERE 1=1";
for ($i = 0; $i < count($user_array); $i++) {
	$query .= " AND username != '$user_array[$i]' ";
}
message("$query");
$result = mysql_query($query, $link);
while ( $row = mysql_fetch_array($result, MYSQL_NUM) ) {
	//set user id
	$u_id = $row[0]+$maxuid+1;
	$date_c = strtotime($row[4]);
	//$date_created = UNIX_TIMESTAMP(STR_TO_DATE($row[4], '%b %d, %Y'));
	$query = "INSERT into $d_users(uid, name, pass, mail, created, access, status, init, data) ";
	$query .= "VALUES ($u_id, '$row[1]', '$row[2]', '$row[3]', $date_c, '$row[5]', 1, '$row[6]', '$role_string') ";
	message(" $query ");
	$result = mysql_query($query, $link_drupal);
	if ($result) {
		// ...
	}
	else {
		failure("Users could not be added.");
		echo "Query used: $query ; \n";
		echo "Error returned by MySQL: (" . mysql_errno() . ") " . mysql_error() . " \n";
		exit();
	}
}
</code></code></pre>
<p><!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103095</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 15 Dec 2009 22:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103095</guid>
		<description>You can send the updated script to me at &lt;strong&gt;webmaster _at_ bogdan.org.ua&lt;/strong&gt;, I&#039;ll post it here within a few days.

Your problem is similar to what is discussed in comments 65-68 on this page. This shouldn&#039;t be happening for Drupal 5. However, you could try using my suggestions in comments 65-68 (from comment 68, for users, you would only need to set sequences.users_uid to whatever is the maximum or maximum+1 of the users table).</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->You can send the updated script to me at <strong>webmaster _at_ bogdan.org.ua</strong>, I&#8217;ll post it here within a few days.</p>
<p>Your problem is similar to what is discussed in comments 65-68 on this page. This shouldn&#8217;t be happening for Drupal 5. However, you could try using my suggestions in comments 65-68 (from comment 68, for users, you would only need to set sequences.users_uid to whatever is the maximum or maximum+1 of the users table).<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103094</link>
		<dc:creator>zmeharen</dc:creator>
		<pubDate>Tue, 15 Dec 2009 21:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103094</guid>
		<description>Thanks for the quick reply Bogden,

Thats exactly the approach i made. I was easily able to find all insert and update queries to adjust to the drupal database. Where do I post my final working version?

I think I&#039;ve done all I could now I&#039;m still stuck at the beginning and I&#039;m not sure why.

Here&#039;s what the script has done and the error I recieved.

Giving blank user names a default value (their login)
UPDATE d*******1.nuke_users set name=username where name=&#039;&#039;
Default values set..(1 rows affected)
MySQL Error: Max ID for users_uid could not be retrieved
 Back To Main?
Query used to get the Max ID: SELECT id FROM d*******7.sequences WHERE name=&#039;users_uid&#039; ; Error returned by MySQL: (0) 

I&#039;ve placed the *** for the database names for safety.

Here is the code I&#039;ve changed in the get_max_id function:

&lt;code&gt;
        function get_max_id($field)
	{
		//message(&quot;Getting Max ID for $field&quot;);
		$d_sequences = $GLOBALS[&quot;d_sequences&quot;];
		$query = &quot;SELECT id FROM $d_sequences WHERE name=&#039;$field&#039;&quot;;
		$result = mysql_query($query, $link_drupal);
		if ($row = mysql_fetch_object($result))
		{
			//success(&quot;Max ID for $field retrieved!&quot;);
			return($row-&gt;id);
		}
		else
		{
			failure(&quot;MySQL Error: Max ID for $field could not be retrieved&quot;);
			echo &quot; Query used to get the Max ID: $query ; \n&quot;;
			echo &quot; Error returned by MySQL: (&quot; . mysql_errno() . &quot;) &quot; . mysql_error() . &quot; \n&quot;;
			exit();
		}
	}
&lt;/code&gt;

As you can see i&#039;ve changed the $link to $link_drupal.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Thanks for the quick reply Bogden,</p>
<p>Thats exactly the approach i made. I was easily able to find all insert and update queries to adjust to the drupal database. Where do I post my final working version?</p>
<p>I think I&#8217;ve done all I could now I&#8217;m still stuck at the beginning and I&#8217;m not sure why.</p>
<p>Here&#8217;s what the script has done and the error I recieved.</p>
<p>Giving blank user names a default value (their login)<br />
UPDATE d*******1.nuke_users set name=username where name=&#8221;<br />
Default values set..(1 rows affected)<br />
MySQL Error: Max ID for users_uid could not be retrieved<br />
 Back To Main?<br />
Query used to get the Max ID: SELECT id FROM d*******7.sequences WHERE name=&#8217;users_uid&#8217; ; Error returned by MySQL: (0) </p>
<p>I&#8217;ve placed the *** for the database names for safety.</p>
<p>Here is the code I&#8217;ve changed in the get_max_id function:</p>
<p><code><br />
        function get_max_id($field)<br />
	{<br />
		//message("Getting Max ID for $field");<br />
		$d_sequences = $GLOBALS["d_sequences"];<br />
		$query = "SELECT id FROM $d_sequences WHERE name='$field'";<br />
		$result = mysql_query($query, $link_drupal);<br />
		if ($row = mysql_fetch_object($result))<br />
		{<br />
			//success("Max ID for $field retrieved!");<br />
			return($row-&gt;id);<br />
		}<br />
		else<br />
		{<br />
			failure("MySQL Error: Max ID for $field could not be retrieved");<br />
			echo " Query used to get the Max ID: $query ; \n";<br />
			echo " Error returned by MySQL: (" . mysql_errno() . ") " . mysql_error() . " \n";<br />
			exit();<br />
		}<br />
	}<br />
</code></p>
<p>As you can see i&#8217;ve changed the $link to $link_drupal.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103093</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 15 Dec 2009 20:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103093</guid>
		<description>This should be easy.

First, in addition to these:
&lt;blockquote&gt;$host = &quot;localhost&quot;; //Host address for MySQL
$username = &quot;root&quot;; //Username to connect to MySQL
$password = &quot;&quot;; //Password to connect to MySQL
&lt;/blockquote&gt;
add something like
&lt;blockquote&gt;$host_drupal = &quot;localhost&quot;; //Host address for Drupal MySQL
$username_drupal = &quot;root&quot;; //Username to connect to Drupal MySQL
$password_drupal = &quot;&quot;; //Password to connect to Drupal MySQL
&lt;/blockquote&gt;

It might be nice to rename $host and company into $host_nuke, ...

Then, around lines 268-282, modify the code to connect to 2 databases, and store an extra database link in e.g. $link_drupal variable.

After that, you will have to look for each and every MySQL $query to modify it, so that is uses either $link[_nuke] or $link_drupal.

I&#039;m not doing that myself, as I am currently very badly pressed for time, and wouldn&#039;t be able to test the modified version anyway. However, feel free to ask if you encounter any problems while modifying the script.

Also, please do not forget to share your final working version.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->This should be easy.</p>
<p>First, in addition to these:</p>
<blockquote><p>$host = &#8220;localhost&#8221;; //Host address for MySQL<br />
$username = &#8220;root&#8221;; //Username to connect to MySQL<br />
$password = &#8220;&#8221;; //Password to connect to MySQL
</p></blockquote>
<p>add something like</p>
<blockquote><p>$host_drupal = &#8220;localhost&#8221;; //Host address for Drupal MySQL<br />
$username_drupal = &#8220;root&#8221;; //Username to connect to Drupal MySQL<br />
$password_drupal = &#8220;&#8221;; //Password to connect to Drupal MySQL
</p></blockquote>
<p>It might be nice to rename $host and company into $host_nuke, &#8230;</p>
<p>Then, around lines 268-282, modify the code to connect to 2 databases, and store an extra database link in e.g. $link_drupal variable.</p>
<p>After that, you will have to look for each and every MySQL $query to modify it, so that is uses either $link[_nuke] or $link_drupal.</p>
<p>I&#8217;m not doing that myself, as I am currently very badly pressed for time, and wouldn&#8217;t be able to test the modified version anyway. However, feel free to ask if you encounter any problems while modifying the script.</p>
<p>Also, please do not forget to share your final working version.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-103092</link>
		<dc:creator>zmeharen</dc:creator>
		<pubDate>Tue, 15 Dec 2009 20:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-103092</guid>
		<description>Hey Bogdan and/or Waldo

I&#039;m making my first migration from Nuke 7.5 to drupal 5 and hopefully next to 6 from there.

I love the migrate script and it seems to be very handy. My main object is to move the users and articles/stories.

The problem I&#039;m having is with the database connections. Your script assumes that there is only one MySql host username and password for both nuke and drupal. However my domain host has my drupal and nuke databases with different user names and passwords. I attempted to add the same users and passwords in each but when I create new users I&#039;m not given permission to specify the username and when I attempt to change the password I get massive errors.

The script is able to connect to the nuke database but the drupal database being seperate is the issue.

My next option is to change the migrate code to reflect the two different databases and their respective usernames. I think I have a general idea just by reading the code but if you can instruct me as to what areas need to have what changed so I don&#039;t miss anything it would be greatly appreciated.

Thank You.

Zmeharen</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hey Bogdan and/or Waldo</p>
<p>I&#8217;m making my first migration from Nuke 7.5 to drupal 5 and hopefully next to 6 from there.</p>
<p>I love the migrate script and it seems to be very handy. My main object is to move the users and articles/stories.</p>
<p>The problem I&#8217;m having is with the database connections. Your script assumes that there is only one MySql host username and password for both nuke and drupal. However my domain host has my drupal and nuke databases with different user names and passwords. I attempted to add the same users and passwords in each but when I create new users I&#8217;m not given permission to specify the username and when I attempt to change the password I get massive errors.</p>
<p>The script is able to connect to the nuke database but the drupal database being seperate is the issue.</p>
<p>My next option is to change the migrate code to reflect the two different databases and their respective usernames. I think I have a general idea just by reading the code but if you can instruct me as to what areas need to have what changed so I don&#8217;t miss anything it would be greatly appreciated.</p>
<p>Thank You.</p>
<p>Zmeharen<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102688</link>
		<dc:creator>Waldo</dc:creator>
		<pubDate>Sun, 01 Nov 2009 22:20:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102688</guid>
		<description>Hey-- if/when you do get it working for d6, can you post your modified script for more people to use? 

Send to Bogdan and/or post here:

http://drupal.org/node/498

Thx!

W</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hey&#8211; if/when you do get it working for d6, can you post your modified script for more people to use? </p>
<p>Send to Bogdan and/or post here:</p>
<p><a href="http://drupal.org/node/498" rel="nofollow">http://drupal.org/node/498</a></p>
<p>Thx!</p>
<p>W<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102594</link>
		<dc:creator>catella</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102594</guid>
		<description>Thanks!!! It worked (for users) I&#039;m trying to understand what&#039;s was wrong with stories and forum....
Bye and thanks again!</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Thanks!!! It worked (for users) I&#8217;m trying to understand what&#8217;s was wrong with stories and forum&#8230;.<br />
Bye and thanks again!<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102592</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 20 Oct 2009 10:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102592</guid>
		<description>Here&#039;s what I have:

CREATE TABLE IF NOT EXISTS `sequences` (
  `name` varchar(255) NOT NULL default &#039;&#039;,
  `id` int(10) unsigned NOT NULL default &#039;0&#039;,
  PRIMARY KEY  (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sequences`
--

INSERT INTO `sequences` (`name`, `id`) VALUES
(&#039;menu_mid&#039;, 140),
(&#039;users_uid&#039;, 84),
(&#039;vocabulary_vid&#039;, 2),
(&#039;node_nid&#039;, 265),
(&#039;node_revisions_vid&#039;, 265),
(&#039;i18n_node_trid&#039;, 4),
(&#039;aggregator_category_cid&#039;, 5),
(&#039;aggregator_feed_fid&#039;, 15),
(&#039;aggregator_item_iid&#039;, 1697853),
(&#039;comments_cid&#039;, 440),
(&#039;term_data_tid&#039;, 24),
(&#039;i18n_blocks_delta&#039;, 1);

I&#039;m not sure if you have to pre-populate the table with some values, but it won&#039;t hurt if you do - just set all the values to whatever is the maximum of the mentioned ID.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Here&#8217;s what I have:</p>
<p>CREATE TABLE IF NOT EXISTS `sequences` (<br />
  `name` varchar(255) NOT NULL default &#8221;,<br />
  `id` int(10) unsigned NOT NULL default &#8216;0&#8242;,<br />
  PRIMARY KEY  (`name`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=utf8;</p>
<p>&#8211;<br />
&#8211; Dumping data for table `sequences`<br />
&#8211;</p>
<p>INSERT INTO `sequences` (`name`, `id`) VALUES<br />
(&#8216;menu_mid&#8217;, 140),<br />
(&#8216;users_uid&#8217;, 84),<br />
(&#8216;vocabulary_vid&#8217;, 2),<br />
(&#8216;node_nid&#8217;, 265),<br />
(&#8216;node_revisions_vid&#8217;, 265),<br />
(&#8216;i18n_node_trid&#8217;, 4),<br />
(&#8216;aggregator_category_cid&#8217;, 5),<br />
(&#8216;aggregator_feed_fid&#8217;, 15),<br />
(&#8216;aggregator_item_iid&#8217;, 1697853),<br />
(&#8216;comments_cid&#8217;, 440),<br />
(&#8216;term_data_tid&#8217;, 24),<br />
(&#8216;i18n_blocks_delta&#8217;, 1);</p>
<p>I&#8217;m not sure if you have to pre-populate the table with some values, but it won&#8217;t hurt if you do &#8211; just set all the values to whatever is the maximum of the mentioned ID.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102591</link>
		<dc:creator>catella</dc:creator>
		<pubDate>Tue, 20 Oct 2009 10:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102591</guid>
		<description>Thanks for the quick answer. I think the easiest way for me is create the table and then delete it, but.....
Can you tell me the structure of the table sequences?? Sorry but I&#039;m new for Drupal....</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Thanks for the quick answer. I think the easiest way for me is create the table and then delete it, but&#8230;..<br />
Can you tell me the structure of the table sequences?? Sorry but I&#8217;m new for Drupal&#8230;.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102590</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 20 Oct 2009 10:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102590</guid>
		<description>You have 3 options:
- migrate to Drupal 5 first, then upgrade to Drupal 6
- modify the script
- solution #3 (at the very bottom of this comment)

To modify the script, you will only need to know this:
&lt;a href=&quot;http://drupal.org/node/114774#db_last_insert_id&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/node/114774#db_last_insert_id&lt;/a&gt;

It is clear that set_max_id() function is now obsolete, and get_max_id() will have to be modified (I believe one could either call Drupal&#039;s db_last_insert_id(), or just SELECT the ID column, ORDERED BY ID DESC).

Alternatively, you can manually create the &quot;sequences&quot; table in your Drupal 6 database (preserving the structure it had in Drupal 5), run the import (if there are no other errors), then just delete the sequences table you created.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->You have 3 options:<br />
- migrate to Drupal 5 first, then upgrade to Drupal 6<br />
- modify the script<br />
- solution #3 (at the very bottom of this comment)</p>
<p>To modify the script, you will only need to know this:<br />
<a href="http://drupal.org/node/114774#db_last_insert_id" rel="nofollow">http://drupal.org/node/114774#db_last_insert_id</a></p>
<p>It is clear that set_max_id() function is now obsolete, and get_max_id() will have to be modified (I believe one could either call Drupal&#8217;s db_last_insert_id(), or just SELECT the ID column, ORDERED BY ID DESC).</p>
<p>Alternatively, you can manually create the &#8220;sequences&#8221; table in your Drupal 6 database (preserving the structure it had in Drupal 5), run the import (if there are no other errors), then just delete the sequences table you created.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-102589</link>
		<dc:creator>catella</dc:creator>
		<pubDate>Tue, 20 Oct 2009 09:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-102589</guid>
		<description>Hi I&#039;m trying to use the migrate.php script to leave phpnuke and move everything (almost) in Drupal 6.14, when I run the script it says &lt;i&gt;Query used to get the Max ID: SELECT id FROM xxxx.sequences WHERE name=&#039;users_uid&#039; ; Error returned by MySQL: (1146) Table &#039;xxxx.sequences&#039; doesn&#039;t exist &lt;/i&gt; I&#039;ve seen that this table doesn&#039;t exist anymore in version later than 6.....
How can I do?
Thanks</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi I&#8217;m trying to use the migrate.php script to leave phpnuke and move everything (almost) in Drupal 6.14, when I run the script it says <i>Query used to get the Max ID: SELECT id FROM xxxx.sequences WHERE name=&#8217;users_uid&#8217; ; Error returned by MySQL: (1146) Table &#8216;xxxx.sequences&#8217; doesn&#8217;t exist </i> I&#8217;ve seen that this table doesn&#8217;t exist anymore in version later than 6&#8230;..<br />
How can I do?<br />
Thanks<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-86930</link>
		<dc:creator>David L</dc:creator>
		<pubDate>Tue, 11 Nov 2008 12:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-86930</guid>
		<description>Disregard my previous post.. I did an install of Drupal 5.12, and the conversion worked! I had an error that the users could not be imported, but found that they had been brought into the system.  I then changed the url to =stories to move to the second step.

cheers,
David.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Disregard my previous post.. I did an install of Drupal 5.12, and the conversion worked! I had an error that the users could not be imported, but found that they had been brought into the system.  I then changed the url to =stories to move to the second step.</p>
<p>cheers,<br />
David.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-86901</link>
		<dc:creator>David L</dc:creator>
		<pubDate>Mon, 10 Nov 2008 13:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-86901</guid>
		<description>G&#039;day, I&#039;m another PHPNuke user (8.1) looking to make the leap to Drupal 6.x. If someone is successfully able to make the migration work on their own site, I&#039;d love to know how you did it.

cheers,
David.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->G&#8217;day, I&#8217;m another PHPNuke user (8.1) looking to make the leap to Drupal 6.x. If someone is successfully able to make the migration work on their own site, I&#8217;d love to know how you did it.</p>
<p>cheers,<br />
David.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-78364</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 15 Aug 2008 13:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-78364</guid>
		<description>Maniaka,

no new version. If you are willing to create such a version, I&#039;ll do my best to help you. Also, if you could come up with the list of changes necessary to make the current script work for nuke7-2-drupal6 conversion, I &lt;i&gt;might&lt;/i&gt; modify the script appropriately for you to test.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Maniaka,</p>
<p>no new version. If you are willing to create such a version, I&#8217;ll do my best to help you. Also, if you could come up with the list of changes necessary to make the current script work for nuke7-2-drupal6 conversion, I <i>might</i> modify the script appropriately for you to test.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-78272</link>
		<dc:creator>Maniaka</dc:creator>
		<pubDate>Thu, 14 Aug 2008 23:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-78272</guid>
		<description>No new version for Nuke 7.X to Drupal 6.X?

Thx</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->No new version for Nuke 7.X to Drupal 6.X?</p>
<p>Thx<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-70516</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Sat, 07 Jun 2008 06:43:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-70516</guid>
		<description>Nilsja,

you could just remove that line (starting with &lt;em&gt;UPDATE&lt;/em&gt; and with &lt;em&gt;set name=username where name=&#039;&#039;&lt;/em&gt; substring) from the migration script, to see which error you might get next, and how to fix that next error.

This one - &lt;em&gt;Default values cannot be set&lt;/em&gt; - isn&#039;t IMO critical, you can safely skip that.

I only wonder why would this error pop up at all on such a simple query... have no idea yet.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Nilsja,</p>
<p>you could just remove that line (starting with <em>UPDATE</em> and with <em>set name=username where name=&#8221;</em> substring) from the migration script, to see which error you might get next, and how to fix that next error.</p>
<p>This one &#8211; <em>Default values cannot be set</em> &#8211; isn&#8217;t IMO critical, you can safely skip that.</p>
<p>I only wonder why would this error pop up at all on such a simple query&#8230; have no idea yet.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-70375</link>
		<dc:creator>nilsja</dc:creator>
		<pubDate>Thu, 05 Jun 2008 09:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-70375</guid>
		<description>Hi Waldo,

i&#039;m trying to migrate from Nuke 6.0 to Drupal 6. Is it possible, with this script and a detour over drupal 5.7, to manage this?

for now, i get the following error:
&lt;code&gt;Migrating users:
Giving blank user names a default value (their login)
UPDATE testa.ecolode_users set name=username where name=&#039;&#039;
Default values could not be set&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi Waldo,</p>
<p>i&#8217;m trying to migrate from Nuke 6.0 to Drupal 6. Is it possible, with this script and a detour over drupal 5.7, to manage this?</p>
<p>for now, i get the following error:<br />
<code>Migrating users:<br />
Giving blank user names a default value (their login)<br />
UPDATE testa.ecolode_users set name=username where name=''<br />
Default values could not be set</code><!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-59101</link>
		<dc:creator>Waldo</dc:creator>
		<pubDate>Sun, 09 Mar 2008 20:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-59101</guid>
		<description>Or just create a forum.

W</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Or just create a forum.</p>
<p>W<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-57481</link>
		<dc:creator>Ty</dc:creator>
		<pubDate>Mon, 03 Mar 2008 05:18:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-57481</guid>
		<description>Try adding One &quot;Vocabulary&quot; and also One &quot;Term&quot; and see if it works or not.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Try adding One &#8220;Vocabulary&#8221; and also One &#8220;Term&#8221; and see if it works or not.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-57323</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Sun, 02 Mar 2008 13:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-57323</guid>
		<description>Hi Bogdan,

Carlos&#039; back :( I am migrating another phpnuke website -the second and the last one, promise ;) - and I get this error when importing stories:

Migrating story Categories:
MySQL Error: Max ID for vocabulary_vid could not be retrieved
 Back To Main?
Query used to get the Max ID: SELECT id FROM asf_drupal.sequences WHERE name=&#039;vocabulary_vid&#039; ; Error returned by MySQL: (0)

I have read that another user had the same problem and you told him to add two lines which are already added at my file. I get the qery, which is empty at drupal&#039;s database, but I don&#039;t know what to do with it.

Thanks</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi Bogdan,</p>
<p>Carlos&#8217; back <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I am migrating another phpnuke website -the second and the last one, promise <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8211; and I get this error when importing stories:</p>
<p>Migrating story Categories:<br />
MySQL Error: Max ID for vocabulary_vid could not be retrieved<br />
 Back To Main?<br />
Query used to get the Max ID: SELECT id FROM asf_drupal.sequences WHERE name=&#8217;vocabulary_vid&#8217; ; Error returned by MySQL: (0)</p>
<p>I have read that another user had the same problem and you told him to add two lines which are already added at my file. I get the qery, which is empty at drupal&#8217;s database, but I don&#8217;t know what to do with it.</p>
<p>Thanks<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-2#comment-54269</link>
		<dc:creator>Waldo</dc:creator>
		<pubDate>Thu, 21 Feb 2008 08:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-54269</guid>
		<description>I should also point out this point in the code:

&lt;code&gt;

		$config = array(
			&#039;logical-emphasis&#039; =&gt; true,
			&#039;DocType&#039; =&gt; &#039;omit&#039;,
			&#039;drop-empty-paras&#039; =&gt; false,
			&#039;indent&#039;         =&gt; true,
			&#039;wrap&#039;          =&gt; 0,
			&#039;output-html&#039;   =&gt; true,
			&#039;char-encoding&#039; =&gt; &#039;utf8&#039;,
			&#039;input-encoding&#039; =&gt; &#039;latin1&#039;,  // change as necessary.  most older mysql DBs are latin1
			&#039;output-encoding&#039; =&gt; &#039;utf8&#039;,
			&#039;hide-endtags&#039; =&gt; true,
			&#039;replace-color&#039; =&gt; true,
			&#039;show-body-only&#039; =&gt; true);&lt;/code&gt;

notice that when &quot;tidy&quot; cleans, it assumes certain encodings.  UTF8 people may want to change this...

W</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->I should also point out this point in the code:</p>
<p><code></p>
<p>		$config = array(<br />
			'logical-emphasis' =&gt; true,<br />
			'DocType' =&gt; 'omit',<br />
			'drop-empty-paras' =&gt; false,<br />
			'indent'         =&gt; true,<br />
			'wrap'          =&gt; 0,<br />
			'output-html'   =&gt; true,<br />
			'char-encoding' =&gt; 'utf8',<br />
			'input-encoding' =&gt; 'latin1',  // change as necessary.  most older mysql DBs are latin1<br />
			'output-encoding' =&gt; 'utf8',<br />
			'hide-endtags' =&gt; true,<br />
			'replace-color' =&gt; true,<br />
			'show-body-only' =&gt; true);</code></p>
<p>notice that when &#8220;tidy&#8221; cleans, it assumes certain encodings.  UTF8 people may want to change this&#8230;</p>
<p>W<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-54266</link>
		<dc:creator>Waldo</dc:creator>
		<pubDate>Thu, 21 Feb 2008 08:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-54266</guid>
		<description>Carlos--

AWESOME!  Congratulations!!!  It&#039;s seriously great to see that the code is working for others!

Bogdan--

Yes, the two modules &quot;CCK&quot; and &quot;Views&quot; are absolute necessities for any installation of Drupal, in my opinion.  They are the two pillars that make Drupal really excel.  They are more than mere modules ;)

In any event, you can always do a little auto-detection to check to see if they are installed before offering those last steps.  I did something like this to check if the php &quot;tidy&quot; extension was installed before using it to clean up the text.

In this case, by using the drupal &lt;a href=&quot;http://api.drupal.org&quot; rel=&quot;nofollow&quot;&gt;API&lt;/a&gt;, you could say:

if module_exists(&quot;cck&quot;) { insert all my code } else {echo &quot;CCK not available.&quot;;}

Among my code is the CCK import for a content type.  I&#039;m not sure exactly how to get CCK to do the import via code as opposed to the user interface.  It might be worth asking on the CCK forum.  It may be as simple as using &lt;a href=&quot;http://api.drupal.org/api/function/drupal_execute/5&quot; rel=&quot;nofollow&quot;&gt;drupal_execute()&lt;/a&gt;, but I&#039;m not 100% sure about how to import CCK stuff without using a browser.

Finally-- I wonder how well (or if) the code would work with Drupal 6?  Assuming the API remains relatively constant, most of my code might still work, although the non-API stuff written by others before I made my changes may not.  Would be an interesting experiment..</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Carlos&#8211;</p>
<p>AWESOME!  Congratulations!!!  It&#8217;s seriously great to see that the code is working for others!</p>
<p>Bogdan&#8211;</p>
<p>Yes, the two modules &#8220;CCK&#8221; and &#8220;Views&#8221; are absolute necessities for any installation of Drupal, in my opinion.  They are the two pillars that make Drupal really excel.  They are more than mere modules <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In any event, you can always do a little auto-detection to check to see if they are installed before offering those last steps.  I did something like this to check if the php &#8220;tidy&#8221; extension was installed before using it to clean up the text.</p>
<p>In this case, by using the drupal <a href="http://api.drupal.org" rel="nofollow">API</a>, you could say:</p>
<p>if module_exists(&#8220;cck&#8221;) { insert all my code } else {echo &#8220;CCK not available.&#8221;;}</p>
<p>Among my code is the CCK import for a content type.  I&#8217;m not sure exactly how to get CCK to do the import via code as opposed to the user interface.  It might be worth asking on the CCK forum.  It may be as simple as using <a href="http://api.drupal.org/api/function/drupal_execute/5" rel="nofollow">drupal_execute()</a>, but I&#8217;m not 100% sure about how to import CCK stuff without using a browser.</p>
<p>Finally&#8211; I wonder how well (or if) the code would work with Drupal 6?  Assuming the API remains relatively constant, most of my code might still work, although the non-API stuff written by others before I made my changes may not.  Would be an interesting experiment..<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-54096</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Wed, 20 Feb 2008 21:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-54096</guid>
		<description>At last! it worked! I have been able to import forum posts pefectly despite having non-english characters. It worked adding only those two lines mentioned here: http://www.bxtra.net/articles/2008-02-15/Script-Migrate-PHPNuke-Drupal-UTF8-UTF8

Thanks to everyone, most especially to Bogdan who has proven that apart from having a good knowledge has a lot of patiente and likes helping people. Thank you very much, Bogdan.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->At last! it worked! I have been able to import forum posts pefectly despite having non-english characters. It worked adding only those two lines mentioned here: <a href="http://www.bxtra.net/articles/2008-02-15/Script-Migrate-PHPNuke-Drupal-UTF8-UTF8" rel="nofollow">http://www.bxtra.net/articles/2008-02-15/Script-Migrate-PHPNuke-Drupal-UTF8-UTF8</a></p>
<p>Thanks to everyone, most especially to Bogdan who has proven that apart from having a good knowledge has a lot of patiente and likes helping people. Thank you very much, Bogdan.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53873</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Wed, 20 Feb 2008 09:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53873</guid>
		<description>Hi VValdo, glad to hear from you again!

First I thought that using some &quot;CCK module&quot; isn&#039;t a good idea to incorporate into the (basically universal) script, but after reading this paragraph in the Drupal newsletter I changed my mind:
&lt;blockquote&gt;
A large number of contributed modules depend on these two workhorses, which is why large chunks of CCK have been moved to core, and there is ongoing discussion around moving parts of Views there as well.
&lt;/blockquote&gt;

So the general trend will be to move CCK into the core. Thus it&#039;s perfectly fine to rely on this module.

If no one takes this before weekend, maybe I&#039;ll glue your code into the script.

&quot;New versions&quot; - these are really just minor improvements :) . But I still have to push the version up, so that there is no &quot;one version - different files&quot; confusion.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi VValdo, glad to hear from you again!</p>
<p>First I thought that using some &#8220;CCK module&#8221; isn&#8217;t a good idea to incorporate into the (basically universal) script, but after reading this paragraph in the Drupal newsletter I changed my mind:</p>
<blockquote><p>
A large number of contributed modules depend on these two workhorses, which is why large chunks of CCK have been moved to core, and there is ongoing discussion around moving parts of Views there as well.
</p></blockquote>
<p>So the general trend will be to move CCK into the core. Thus it&#8217;s perfectly fine to rely on this module.</p>
<p>If no one takes this before weekend, maybe I&#8217;ll glue your code into the script.</p>
<p>&#8220;New versions&#8221; &#8211; these are really just minor improvements <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . But I still have to push the version up, so that there is no &#8220;one version &#8211; different files&#8221; confusion.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53721</link>
		<dc:creator>Waldo</dc:creator>
		<pubDate>Tue, 19 Feb 2008 23:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53721</guid>
		<description>Wow, I haven&#039;t been here for a while, and look at all the progress people are making lately!

Cool new patches, new versions.. good times!

Anyway, I wanted to let everyone know that I finally got around to uploading my old code that migrates the Reviews too.

http://drupal.org/node/202528#comment-724422

as with the Web Links code mentioned above (at http://drupal.org/node/202528#comment-689245) you need CCK and the CCK Links field module...

If someone has the time, it might be cool to make a new version of the script that includes this code.  It wouldn&#039;t be hard to do at all really..  I&#039;ve provided all the migration code.. it would just be a matter of packaging it up so it 1. auto-detects that the modules are there and working right, 2. if so, auto-imports the CCK content type, and then 3. run the migration to pull in the web links and the reviews.

Any takers?

W</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Wow, I haven&#8217;t been here for a while, and look at all the progress people are making lately!</p>
<p>Cool new patches, new versions.. good times!</p>
<p>Anyway, I wanted to let everyone know that I finally got around to uploading my old code that migrates the Reviews too.</p>
<p><a href="http://drupal.org/node/202528#comment-724422" rel="nofollow">http://drupal.org/node/202528#comment-724422</a></p>
<p>as with the Web Links code mentioned above (at <a href="http://drupal.org/node/202528#comment-689245)" rel="nofollow">http://drupal.org/node/202528#comment-689245)</a> you need CCK and the CCK Links field module&#8230;</p>
<p>If someone has the time, it might be cool to make a new version of the script that includes this code.  It wouldn&#8217;t be hard to do at all really..  I&#8217;ve provided all the migration code.. it would just be a matter of packaging it up so it 1. auto-detects that the modules are there and working right, 2. if so, auto-imports the CCK content type, and then 3. run the migration to pull in the web links and the reviews.</p>
<p>Any takers?</p>
<p>W<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53611</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 19 Feb 2008 16:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53611</guid>
		<description>Yes, thanks &lt;strong&gt;Ty&lt;/strong&gt;, that was useful.

Carlos,

will it be possible for you to minimize downtime by switching from nuke to drupal as soon as all the users and posts and forums are migrated? this way you won&#039;t have all the functionality you need, but maybe that isn&#039;t really bad? Then, your drupal becomes &quot;minimally functional&quot;, with all new content going into it and not into nuke; meanwhile, you&#039;ll be adding all the extra features you need.

The script may work with no problem for the existing installation, it&#039;s just that I never heard/read of someone doing migration onto the &quot;live&quot; drupal - so basically it isn&#039;t really known if it will work OK or if it will fail.

In order to minimize downtime it would be best (in my opinion) to write a custom migrate-configure script, which will do _everything_ needed to convert the original nuke DB into a fully functional Drupal installation. Downtime then will be limited to the time needed to run that script. However, this approach is time-consuming and requires either certain programming skills, or extra money to pay for this one-use script.

So if it&#039;s possible in your case - then just do the basic migration, then lock nuke - launch drupal, and then add features as fast as you can, while your drupal is &quot;half-functional&quot;. If this scenario is possible in your case, of course :) 

P.S. (2): with some modifications - definitely yes; without any modifications - I don&#039;t know, someone needs to try :) . Also: I&#039;m quite sure it&#039;s possible to migrate to Drupal 5.7, and then just upgrade to Drupal 6 :) .

P.P.S.: WOW! release notes of Drupal 6 look just marvelous! Drupal 6 looks like the best-of-bread beast in the CMS family, now even more than before! It&#039;s only that I find it a little bit more complicated to start with than others; but once learned the idea - it&#039;s a power!</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Yes, thanks <strong>Ty</strong>, that was useful.</p>
<p>Carlos,</p>
<p>will it be possible for you to minimize downtime by switching from nuke to drupal as soon as all the users and posts and forums are migrated? this way you won&#8217;t have all the functionality you need, but maybe that isn&#8217;t really bad? Then, your drupal becomes &#8220;minimally functional&#8221;, with all new content going into it and not into nuke; meanwhile, you&#8217;ll be adding all the extra features you need.</p>
<p>The script may work with no problem for the existing installation, it&#8217;s just that I never heard/read of someone doing migration onto the &#8220;live&#8221; drupal &#8211; so basically it isn&#8217;t really known if it will work OK or if it will fail.</p>
<p>In order to minimize downtime it would be best (in my opinion) to write a custom migrate-configure script, which will do _everything_ needed to convert the original nuke DB into a fully functional Drupal installation. Downtime then will be limited to the time needed to run that script. However, this approach is time-consuming and requires either certain programming skills, or extra money to pay for this one-use script.</p>
<p>So if it&#8217;s possible in your case &#8211; then just do the basic migration, then lock nuke &#8211; launch drupal, and then add features as fast as you can, while your drupal is &#8220;half-functional&#8221;. If this scenario is possible in your case, of course <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>P.S. (2): with some modifications &#8211; definitely yes; without any modifications &#8211; I don&#8217;t know, someone needs to try <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . Also: I&#8217;m quite sure it&#8217;s possible to migrate to Drupal 5.7, and then just upgrade to Drupal 6 <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>P.P.S.: WOW! release notes of Drupal 6 look just marvelous! Drupal 6 looks like the best-of-bread beast in the CMS family, now even more than before! It&#8217;s only that I find it a little bit more complicated to start with than others; but once learned the idea &#8211; it&#8217;s a power!<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53595</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Tue, 19 Feb 2008 15:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53595</guid>
		<description>by the way: thanks &lt;b&gt;Ty&lt;/b&gt; for providing that information.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->by the way: thanks <b>Ty</b> for providing that information.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53594</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Tue, 19 Feb 2008 15:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53594</guid>
		<description>Ha ha ha ha, no, Bogdan, it wasn&#039;t me, promise! But I have read it and that may be the solution to my problem! I&#039;m willing to arrive home and test it. Hope that will work. 

In case it didn&#039;t I will try one last thing: search and replace all instances of &quot;á&quot; for &amp;aaccute ; (without space) and so on, if it didn&#039;t work neither, I will delete all accents and non-english characters. It won&#039;t be correct, but it will be easier to understand a text without those characters than being able to understand a text that has been split at the very first character, for example ;)

I would like to ask another question as well (Sorry Bogdan :( -I&#039;m sure that after I have migrated my site you&#039;ll be happier than me! ): I have plenty of things to do to accomplish the migration, not only migrating users, posts and news... I have to set up some other modules, taxonomies, write some new pages (FAQs)... this work will take me some time to accomplish, but the script says that the importing should be the first thing to do. If I import users and post, for example, and then I start to do the other tasks, that means either one of these things:

-I have to have my site down for maintenance as long as I finish all the tasks, to avoid the following situation:
-If I don&#039;t turn off my phpnuke, new content and/or users would be lost at drupal&#039;s (remember that I had already run migration script)

Is there any solution to this situation? would it break in case I sign up all categories, sections, pages... and then run the script on the last instance to minimize my site&#039;s downtime?
maybe using two separate installations of drupal? How prevent from overwriting information?

Thanks!

PS: I think I&#039;m near to accomplish the migration. I&#039;m really willing to do it!

PS2: would that script work for 6.x version for Drupal?</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Ha ha ha ha, no, Bogdan, it wasn&#8217;t me, promise! But I have read it and that may be the solution to my problem! I&#8217;m willing to arrive home and test it. Hope that will work. </p>
<p>In case it didn&#8217;t I will try one last thing: search and replace all instances of &#8220;á&#8221; for &amp;aaccute ; (without space) and so on, if it didn&#8217;t work neither, I will delete all accents and non-english characters. It won&#8217;t be correct, but it will be easier to understand a text without those characters than being able to understand a text that has been split at the very first character, for example <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I would like to ask another question as well (Sorry Bogdan <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  -I&#8217;m sure that after I have migrated my site you&#8217;ll be happier than me! ): I have plenty of things to do to accomplish the migration, not only migrating users, posts and news&#8230; I have to set up some other modules, taxonomies, write some new pages (FAQs)&#8230; this work will take me some time to accomplish, but the script says that the importing should be the first thing to do. If I import users and post, for example, and then I start to do the other tasks, that means either one of these things:</p>
<p>-I have to have my site down for maintenance as long as I finish all the tasks, to avoid the following situation:<br />
-If I don&#8217;t turn off my phpnuke, new content and/or users would be lost at drupal&#8217;s (remember that I had already run migration script)</p>
<p>Is there any solution to this situation? would it break in case I sign up all categories, sections, pages&#8230; and then run the script on the last instance to minimize my site&#8217;s downtime?<br />
maybe using two separate installations of drupal? How prevent from overwriting information?</p>
<p>Thanks!</p>
<p>PS: I think I&#8217;m near to accomplish the migration. I&#8217;m really willing to do it!</p>
<p>PS2: would that script work for 6.x version for Drupal?<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title>
		<link>http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/comment-page-1#comment-53592</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 19 Feb 2008 15:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html#comment-53592</guid>
		<description>Yes, that&#039;s what I&#039;m talking about in my comment #43 - &quot;connection collation isn&#039;t utf8&quot;. Now, when I see that it did help, I&#039;ll add those two lines to the script, and shall post version 0.04 here in a few minutes.

Carlos, if that wasn&#039;t your post on bxtra.net :) , then you may want to try the 0.04 version as soon as I put it here. It might help with your &quot;incomplete import on accented characters&quot; problem.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Yes, that&#8217;s what I&#8217;m talking about in my comment #43 &#8211; &#8220;connection collation isn&#8217;t utf8&#8243;. Now, when I see that it did help, I&#8217;ll add those two lines to the script, and shall post version 0.04 here in a few minutes.</p>
<p>Carlos, if that wasn&#8217;t your post on bxtra.net <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  , then you may want to try the 0.04 version as soon as I put it here. It might help with your &#8220;incomplete import on accented characters&#8221; problem.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
</channel>
</rss>
