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">
            <div class="comment-content-inner">
                    <$MTCommentBodyPlusGravatar class="floatimgright" size="40" rating="G" default="http://yoursite.com/blog/images/gravatar.gif"$>
                    <br style="clear: both" />
            </div>
        </div>

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.

6 Comments

Why is that when I do it and I follow your instructions, it messes up and the sidebars are gone, and the footer is screwed up?


You need to add a class to your stylesheet called floatimgright


.floatimgright {
float:right;
margin-top:10px;
margin-left:10px;
margin-bottom:10px;
border: 1px solid #ddddd9;
padding: 3px;
}

Adding the style might help.


Disregard my last reply... I finally found out how to do it! But the comment box (the speech bubble) seems to be a little cut off on the sides. Is there a way to fix that?


How about a link to your site? If I can see what the problem is I might be able to fix it for you.


I've posted the link in the URL field. I took off the Gravatar code, so I'll just have to rebuild the site and you'll be able to see it. Thanks for your time Toni!


Sorry Michael, The code for adding a gravatar was wrong. I had the br following the div when it should have been before. I wrote this post before updating to the Mid-Century template set, but the correct code is there now. I hope you get it working.


Leave a comment



Recent Entries

  • Send Entries Using HTML Formatted Email

    There used to be a plugin for earlier versions of Movable Type called "MT-Mail-Entry":http://www.nonplus.net/software/mt/MT-Mail-Entry.htm that allowed you to send friends a HTML-formatted email that included...

  • All Comments Not Getting Published

    I had a problem viewing some of the comments on one of my posts. I thought it must be a comment limit somewhere in the...

  • MT 4.23 Update Released

    Movable Type has released a security upgrade that fixes XSS vulnerabilities, and recommends updating to 4.23 as a mandatory. The vulnerability hasn't been exploited yet,...

  • Updated Joost Action Streams Plugin

    The plugin for [Joost Action Streams](http://mt4.juneeonline.com/babble-on/archives/2008/10/joost-action-streams-plugin.php) has been updated to include favourites. If you've previously installed this plugin I recommend deleting Joost from "Other Profiles"...

  • Adding the ShareThis Button to Mid-Century

    There's a tutorial on Rob Kenny's The Composing Stick with instructions for adding AddThis or ShareThis buttons to your posts. After receiving a request today,...

OpenID accepted here Learn more about OpenID