isLoggedIn($thisFile)) { convert_showLogin('blogger.php'); } if (!$member->isAdmin()) { convert_doError('Only Super-Admins are allowed to perform blog conversions'); } // include PRAX lib (to read XML files easily) include ('PRAX.php'); switch($action) { case 'selectBlog': bc_selectBlog(); break; case 'assignMembers': bc_assignMembers(); break; case 'showOverview': bc_showOverview(); break; case 'doConvert': bc_doConversion(); break; case 'login': // drop through default: bc_BloggerToXml(); } // step 1: get the Blogger Blog ID function bc_BloggerToXml() { global $xmlFile, $thisFile; convert_head(); ?>

Step 1: Exporting to a file

The first step in the conversion is to export all your Blogger entries into one single file. This is done by logging in in Blogger and by temporary changing your settings and templates.
The full procedure is explained below:

Exporting

Note: If you intend to keep using your weblog afterwards, write down the changes you made, so they can be undone afterwards. For the templates, copy paste the old ones in a textfile.
  1. Log into Blogger and go to the blog you want to export.
  2. Change the template of your blog to the following:
    <?xml version="1.0"?>
    
    <blog xmlns="http://nucleuscms.org/ns/import1.0" version="1.0">
    
     <Blogger>
    
      <item id="<$BlogItemNumber$>">
       <title><BlogItemTitle><$BlogItemTitle$></BlogItemTitle></title>
       <body><![CDATA[<$BlogItemBody$>]]></body>
       <timestamp type="blogger"><$BlogItemDateTime$></timestamp>
       <author><$BlogItemAuthor$></author>
      </item>
    
     </Blogger>
    
    </blog>
    Don't forget to save changes!
  3. Go to the settings and change the following options:
  4. Save the settings and publish your blog. You'll end up with a file on your server containing all of your blog items.
  5. If you're running blogspot, you'll need to edit this file and take out the advertising banner code.

Importing

You now have a file called . Upload it in the same directory as the convert files (/nucleus/convert) and continue to the next step.

Step 2: Select Destination Blog

getHtmlCode('ConvertSelectBlog'); ?>

(Could take quite a while. Press the button only once)

Step 3: Assign members and Categories

1)); $oImport->importXmlFile($xmlFile); echo $oImport->getHtmlCode('ConvertSelectMembers'); // echo $oImport->getHtmlCode('ConvertSelectCategories'); ?>

(Could take quite a while. Press the button only once)

Step 4: Conversion'; echo '

Importing...

'; echo '

Hold on while your blog is imported...

'; // 1. get all data $blogid = BlogImport::getBlogIdFromRequest(); $oImport = new BlogImport($blogid); $oImport->getFromRequest('authors'); $oImport->getFromRequest('categories'); $oImport->strCallback = ''; // don't use a callback method echo '
'; $bOk = $oImport->importXmlFile($xmlFile); echo '
'; // 2. import data... if (!$bOk) { echo '

Error on import: ' . $oImport->getLastError() . '

'; exit; } echo '

Successfully imported items

'; echo '

Mappings

'; echo '

The mapping below maps blogger post ids to nucleus ids.

'; echo '
';
	print_r($oImport->aMapIdToNucleusId);
	echo '
'; convert_foot(); convert_foot(); } ?>