MovableBlog: Archives: May 2002

A weblog about the Movable Type Publishing Platform and other geekery

May 30th, 2002

Most Recent Categories »

See my post on the Tips and Tricks forum for displaying the most recent categories with entries, but without duplicates.

That might sound a little confusing, but read through the posts, and it should make sense.

Posted by Richard at 08:54 PM | Category: MT | Comments (2)

Support Board Tips »

How to ask for help on the MT Support Forum. Some great tips, and useful for other Ikonboard-powered message boards as well.

Posted by Richard at 07:55 PM | Category: MT | Comments (0)

Sliding Menu powered by MT »

This requires PHP (or the ability to do SSI includes) on your server as well as Javascript enabled on the client's browser.

I have it set up as two blogs in MT, one for the links, and one for the blog content.

In the blog content's main index, between the <head> tags, insert this Javascript code:

<script type="text/javascript">
function toggleMenu(currMenu) {
if (document.getElementById) {
thisMenu = document.getElementById(currMenu).style
if (thisMenu.display == "block") { thisMenu.display = "none"
else { thisMenu.display = "block" }
return false
else { return true }

And the CSS, also between the <head> tags, for the menu looks like this:

.menu { border-left: 1px #FFFF00 solid;
padding-left: 2px;
display: none; margin-left: 15px; }

Modify the color in the menu as required.

Just to repeat, all that code was in the main index file of the main blog.

Then create another blog in MT, which will contain the links in your sidebar or wherever you want the menu. Delete all the templates and turn off archiving. Then create a new index template. For mine, I used the filename resources.html. You can choose what you want. (Note that I have the same blog directories as in the main blog.)

The resources.html template in the second blog looks like this:

<a href="" onMouseOver="(window.status='toggle
return true;" onMouseout="window.status=' '"
onClick="return toggleMenu('<$MTCategoryLabel dirify="1"$>')"><u><b><$MTCategoryLabel$></b></u></a>
<br />
<span class="menu" id="<$MTCategoryLabel dirify="1"$>">
<MTEntries sort_by="title" sort_order="descend">
<$MTEntryBody$><br />

Every time you want to add a link, the "Main Entry Text" is a simple HTML URL, e.g.:

<a href="">CNN</a>

Each heading in the menu is an MT category, so make sure you categorize the entry before publishing it.

Now go back to the main blog and insert the following code where you want the menu to appear:

<?php include("resources.html"); ?>

If you don't have PHP but can do SSI includes, then use the following code:

<!--#include virtual="resources.html"-->

(Javascript code taken from JavaScript for the World Wide Web by Tom Negrino and Dori Smith, pp. 290-1)

Posted by Richard at 02:34 PM | Category: MT | Comments (2)

May 27th, 2002

Important Security Alert »

Ben has alerted users to delete mt-load.cgi from their systems. His words: "There is a hacker (or a group of hackers) hacking MT sites by running mt-load.cgi to gain access to the system. You are not vulnerable to this if you deleted mt-load.cgi."

Delete mt-load.cgi (and mt-upgrade.cgi) if you haven't already done so.

Posted by Richard at 02:38 AM | Category: MT | Comments (0)

May 22nd, 2002

Alternative Message Board »

This site just got linked at the Z-List, and poking my way through, I found the Ask A Geek forum, which has the following description:

"Problems with Blogger, Greymatter, Movable Type, Life, Death, abstinence from chocolate? Fire away. We could all learn a thing or two."

Looks like a good alternative to the 'official' MT boards (even though they are still a staggeringly good resource, am I wrong here folks?).

Kind of too bad there's no answer to the question "is anyone running MT on an IRIX box running netscape's enterprise server software?" though. It's something I would have never have thought to ask!

Posted by Richard at 11:27 PM | Category: MT | Comments (0)

Import Comments »

Import YACCS comments in MT; Import dotcomments comments in MT; Import dotcomments with a Greymatter install into MT.

Posted by Richard at 01:22 AM | Category: MT | Comments (1)

May 15th, 2002

"Words" and photolog tutorial »

An unintentionally undocumented attribute exists in <$MTEntryBody$>. The words attribute allows you to show just the first n words in your entry body.

Also, using the Main Entry Text, Additional Entry Text, and the Excerpt fields, Jeremy created a great-looking photolog using MT. There's also a tutorial in "five" steps.

Posted by Richard at 01:53 PM | Category: MT | Comments (1)

May 13th, 2002

Exclude a Single Category »

I worked on this for about a half-hour and it actually worked.

Might noticeably slow down your site, because there's PHP for each entry.

Note: there are still some bugs to work out. Like how the date header doesn't show up if the excluded category is the latest post.


$category_array = array();
$category_array[] = "<$MTCategoryLabel$>";

$flagged = FALSE;
for ($i = 0; $i < $count; $i++)
if ($category_array[$i] == "CATEGORY_NAME")
{ $flagged = TRUE;

if (!$flagged)

[insert MT code and HTML here; this will only get shown on your site if CATEGORY_NAME is not one of the categories for the individual entry]





Posted by Richard at 01:25 PM | Category: MT | Comments (3)

May 11th, 2002

Stop Spam-pinging » Stop spam-pinging - a great idea. Like today, when I found out there was a typo in an old post. Making the change pinged, but people coming in from there would not have seen any 'new' content on my front page. (Aside: the way I found out about the typo was kinda funny. A searcher misspelled "lottery" and actually found "lotery" in my post, which prompted the change.)

Note that this requires hacking the actual executable code of MT, which means you should back up your copy before doing so.

[via David Gagne]

Posted by Richard at 08:41 PM | Category: MT | Comments (1)

May 6th, 2002

Blogdata »

David Gagne wrote an excellent tutorial for his "Blogdata" module. I particularly like the "'Hidden' Entry-Editing Link", which is very similar to MT-Search's link to editing a post. (The difference is that Gagne's idea is embedded in the HTML for all to see but is "hidden", whereas MT-Search uses the CGI to determine if the cookies on your computer you're using has been set to MovableType being logged in, and then adds the edit tag.)

Posted by Richard at 02:19 AM | Category: MT | Comments (0)

May 5th, 2002

Non-Consecutive Dates »

Non-Consecutive Dates - How To - this is useful if you want show the last n days that you posted, rather than just the last n days (which, if you don't blog daily, could end up leaving you with one posting on your site; or even none if you rebuild long enough after your last post!).

Posted by Richard at 01:43 PM | Category: MT | Comments (0)

May 4th, 2002

MT 2.11 »

MT 2.11 (Bug Fix Release): if you already have 2.1, it's an easy upgrade to 2.11, so I recommend going for it.

Posted by Richard at 10:16 PM | Category: MT | Comments (0)

May 2nd, 2002

MT 2.1 »

MovableType 2.1 released!.

Yes, that's 2.1, not 2.01 as initially thought.

I immediately used the rebuilding-just-one-template feature so that the template for showing a random entry didn't get rebuilt after every post.

(For the random entry template, see this thread for the code I used.)

Posted by Richard at 09:06 PM | Category: MT | Comments (0)