8th September 2006
Post last updated: April 18, 2010.
there is a Drupal 6.x module available. It is in no way related to the migrate script(s) below.
In 2002 I set up a PHPNuke-6.0 – based portal. Eventually it died due to the lack of time investments and support from collaborators. Now, when time came to revive the project, I made a search and decided to use Drupal as a base CMS for the portal.
In order to migrate userbase from an old portal to the new Drupal-powered one, and following the topic at drupal.org, I found a script and its modification.
I used it to migrate only users, and made some cosmetic changes:
- added options for custom phpnuke table prefixes
- default user name is now = uname (login), not ‘temp_name’, as before
- I replaced hard-coded links to ‘migrate.php’ with links to $_SERVER['PHP_SELF'], so that if you rename the script you don’t have any problems with that
- now forum topics should not be promoted to the main page (changed 1 to 0 as hinted by Alexis)
Finally, I would like to thank both Karthik Kumar for the original script and Alexis Bellido for the 6.0_to_4.7 modification.
Waldo updated the migration script.
Here are the changes:
- imports from (a security-patched) Nuke 6.5 -> Drupal 5.1
- imports story categories into Drupal taxonomy
- incorporates phpnuke “Contributor writes…” into story
- incorporates phpnuke admin story “note”
- imports polls (does not import record of who already voted. You can easily “close” old phpnuke polls via Admin page. I left them open.)
- imports poll comments
- imports *anonymous* comments for stories, fora, & polls
- imports anonymous forum posts
- filters BBCode to make semi-compatible with Drupal BBCode module
- uses Drupal 5.0 API, and must be run from drupal root directory (/drupal-5/, for example)
Thanks to Waldo for his work!
Waldo sent the newest, improved version of the PHP-Nuke-2-Drupal conversion script. Here is Waldo’s description:
- retain original user registration date & last visit 4/22/07
- fixed user migration bug which could result in screwed max_uid in session table 4/22/07
- store anonymous forum posts names in the log for future compatibility w/Drupal 6 7/16/07
- uses the “tidy” extension (if installed) in php 5.x to clean up the HTML of postings & stories 7/30/07
- bug fixes (possibly) related to drupal 5.2 where the fora had the wrong “changed” date resulting in misordered node lists. 7/30/07
- polls properly remember date of last comment 7/30/07
If you have the “tidy” PHP extension, it should close all open HTML tags and stuff in stories.
I added to the script some more debug messages in case something goes wrong (as recommended by me) – that pushed the version up to 0.03.
Also, now MySQL connection collation is set to utf8 before doing anything – this should fix the problems with non-English characters in the imported texts (especially accented/umlauted/etc characters). Thus I upped the version to 0.04. For reference and in case 0.04 doesn’t work for you, I keep the older versions as well.
Previous (older) versions:
phpnuke2drupal-5.x-0.01 (VValdo’s huge improvements first appear here)
first version with my minor modifications
IMPORTANT: for migration to work you will need MySQL version to be >= 4.1.1. Earlier versions do not support the STR_TO_DATE() function, used in the migration script.
IMPORTANT: if you want to migrate forum entries from PHPNuke to Drupal, be sure to setup forum in your Drupal installation first – otherwise migration of forum entries will fail. See comments 13-17 below for user experiences.
If you do not get any help here, there is also a drupal.org migration thread. I will keep this page updated for as long as I get new information about the migration script.
If you encounter any problems during migration – just search/scan the comments, your problem might have been already solved by someone else.