3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4 * Copyright (C) 2002-2006 The Nucleus Group
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 * (see nucleus/documentation/index.html#license for more info)
13 * This script will import a Blogger blog into a Nucleus blog, using
14 * a easy to use wizard.
17 * - Templates are not converted
18 * - Nucleus should already be installed
19 * - Members should exist for all teammembers
21 * @license http://nucleuscms.org/license.txt GNU General Public License
22 * @copyright Copyright (C) 2002-2006 The Nucleus Group
23 * @version $Id: weblog.php 846 2005-12-30 10:38:32Z dekarma $
26 include("../../config.php");
27 include("functions.inc.php");
28 include($DIR_LIBS . "ADMIN.php");
29 include($DIR_LIBS . "MEDIA.php");
31 if (!$member->isLoggedIn()) {
32 convert_showLogin('weblog.php');
35 if (!$member->isAdmin()) {
36 convert_doError('Only Super-Admins are allowed to perform blog conversions');
39 $ver = convert_getNucleusVersion();
41 convert_doError("You should check the Nucleus website for updates to this convert tool. This one might not work with your current Nucleus installation.");
43 // include PRAX lib (to read XML files easily)
47 case "login": // drop through
49 bc_getBloggerBlogID();
52 // step 1: get the Blogger Blog ID
53 function bc_getBloggerBlogID() {
54 global $HTTP_SERVER_VARS, $PHP_SELF;
60 <em>Thanks to <a href="http://www.gagaweb.com/">Eric Driesen</a> for providing this we::blog template.</em>
62 <b>Note:</b> This conversion tool will <b>NOT</b> convert your comments.
65 <h1>Step 1: Exporting to a file</h1>
68 The first step in the conversion is to export all your <a href="http://www.danchan.com/weblog">we::blog</a> entries into one single file.
69 <br />The full procedure is explained below:
74 <div class="note"><b>Note:</b> 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.</div>
78 Change the template of your blog to the following:
80 <pre><!-- Your weblog template -->
83 <title>GaGa WebCam Log</title>
84 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
86 <!-- ********************************************************************************** -->
87 <!-- DO NOT REMOVE OR CHANGE ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING -->
88 <!-- ********************************************************************************** -->
91 translate {:-)} {<img src="/weblog/image/emoticon/smiley.gif">}
93 translate_template {[#edit]} {[IF $edit_link][<a href="[$edit_link]">edit</a>][ENDIF]}
94 translate_template {[#date_header]} {[IF $date_header]<p class="commentdateheader">[$post_day]/[$post_month]/[$post_year]</p>[ENDIF]}
95 translate_template {[#comments_page]} {[IF $generation]}
96 translate_template {[/#comments_page]} {[ENDIF]}
97 translate_template {[#main_page]} {[IF $generation][ELSE]}
98 translate_template {[/#main_page]} {[ENDIF]}
99 translate_template {[#messages]} {[LOOP $messages]}
100 translate_template {[/#messages]} {[ENDLOOP]}
101 translate_template {[#archives]} {[LOOP $archives]}
102 translate_template {[/#archives]} {[ENDLOOP]}
103 translate_template {[#hidden_message]}
105 [IF $message_status_hide]
107 <p class="commenttitle" id="[$message_id]"><font color="#FF0000" face="tahoma">::HIDDEN::</font>
108 [IF $comment_link]<a class="navigate" href="[$comment_link]">[ENDIF][$message_title][IF $comment_link]</a>[ENDIF]
109 [IF $edit_link][<a class="navigate" href="[$edit_link]">edit</a>][ENDIF]</p>
113 translate_template {[#visible_message]} {[IF $message_status_hide][ELSE]}
114 translate_template {[/#visible_message]} {[ENDIF]}
115 translate_template {[#post]} {[IF $add_comment_link]<br><p class="addcomment">[ <a class="navigate" href="[$add_comment_link]">[IF $generation]add a comment[ELSE]post a message[ENDIF]</a> ]</p>[ENDIF]}
116 translate_template {[#comment]}
119 <a class="navigate" href="[$comment_link]"><nobr>[$num_comments] comments</nobr></a>
122 translate_template {[#post_datetime]} {[$post_month]/[$post_day]/[$post_year] [$post_hour]:[$post_minute] PM}
123 translate_template {[#mod_datetime]} {[$mod_month_abbrev] [$mod_day], [$mod_year] at [$mod_hour]:[$mod_minute]}
126 generation.0 { comments: yes; show_depth: 1; max_comments: 1000; max_days: 365; sort_comments: new_to_old; sort_days: new_to_old; permissions: owner; }
127 generation.1 { comments: yes; show_depth: 1; max_comments: 1000; max_days: 365; sort_comments: new_to_old; sort_days: new_to_old; permissions: all; }
128 generation.2 { comments: no; }
129 generation.open { comments: yes; show_depth: 16; max_comments: 1000; }
133 <!-- ********************************************************************************** -->
134 <!-- DO NOT REMOVE OR CHANGE ANYTHING ABOVE THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING -->
135 <!-- ********************************************************************************** -->
140 <style type = "text/css">
142 .pagetitle { font-family: Comic Sans MS; font-size: 10pt; font-weight: bold; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
143 .pagebody { font-family: Comic Sans MS; font-size: 9pt; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
144 .pagebyline { font-family: Comic Sans MS; font-size: 8pt; color: #666666; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
146 .addcomment { font-family: Comic Sans MS; font-size: 8pt; font-weight: bold; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
148 .commenttitle { font-family: Comic Sans MS; font-size: 10pt; font-weight: bold; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
149 .commentbody { font-family: Comic Sans MS; font-size: 9pt; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
150 .commentbyline { font-family: Comic Sans MS; font-size: 8pt; color: #666666; margin-top: 0px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px }
151 .commentdateheader { font-family: Comic Sans MS; font-size: 8pt; color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px }
153 .navigate { font-family: Comic Sans MS; font-size: 8pt; font-weight: bold; color: #000000 }
155 .responseto { font-family: Comic Sans MS; font-size: 8pt; color: #666666; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right:0px }
157 a.navigate:link { color: rgb(0,102,153); text-decoration : underline; }
158 a.navigate:visited { color: rgb(0,153,102); text-decoration : underline; }
159 a.navigate:hover { color: rgb(0,102,102); text-decoration : underline; }
162 <!-- the contents of the weblog -->
164 <!-- main weblog page -->
170 <?xml version="1.0"?>
175 [#messages][#visible_message]
177 <body><![CDATA[[$message_body]]]></body>
178 <title>[$message_title]</title>
179 <date>[$post_month]/[$post_day]/[$post_year] [$post_hour_dd]:[$post_minute]:[$post_second] [$post_time_ap]m</date>
180 <author>[$author_nickname]</author>
190 Don't forget to save changes!
192 <li>Save the generated page as <tt>blogger.xml</tt></li>
193 <li>Edit <tt>blogger.xml</tt> and remove the header and footer of the file (the file should start with <code><bloggerblog></code> and end with <code></bloggerblog></code>)</li>
199 Now you have a file called <b>blogger.xml</b>. Upload it in the same directory as the convert files (<tt>/nucleus/convert</tt>) and continue to the next step.
203 <form method="post" action="blogger.php">
204 <input type="submit" value="Next Step: Assign Members to Authors" />
205 <input type="hidden" name="action" value="assignMembers" />
209 <div class="note">Note: the next steps are the same as for Blogger.com blogs, so don't be surprised to see Blogger.com mentioned.</div>