« Make Flickr's Blog This Feature Work with Movable Type 4.0 | Main | Install Movable Type 4 in Yahoo! Small Business »

Favicon and Gravatar in MT4

Two of my favourite Movable Type plugins from versions prior to MT4 are Favicon and Gravatar. Both these plugins work fine in MT4 and it’s only a matter of knowing where to put them in the template modules.

Favicon is a plugin for Movable Type that adds favicons to comments and trackbacks.

Favicon for comments and trackbacks

Download and install the plugin as per the instructions on the download page. Follow the directions there for installing into MT versions prior to 4.0. The following instructions only apply to Movable Type 4.

Go to the Movable Type dashboard in your browser, Design > Templates > and click on Template Modules. Open the Comment Detail module.

Place the following code right before the <$MTCommentAuthorLink default_name="Anonymous" show_email="0"$> tag and save the changes.

<MTFaviconCommentIfAvailable>
<$MTFaviconComment full="1"$>
</MTFaviconCommentIfAvailable>

Open the Trackbacks Module and copy the following code to the footer section, placing it just before the words “Tracked on….”. Save your changes.

<MTFaviconTrackbackIfAvailable>
<$MTFaviconTrackback full="1"$>
</MTFaviconTrackbackIfAvailable>

Rebuild your entry pages to see the favicons in action.

GravatarA gravatar is a globally recognized avatar, that can be a picture of yourself or anything you like that is linked to an email address. When you leave a comment on a site that has gravatars enabled, a picture appears next to your comment. Three different versions are available for Movable Type, depending on how your blog is set up or how you want to install it. I have the MovableType CommentBodyPlusGravatar Plugin installed. When used inside the MTComments tag as a replacement for MTCommentBody, outputs the comment body and inserts the gravatar image code inside the opening <p> tag. This is important if you want to use CSS to float the image so that text will wrap around it.

Download and install the plugin, and follow the instructions for the version you’ve chosen. Open the Comment Detail module and insert the tag inside the comment content section. Here’s an example of how mine looks.

<div class="comment-content">
<$MTCommentBodyPlusGravatar class="floatimgright" size="40" rating="R" default="http://mt4.juneeonline.com/avatar.gif"$>
</div>
<br style="clear: both" />

Use <br style="clear: both" /> to push the next comment down so they don’t pile up on top of each other or overlap. Don’t forget to rebuild your site to see the changes.

Comments (1)

I've written a MyBlogLog avatar plug-in that you can get from here: http://www.robbuckley.co.uk/mtmybloglog.php

It's not brilliant, but it works! (I find that very few people have Gravatars, but many more have MyBlogLog accounts)

Post a comment

(If you haven't left a comment here before, your comment may need to be approved before will appear on the entry. Thanks for waiting.)