« Life | Main | Programming »

August 24, 2007

MT hack-a-thon day at Six Apart, Japan

Today I’ve been participating in the Movable Type hack-a-thon hosted by our Six Apart office in Japan. And I’ve been updating some of my older Movable Type plugins for 4.0 compatibility. Hey— did you know we released MT 4.0? They even made a cool t-shirt for the event— one that won’t make sense to a lot of folk, but I certainly appreciate it (and the irony is that my work today eliminates the ‘extlib/bradchoate’ installation path for these plugins).

T-Shirt for SixApart Japan hack-a-thon attendees Anyway, I made a list of some of the plugins that are obsoleted by MT 4 or previous versions since joining Six Apart. Each of the following plugins have most if not all of their functionality built into Movable Type itself:

  • MT-Authors (exceptions: AuthorBlogCount, AuthorEntryCount, AuthorPublicKey)
  • Supplemental Category Tags
  • IfEmpty (use the new ‘if’/’unless’ tags instead)
  • Regex (exceptions: many arcane uses; the important stuff is supported)
  • Textile (bundled)
  • EmbedImage (replaced by asset framework and assetthumbnail tag)

And some other plugins I have written are now re-released for MT 4:

The SQL and PerlScript plugins were also improved upon. The SQL plugin now allows you to connect to additional databases (even running on different servers) for issuing queries against them. Pretty nice if you need to pull content into your blog from other sources.

PerlScript now uses the Perl ‘Safe’ module to run in a protected compartment. This can be customized (and even disabled), but it is a good default to use for such a plugin.

January 7, 2007

Another antispam strategy: no anonymous linking

I’m trying out a new anti-spam strategy on my blog. It’s no secret that the #1 reason for blog spam are links. Without a clickable link, what would be the point?

So I’ve taken a stab at making a new Movable Type plugin, called “URLess” which enforces the following policy:

  • For unauthenticated comments (those sent without signing in through TypeKey or OpenID, etc.), links are not permitted— not in a “URL” field (which is now hidden until you sign in), nor within the text of the comment itself.
  • Once someone signs in, they get a URL field and may also leave links within the comment text itself.
  • Optionally, the plugin can be configured to only allow links for trusted authenticated commenters (trust status is assigned manually by the blog owner).

After enabling this policy, all blog spam has been trapped by it. I have received a couple of comments from people trying to provide links— they did so by removing the “http://” prefix, which is fine… the address is not linked automatically, although I can edit them to make them real links if I choose to do so.

But most valid comments are posted without links— they’re just voicing a response to what has been said. And while this prevents links from anonymous commenters, if someone really wants to share a link, they can just authenticate.

You can find this plugin here. The instructions for installing the plugin are available in the README.txt file included in the archive. You’ll have to tinker a bit with your templates to conditionally display/hide the URL field as necessary and the instructions cover that too. Believe me, it’s worth it.

With this policy in place, the only way to receive spam is:

  • You get anonymous spam that contains no links, but has URL fragments, that the spammer (I guess) expects people to copy and paste to navigate to. Certainly, a search engine wouldn’t grok or follow links like this.
  • You get spam from authenticated commenters. I’m sure there are a few TypeKey spammers out there, but not many. Fortunately, these are easy to ban and that will ban that identity permanently. You can also get their TypeKey account disabled if you report the abuse to Six Apart.

My hope is that this will prove effective enough for me to allow unmoderated commenting once again. Unfettered discussion is crucial to blogging.

Updated to fix the download link. Sorry!

September 30, 2006

Teasing your entries

Well it’s been far too long since I posted a Movable Type tip, so here goes.

Have you ever wanted to display a blog entry one way on your main index page and another way on your archives page?

Movable Type 3.3x’s default templates now include CSS classes for the body HTML element on various pages published. (Not that you can’t do that with any previous version of MT; it’s just enabled by default now.) This is helpful, since it lets you create CSS rules that are context sensitive.

The body tag for my individual archive template starts like this.

<body class="layout-two-column-right individual-entry-archive">

By the way, there’s no mistake that there are two class names assigned here— this is completely legal as far as CSS is concerned.

So… what can you do with that? Well, for example, let’s say you sometimes want to include a “teaser” phrase that is intended to draw the person reading the summary on the main page (or the RSS feed of the post) to the rest of the entry.

Continue reading to find out how this is done.

Continue reading "Teasing your entries" »

August 26, 2005

MT 3.2 and LightTPD/FastCGI

One of the other exciting features of MT 3.2 is some improvements we made for persistent Perl environments. As such, we are providing some preliminary support for FastCGI. MT 3.2 can now run under LightTPD and FastCGI.

