mt2geeklog

INTRODUCTION

mt2geeklog is a Geeklog custom function which allows you to import a log file exported from Movable Type ®. If you are not using Movable Type itself, you can import a log file with a similar format. See here for the imformation on Movable Type Import Format.

WARNING: mt2geeklog is still at its alpha release stage, so I'm afraid it might have some bugs. Make a backup of your current geeklog database using the built-in admin feature in advance. Verify your backup feature is configured correctly and backup file is not 0 byte (This is worth a check).

WARNING: Besides, I haven't tried to process languages other than Japanese, there might be some difficulties or errors when using mt2geeklog.

LICENSE

Like Geeklog itself, you can use mt2geeklog under the terms of the GNU General Public License.

INSTALLATION

  1. Download a tarball mt2geeklog-x.y.tar.gz (x and y are version numbers) and umcompress it into some directory. It will create a mt2geeklog directory.
  2. Copy the "phpblock_mt2geeklog.php" and "mt2geeklog_usage_english.html" files created in the mt2geek directory to your <geeklog_dir>/system/custom/ directory.
  3. Open "lib-custom.php" in the directory with your favorite text editor and add the fllowing line into a proper place. It would be better to add it before the sample function phpblock_showrights().

    require_once( 'custom/phpblock_mt2geeklog.php' );

  4. Login as admin and go to the "Blocks" menu. In the Block manager, create a new block.
  5. In the Block Editor, enter Title (e.g. Import from MT) and Block Name. Then, select "PHP Block" at the Type dropdown menu. Next, in the "PHP Block Options" section, enter phpblock_mt2geeklog into Block Function. Finally, don't forget to click Save.
  6. Now, installation has finished successfully.

USAGE

  1. Login as admin.
  2. If the mt2geeklog block is not displayed on the page, enable it in the Block Manager.
  3. Enter Import file. You can browse files in your PC with the "Browse..." button.
    NOTICE: An import file name has to have ".log" extension.
  4. Select Input Encoding. If "Auto" failed, try other options instead.
  5. Select Story Owner, which designates who is going to own imported stories. No matter which option you choose, admin will be the owner when imported stories have no original author.

    [Available options in "Story Owner"]
    Options Description
    Original Author Original authors of imported stories will be authors in Geeklog as well. If authors are not yet registered in Geeklog, corresponding users will be created automatically.
    NOTICE: Newly-created accounts are disabled, so admin has to set their email addresses and passwords manually.
    Original Author Possible Original authors of imported stories will be authors in Geeklog as well. If authors are not yet registered in Geeklog, admin will be their owner.
    Admin Original authors of imported stories will be ignored and admin will be their owner.

  6. If necessary, enter Default Topic. This is the topic to which imported stories will belong if they don't have either PRIMARY CATEGORY or CATEGORY.
  7. Select Submit Status.
  8. Select Comments. When you select "Import", you have to select "Allow Comments" below as well.

    [Available Options in "Allow Comments"]
    Options Description
    As they are mt2geeklog will adopt the "ALLOW COMMENTS" flags set in the imported file.
    Auto mt2geeklog will adopt the "ALLOW COMMENTS" flags set in the imported file. However, as for stories with comments, comments are allowed automatically.
    Enable all The "ALLOW COMMENTS" flags set in the imported file will be ignored and comments are allowed in all imported stories.
    Disable all The "ALLOW COMMENTS" flags set in the imported file will be ignored and comments are disabled in all imported stories.

  9. Select Trackbacks. When you select "Import", you have to select "Allow Trackbacks" below as well.

    [Available Options in "Allow Trackbacks"]
    Options Description
    As they are mt2geeklog will adopt the "ALLOW PING" flags set in the imported file.
    Auto mt2geeklog will adopt the "ALLOW PINGS" flags set in the imported file. However, as for stories with trackbacks, trackbacks are allowed automatically.
    Enable all The "ALLOW PINGS" flags set in the imported file will be ignored and trackbacks are allowed in all imported stories.
    Disable all The "ALLOW PINGS" flags set in the imported file will be ignored and trackbacks are disabled in all imported stories.

  10. If necessary, enter Start title HTML, End title HTML. If you happen to use a weblog system in which stories have no title, e.g. Blogger, you might want to have titles in Geeklog. Suppose stories in your current weblog has the following format:

    <div class="article">
      <div class="article_title">Some Title</div>
      <div class="article_body">Story Body</div>
    </div>

    In this case, if you can extract the part between <div class="article_title"> and </div> in some way, you can use the part as the title of the story. Start title HTML and End title HTML are for this purpose. When you enter into Start title HTML a pattern preceding the title and enter into End title HTML a pattern following the title, mt2geeklog will try to extract a title from a story. If one is acquired, it will be the title of the story. If none, the tilte will be "NO TITLE" automatically.
    WARNING: Start title HTML and End title HTML are passed as regular expressons to PHP eregi() function, but mt2geeklog doesn't check the validity of the expression. Therefore, if you enter improper patterns into Start title HTML and/or End title HTML, you will end up with no title at all or it will take a long time to get titles.
  11. Select Post mode.
  12. Finally, click Import! and mt2geeklog will start to import the log file. If an error occurs, check your error log (/logs/error.log).
    Farewell to MT!

Return to the top of the page

REVISION HISTORY

ver 0.1.2 2006/04/25 Geeklog version prior to 1.4.0 didn't have trackback features, so modified not to save data about trackbacks into the database.
ver 0.1.1 2006/04/21 Dealed with a case where mbstring (multibyte-string) functions are unavailable. There is no converting encodings.
ver 0.1 2006/04/19 Initial version.

Return to the top of the page