Steve asks:

Quick question, how do you get the different icons to show up based on categories like you have in your personal site? Can you also do it by author?

This is quite simple to implement and can be done either with the use of plugins or doing it manually using MT Tags

Category Icons

You can either use TopicIcon to do this 'automatically' - just follow these instructions. Alternatively you can do it manually, add this code in your templates between the <MTEntries>...</MTEntries> tags.

<img src="http://www.movalog.com/images/cat_icons/<$MTEntryCategory dirify="1"$>.gif" alt="<MTEntryCategory>" />

So for example, if you had a category called Internet, you would need an image called internet.gif (in some cases you will also need an Internet.gif)

Author Icons

I haven't found a plugin to do this so it'll have to be done manually, again implementation quite easy. Just add this code anywhere between the <MTEntries>...</MTEntries> tags (most people add it in the posted section):

<img src="http://www.movalog.com/images/author_icons/<$MTEntryAuthor$>.gif" alt="<MTEntryAuthor>" />

For example, if one of your authors was called Bob, you would need a Bob.gif (and in some cases a bob.gif)

2 Comments

Matt Ashby said:
on Sep 30, 2004 12:47 AM | Reply

If you replace <$MTEntryAuthor$> with <$MTEntryAuthor dirify="1"$> then you only need bob.gif, not Bob.gif or bOB.gif

zeebeest said:
on Dec 5, 2004 2:44 PM | Reply

Hi,

I used a little php code to do the same thing.

Using the php code you don't run into the problem of showing an ugle empty image in case there is no icon for a category yet.

It also takes into account posts with multiple categories by using the &ltMTEntryCategories&gt tag instead of the one you used.

The code can be found at: http://www.zeekoeienzijngeweldig.nl/archief/cat_movabletype.php#000155 in the post called "Icoontjes in MovableType".

Leave a comment

Preview