Main

October 28, 2005

A Patch for SpamLookup 2.0 bundled with MT 3.2

Of course I'm addicted to using SpamLookup 2.0, but its Keyword Filter doesn't recognize regular expressions with multi-bytes strings and Unicode properties/blocks/scripts which are supported by Perl 5.8. Therefore it's not easy to train SpamLookup for rejecting comment/trackback spams in foreign languages, especially in asian languages.

The following is a patch for enabling Unicode support in SpamLookup 2.0.

SpamLookup2.0-encode.patch

If you are using a Linux box, it is easy to apply. Just download or copy it into your MT directory and type as follows:

patch -p0 < SpamLookup2.0-encode.patch

Once you applied this patch, you could write regular expressions enpowered by Unicode support, as Keyword Filter rules.

For example, to reject comments/trackbacks with Hiragana strings, just as follows:

/\p{Hiragana}+/

Or to accept only Latin-1 comments/trackbacks, you can do as follows:

/^[^\x00-\xff]+$/

October 27, 2005

Entry Category Entries Plugin

A Movable Type plugin for listing entries included in the primary category of the current entry.

EntryCategoryEntries.zip

This plugin allows you to list entries included in the primary category of the current entry. This plugin can be used only in the entry context, which means the inside of the MTEntries container or the individual entry archives.

TAGS

MTEntryCategoryEntries

A container tag for listing entries included in the primary category of the current entry.

Almost same options are availablable as MTEntries.

EXAMPLE

<ul>
<MTEntryCategoryEntries lastn="10">
  <li><a href="<$MTEntryPermalink$>"><MTEntryTitle></a></li>
</MTEntryCategoryEntries>
</ul>

LICENSE

This code is released under the Artistic License. The terms of the Artistic License are described at http://www.perl.com/language/misc/Artistic.html.

AUTHOR & COPYRIGHT

Copyright (c) 2005 Hirotaka Ogawa (hirotaka.ogawa at gmail.com)

October 26, 2005

Delicious Tags Plugin

A simple Movable Type plugin for importing and displaying your del.icio.us tags.

DeliciousTags.zip

This plugin allows you to import and display your del.icio.us tags into your MT blogs. This plugin requires Net::Delicious module (search.cpan.org: Aaron Straup Cope / Net-Delicious).

TAGS