Continue reading "MT 3.2 and LightTPD/FastCGI" »

August 25, 2005

Movable Type 3.2!

Powered by Movable Type 3.2

I’m pleased as punch to also say Movable Type 3.2 is now available. Whew. Where to start?

The upgrade process is brand new. MT now has an extremely straight-forward upgrade process. If you’ve ever been bitten by the “I ran the mt-upgradeY.cgi script before the mt-upgradeX.cgi script!” problem, have no fear. MT 3.2 knows where you’re upgrading from and does it with style. Installing and upgrading MT has never been easier.

The new entry basename field lets you name your permalink the way you want it. I’ve been wanting this since MT 1.0 and finally, the field is on the compose screen. (If you’re using MT 3.2 and you don’t see this field, you may need to customize your entry edit screen preferences to enable it.)

SpamLookup is right there in the package. I’m very happy to say that MT now ships with spam protection enabled out of the box. Along with the new scoring framework and the wonderful “Junk” folder, MT now provides a home for all that garbage looking to be published on your weblog. Since the settings for SpamLookup are so user-configurable, I’m hoping that it provides a sufficiently difficult target for spammers to hit. With enough of us blocking this stuff, weblog spamming may prove to be more trouble than it’s worth.

The new templates. Much simpler. Better structure. In fact, the same HTML markup structure is used on TypePad. And you can choose the same markup structure for LiveJournal. The result? All three products can use the same set of stylesheets. That means that all those styles available to TypePad users can now be used with Movable Type. And here they are. I plan to reboot my site in short order to make use of all of that. And MT 3.2 includes a little plugin to let you switch to the new default templates, making a backup of your existing templates in the process.

Access keys. I love using the keyboard instead of a mouse whenever I can. So we sprinkled access key shortcuts throughout the buttons in Movable Type to make those common buttons easier to press.

API improvements. Making it easier for plugins to load and find their templates; providing a way to configure plugins from within MT itself; letting plugins register actions to execute against lists of things.

Oh— the UI enhancements. Access keys were one thing, but the listings in 3.2 are sweet. Selecting a range of rows using “click” and “shift click”. Row selection by clicking any part of the row (other than a hyperlink of course). Inverse selecting the table by shift-clicking the top-most “select all” checkbox. The multiple category selection panel that allows you to assign multiple categories, even for new entries. Color mini icons. Context-search control. Sensible list filtering interface. The tabbed interface for the entry edit screen.

System overview! Being able to view all of your entries, comments, weblogs, etc. This was sort of introduced with SpamLookup, but now it’s for everything.

Plugins! The plugin listing screen rocks. You can even see those good ol’ plugins I wrote in 2002 now. You can see what tags are provided by them. You can see which are broken. You can disable them one by one. You can enable them one by one. You can turn them all off. You can turn them all on. You’re in control. Well, if you’re the system administrator that is.

Built for 3.2. A number of old plugins and new plugins are coming out for the 3.2 party. Media Manager, StatWatch, MT-Upcoming, MT-Notifier, Builderoo and a number of plugins that are underway from Arvind at Movalog. MT development is really hopping with this release and I’m very happy to see that.

The 3.2 Beta. The beta for this release was open to the public and this release really benefitted from that. We had excellent bug reports from those that participated and had a good time throughout it all. We couldn’t have done it without you. And you can be sure we will be repeating that in the future.

The new manual. The new user manual is online and is open for comments. Much like the ones found at mysql.com and php.net, the best documentation comes with supplements from the users that use the product.

Unlimited blogs for everyone. MT 3.2 now offers unlimited weblogs for all licenses, including the personal free edition.

It’s been a long but rewarding day seeing the positive responses to this release. Thanks for all of those. You know who you are.

MT 3.2 Now!

What are you waiting for? MT 3.2 NOW!

See Also:

August 1, 2005

Hacking Movable Type

The book is finally here. Jay, Ben, Matt, David and I are very happy to have this work published in print at last. 336 pages of MT goodies.

Things have been quiet here lately. Too quiet. And this site is in desperate need of a facelift. I hope to do that within the next couple of weeks. We’ve been hard at work on Movable Type 3.2. If you haven’t heard, a beta release is available— open to the public! The beta period is almost over, which means the release is near. I’m incredibly proud of our team and the work that has gone into this one.

Hacking Movable Type, indeed.

April 19, 2005

Sweet 3.16

If you haven’t heard yet, Movable Type 3.16 has been released. Lots of various bug fixes and subtle enhancements in this one. Be sure to upgrade. If you’re not running 3.x yet, you’re missing out.

