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(); ?>
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:
<?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!
You now have a file called . Upload it in the same directory as the convert files (
/nucleus/convert
) and continue to the next step.
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 'Error on import: ' . $oImport->getLastError() . '
'; exit; } echo 'Successfully imported items
'; echo 'The mapping below maps blogger post ids to nucleus ids.
'; echo ''; print_r($oImport->aMapIdToNucleusId); echo ''; convert_foot(); convert_foot(); } ?>