MTDeliciousTags [user="..."][pass="..."][sort_by="tag|count"][sort_order="ascend|descend][lastn="N"]

A container tag for your del.icio.us tags. "user" and "pass" are required.

MTDeliciousTag

Generates a del.icio.us tag.

MTDeliciousTagURL

Generates the URL to a del.icio.us (e.g., http://del.icio.us/user/tag).

MTDeliciousTagCount

Generates the number how many a del.icio.us tag appears in your del.icio.us bookmarks.

MTDeliciousTagsHeader

A container tag that renders its contents before the first del.icio.us tag.

MTDeliciousTagsFooter

A container tag that renders its contents after the last del.icio.us tag.

EXAMPLE

<MTDeliciousTags user="del.icio.us.username" pass="del.icio.us.password">
<MTDeliciousTagsHeader><ol></MTDeliciousTagsHeader>
<li><a href="<$MTDeliciousTagURL$>"><$MTDeliciousTag$></a>
  (<$MTDeliciousTagCount$>)</li>
<MTDeliciousTagsFooter></ol></MTDeliciousTagsFooter>
</MTDeliciousTags>

LICENSE

This code is released under the Artistic License. The terms of the Artistic License are described at http://www.perl.com/language/misc/Artistic.html.

AUTHOR & COPYRIGHT

Copyright (c) 2005 Hirotaka Ogawa (hirotaka.ogawa at gmail.com)

October 04, 2005

Duplicated TBPing Lookup Plugin

An MT 3.2 JunkFilter plugin for rejecting duplicated and/or repeated trackbacks from the same source URLs. These kind of trackbacks seem to be spams or caused by authors' mistakes.

DuplicatedTBPingLookup.zip

The basic idea of this plugin is derived from Koiki-kukan: duplicateTBPingfilter Plugin (This page is written by Japanese).

"Duplicated TBPing Lookup Plugin" is a JunkFilter plugin which is a building block of The Feedback Rating System in Movable Type 3.2. This plugin checks whether incoming trackbacks are duplicated and/or repeated ones from the same source URL, and if so, treats them as negative trackbacks.

To install the plugin, just copy DuplicatedTBPingLookup.pl into your plugins directory. This plugin allows you to change the score weight for negative trackbacks from the plugin configuration screen.

The development version is also available from http://code.as-is.net/viewvc/mt/DuplicatedTBPingLookup/trunk/.

July 16, 2005

mt-db-convert.cgi: MT Database Converter

A CGI script for converting Movable Type Database between DB engines.

mt-db-convert.zip

0.11 (2005.07.16):
  • Initial release.
0.12 (2005.07.18):
  • Bug fix for using BerkeleyDB.

This script allows you to mutually convert Movable Type Data between BerkeleyDB, MySQL, PostgreSQL, and SQLite. When you want to move your database from MySQL to SQLite, or move from a testing environment to a production, this script can help you.

This script is a kind of a derived work of Six Apart's mt-db2sql.cgi. So I may cease publishing this article and this script anytime as requested.

INSTALLATION

To install this script, upload or copy "mt-db-convert.cgi" into your Movable Type directory and set the permission of the script to 0755 (be executable).

To use it, just acccess it with your Web browser. (I have to write more)

After running this script, I strongly recommend to delete it, because it becomes a security hole of your MT. I mean anybody else could access it and read your DB configuration.

NOTE

  • This script is compatible with Movable Type version 3.1x. I didn't test it at any other versions.
  • This script may be stopped publishing anytime at Six Apart's request.

June 29, 2005

Dynamic Tag Archiving with Tagwire and MT-XSearch

Instead of static tag/category archives supported by Tags Plugin, Tagwire provides Dynamic Tag Archiving by using Tim Appnel's MT-XSearch. Dynamic Tag Archiving is slower than static one but preferable to support more flexible archiving. For example, Tagwire supports listing entries having two or more tags.

In this article, I will explain how Tagwire plugin cooperates with Tim Appnel's MT-XSearch and realize Dynamic Tag Archiving.

"Dynamic Tag Archiving with Tagwire and MT-XSearch" »

June 24, 2005

Tagwire Plugin

A plugin for handling entries' keywords as "tag" in Movable Type.

tagwire.zip

0.10 (2005.03.19):
  • Initial release of AllKeywords Plugin
0.20 (2005.06.24):
  • Change plugin name to "Tagwire Plugin" and released with English document
0.21 (2005.06.25):
  • Add encode_urlplus filter and its document
0.22 (2005.06.30):
  • Minor bug fix.
  • Support newer plugin interface of MT3.X?
0.23 (2005.07.06):
  • Fix for the duplicated PluginData problem when using with SQLite.
0.24 (2005.07.13):
  • Add MTTagDate for displaying the last date the tag added.
  • Add MTRelatedTags for listing tags related to the current tag.
  • Add MTXSearchTags for listing tags specified by MT-XSearch's argument.
  • Modify README.txt for these changes.
  • Add tagwire-pdcleaner.cgi which is a simple tool for cleaning PluginData for tagwire.
0.24a (2005.07.14):
  • Fix minor bugs.
0.25 (2005.07.20):
  • More bug fixes.

Tagwire Plugin (aka AllKeywords Plugin) provides an easier way to handling "tags" in Movable Type. The keywords fields of any entries are used as "tags".

Unlike Tags and Tagslite Plugin, this plugin has the following features:

  • Multilingual Tagging:
  • Flexible Tag Format:
  • MT's categories are Untaint:
    Tagwire Plugin uses only "keywords" field of entries, so users can use "categories" just as themselves separately.
  • Full-fledged support for tag handling:
    Tagwire provides various functions including blog-wide/entry-wise tag listing and counting, listing entries that have user-specified tags, and listing related entries.
  • Moderate Rebuilding Time:
    Tagwire realizes tag indexing without support of your DB engines. It often leads to performance degradation especially for rebuilding, but Tagwire employs PluginData and Request Cache effectively and achieves enough speed.
  • Dynamic Tag Archiving coupled with MT-XSearch:
    Though Tagwire generates no static tag archives, it couples with Tim Appnel's MT-XSearch and supports Dynamic Tag Archiving.

"Tagwire Plugin" »

May 10, 2005

FlickrPublicPhotos Plugin

A Movable Type plugin for listing Flickr's Public Photos. This plugin employs Flickr API and Flickr::API module.

FlickrPublicPhotos.zip

0.10(2005.05.05):
  • First Release
0.11(2005.05.06):
  • Code cleanup
0.12(2005.05.07):
  • Support 100+ public photos
  • Add more variable tags for displaying the information of the photo
0.13(2005.05.08):
  • First Release in English
0.20(2005.05.27):
  • Speedup, countermeasure for Flickr service down.
0.21(2005.06.08):
  • A bug fix release

FlickrPublicPhotos Plugin allows you to list public photos of an Flickr account owner, which can be specified by his/her username or mail address, or NSID. The plugin can show not only full-set of his/her public photos, but also recent N photos or random N photos.

"FlickrPublicPhotos Plugin" »

March 02, 2005

Benchmark: Importing Multiple Entries

This benchmark is intended to make clear the performance characteristics of the underlying DB engines which can be used by Movable Type.

I recognize this is not a typical transaction for Movable Type. My intention of performing this benchmark was to test the hardest transactions for any DBs, because importing has leastly-read but mostly-write operations. Rebuilding takes a long time but it is a mostly-read case and doesn't push DBs so hardly. I believe that the rebuilding time is dominated by Disk I/O rather than DB accesses. Also thinking about other cases such as coutinueously commenting or tbpinging, CGI setup time is supposed to be dominant.

Method

Importing multiple entries (40, 200, 1000) and couting the cpu times and elapsed times by using Benchmark and Time::HiRes modules. In each cases, I ran the benchmark four times and picked up the best case.

Server Specification

  • Intel Pentium 4 2.40Ghz 384MB Memory
  • Fedora Core 3
  • Apache httpd 2.0.52
  • MySQL 3.23.58
  • Movable Type 3.15

Movable Type and MySQL are running on a server.

Importing Data

All entry have "GNU Public License" as their entry body, and they have diffrent titles and same one category.

DB Engines

DBD
Berkeley DB 4.2.52 + DB_File 1.809
MySQL
MySQL 3.23.58 + DBD-mysql 2.903
SQLite2
DBD-SQLite2 0.33
SQLite3
DBD-SQLite 1.0.8
MySQL*
MySQL 3.23.58 + DBD-mysql 2.903 + w/o AutoCommit
SQLite2*
DBD-SQLite2 0.33 + w/o AutoCommit
SQLite3*
DBD-SQLite 1.0.8 + w/o AutoCommit

MySQL*, SQLite2*, and SQLite3* disable AutoCommit option and do "begin_work" and "commit" at the start and end of the importing process.

"Benchmark: Importing Multiple Entries" »

February 23, 2005

Update-n-Ping Plugin

A plugin for sending 'update pings' when updating entries.

update-n-ping.zip

0.01(2005.02.23):
  • First Release
0.02(2005.02.24):
  • Bug Fix
0.04(2005.03.06):
  • Support Perl 5.0
0.10(2005.04.25):
  • Support Plugin customization feature for MT3.16 or later
0.11(2005.06.10):
  • Fix for sending Update-pings when updating via XMLRPC or Atom API
0.12(2005.10.24):
  • Now support MT 3.2.

The default Movable Type 3.1 does send 'update pings' if you post new entries or change entries' state from 'Draft' to 'Publish'. On other hand, MT3 does NOT send any update pings if modify 'published' entries.

This plugin enables MT to send update pings when updating published entries and adding newly published entries.

"Update-n-Ping Plugin" »

January 29, 2005

recently_pinged_on Plugin

A plugin for adding 'recently_pinged_on' option to MTEntries container

recently-pinged-on.zip

0.10(2005.01.29): First Release
0.11(2005.01.29): Several fixes for better performance
0.12(2005.02.06): Performance tuning. And now MTEntryDate, MTEntriesHeader, MTEntriesFooter, MTEntryIfExtended, MTEntryIfAllowComments, MTEntryIfCommentsOpen, and MTEntryIfAllowPings can be used in MTEntries container.
0.15(2005.02.13): Now disables the plugin function if specified with lastn, days, or recently_commented_on options. And if using in category or date-based archives, the plugin lists up only pinged entries which are included in targeted archives.
0.16(2005.02.19): Fix an embarrassing bug.
0.18(2005.09.01): Fix for Movable Type 3.2.

The default MTEntries container tag does not have a function listing up recent incoming TB pings, as opposed to recent incoming comments. This plugin adds "recently_pinged_on" option to MTEntries and allows you to list up recent incoming pings as like comments.

"recently_pinged_on Plugin" »

Quasi-Spam Filter Plugin

A reference implementation of a Spam filter plugin

quasi-spamfilter.zip

0.10(2005.01.28): First Release
0.15(2005.02.01): Support TBPing spam filtering
0.17(2005.03.05): Support Perl 5.0
0.20(2005.04.08): Support Logging feature and refine the interfaces of spam-detection functions

This is a reference implementation of a Spam filter plugin and mainly targetted to spam filter developpers as well as actual users. This plugin allows you to easily customize your filtering policy and your reaction to comment & trackback spammers.

"Quasi-Spam Filter Plugin" »

December 18, 2004

A bunch of fixes for MT 3.121

This entry introduces a bunch of fixes for Movable Type 3.121. The following is an aggregated patch for these fixes.

MT-3.121-en_us-p01.zip

My intension of building this patch is just to fix *not-functioned* and *mal-functioned* features in Movable Type, and to make it work properly as possible. So, the patch does not include any function extensions or any arbitrary changes to the original version of Movable Type.

This patch is also applicable to Movable Type 3.14.

"A bunch of fixes for MT 3.121" »

November 29, 2004

MT-ShrinkFInfo

A Tool for Shrinking an Enlarged FileInfo DB

ShinkFInfo.zip

0.01(2004.11.28): First Release
0.02(2004.11.28): A fix to stop unnecessary shrinking if possible. A little bit of code cleanup.
0.03(2004.11.29): Add a plugin interface and an experimental access restriction using a cookie.
0.04(2004.12.10): A little bit improvement on the plugin user-interface.

If using Movable Type 3.1 with BerkeleyDB, you will encounter a problem that db/fileinfo.db is enlarging whenever you repeat rebuilding. This problem makes it slow to rebuild contents, and even worse it may cause HTTP Error 500 which means Internal Server Error.

MT-ShinkFInfo allows you to shrink an enlarged db/fileinfo.db. It employs MT Perl API so as to provide a safer and easier method to shrink fileinfo.db, rather than removing it manually. And it also provides a plugin interface to invoke this easily from the management screen of Movable Type.

"MT-ShrinkFInfo" »

September 29, 2004

MTTruncateURL Plugin

mt-truncateurl.pl

0.01(2004.09.29): First Release

Lots of built-in MT tags, such as MTEntryPermalink or MTArchiveLink, always generate canonical URLs (e.g. http://www.domain.tld/blog/index.html). It is sometimes inconvenient because generated HTML files grow large and make hard to distinguish between internal links and external links. MTTruncateURL Plugin allows you to simply replace cannonical URLs with relative URLs.

<MTTruncateURL>...</MTTruncateURL>

Container tag that converts its contents (more precisely saying, all of "href", "src", and "action" attributes) into relative URLs if possible. The converted URLs will be relative to the blog server, such as "/blog/index.html" and "/blog/archives/photo/index.php".

For example, in the index template, this container tag allows you to convert one single MTEntryPermalink tag to a relative, and to convert a whole document as well.

"MTTruncateURL Plugin" »