To celebrate the occasion, I’ve created a new logo for the app.

It matches the MT graphics on the newly designed Six Apart web site. To install it, just download the image above and copy it into Movable Type’s “images” directory. You can backup the original one first if you ever want to switch back.

April 7, 2005

Introducing SpamLookup

Yes, it’s another anti-spam plugin. I would have called it MT-DSBL 2.0, but the feature set grew beyond the name, so a more generic name was chosen. This is a 2.0 release however… the plugin deserves more seniority than a 1.0 release, since it was built of the carcass that was MT-DSBL 1.1.

The first beta release is now available. Please visit the project page for SpamLookup to download it.

So, what does this thing do? Well, in a nutshell:

  • Filters inbound comments for all installed weblogs.
  • Filters inbound TrackBack pings for all installed weblogs.
  • Checks IP address of sender against DNSBL services.
  • Checks mentioned domain names against SURBL services.
  • IP match test for TrackBack pings.
  • URL count limit.
  • Dynamic proxy checking.
  • Moderation word list.
  • Block word list.
  • Passphrase requirement for comments and/or TrackBack pings.

All of these are fully configurable. You can also choose whether to block or to moderate on any of these conditions. Also, you get the choice of moderating TrackBack pings if you have also installed the MT-Moderate (version 1.1 or later) plugin by Chad Everett.

The plugin also has some sensible bypasses, if you choose to enable them.

  • Accept comments from authenticated commenters.
  • Accept comments that have no hyperlinks.
  • Accept comments that use a URL that was previously approved.

SpamLookup is more than just a collection of anti-spam filters. It also lets you manage your comments and TrackBack pings a little better. The comment and TrackBack ping management screens lets you view all records for all weblogs you have installed. From there you can do mass approval, deletion and moderation.

And finally, a despam option is available. Despam will scan your existing comments or TrackBack pings using all of the SpamLookup options you have enabled and will give you the chance to act on anything fishy that turn up. If you know you have existing comment spam, this is a handy way to easily dispatch it.

I’ve been running this plugin on my site for testing purposes, with it being the only antispam plugin installed and it has been performing very well. However, your mileage may vary.

SpamLookup does a great job combatting spam flooders since they predominately use open proxies to appear as if they are coming from different sources. The DNSBL lookups (quick, DNS based lookup based on IP against a database of known open proxies) put a stop to that. Furthermore, they domains they use to spam with are checked against SURBL lists (quick, DNS based lookup based on the domain against a database of known spam domains). URL limits are also helpful since a lot of weblog spam tries to push through dozens or more hyperlinks at a time.

Continue reading "Introducing SpamLookup" »

October 20, 2004

MTIfEmpty

Update: A 2.01 release of MT-IfEmpty is now available, which mainly adds support for dynamic publishing in MT 3.1x.

You can download this plugin here: mtifempty-2_01.zip.

Continue reading "MTIfEmpty" »

September 8, 2004

Movable Type 3.1 and stuff

It’s time I revive this web site. I need to upgrade to MT 3.x myself. I can’t believe I’ve put it off for so long, but time has just not been on my side of late. I’ll also be moving it to another server soon, so if the site is dark for a day or two, don‘t say I didn’t warn you.

I’m in San Francisco, working at the new place and it’s been a great week. My job at the moment revolves around the dynamic publishing feature I created for Movable Type. I’ve got a lot to document about it. The API, plugin development and so forth. There will be some tutorials published shortly on the Six Apart Professional Network. If you haven’t joined yet, you should — it’s free!

And yes, it’s true— PHP doesn’t run Perl (Yes, I’m aware of the PHP 5 PECL extension that runs Perl. But it is for PHP 5 and we had to target PHP 4. Even then, it’s not a native PHP 5 module, so it would require compilation and installation to run. It’s also classed as an experimental module. Etcetera.). If PHP could run Perl natively, imagine how many WordPress/Textpattern users would be using the Perl MT plugins already! So I will also be porting some of my plugins to run under PHP (you can vote for your favorites through the comments here). You have to have a different mindset too when dealing with dynamic publishing. The plugin code I wrote for MT/Perl runs OK for static publishing, but I would take a different approach in many cases with a dynamic model. Caching data a little better goes a long way.

There’s a lot of PHP out there to leverage too. Most notably, Textile, Markdown and SmartyPants are all available.

I should also mention that David Raynes (who did the sub-category support for MT 3.1) has created a migration tool that will be helpful to anyone that was using his subcategories plugin prior to the 3.1 release.

Categories

Archives

Powered by Movable Type