Jeremy Smith's blog

Entry Is Labelled

New Features: Email Subscriptions and Gravatars

If you've been poking around my blog, you may have noticed a couple of new things. Look over there to the right... at the bottom of the sidebar... that's right, you can now subscribe to my blog via email. Thus, whenever I update my blog, you would get an email that would include a link to my new post. And, yes, it comes with full administrative capabilities allowing you, as the subscriber, to unsubscribe and you, as the blog owner, to forcibly remove a person from subscribing. This new feature will be included in the default templates, but if you just can't wait, here is the MT specific tags you can place in your main index template on your blog to enable this functionality.

<h3>Subscribe to this Blog via Email</h3>
<p>Receive an email every time 
<a href="<$MTBlogURL$>" title="<$MTBlogName$>"><$MTBlogName$></a> 
is updated.
<form method="get" action="">
    <input type="hidden" name="dkey" value="<$MTBlogID$>:0" />
    Email: <input name="mail" />
    <input type="submit" class="button" value="Go" />

In addition, people can also subscribe to individual entries. So, if you have a big entry with 97 comments, people commenting on the entry who want to follow along as additional comments occur and/or updates are made to the original entry, they can subscribe to the particular entry via email. The markup looks remarkably similar to that above and should be placed in your individual entry archive template:

<h3>Subscribe to this Entry via Email</h3>
<p>Receive an email every time the entry 
"<a title="<$MTArchiveTitle$>" href="<$MTArchiveLink$>"><$MTArchiveTitle$></a>"
 is updated or commented upon.
<form method="get" action="">
    <input type="hidden" name="dkey" value="0:<$MTEntryID$>" />
    Email: <input name="mail" />
    <input type="submit" class="button" value="Go" />

And, to make the process of commenting on an entry and subscribing to that entry happen in one quick action, you can change your comments form to enable just that -- one click comment and subscribe. To enable that, replace your entire comment's form (everything inbetween the <form>...</form> tags with the following):

<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" onsubmit="if (this.bakecookie.checked) rememberMe(this)">
<input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />

<label for="author">Name:</label><br />
<input id="author" name="author" /><br /><br />

<label for="email">Email Address:</label><br />
<input id="email" name="email" /> <input type="checkbox" id="subscribe" name="subscribe" /><label for="subscribe"><strong>Subscribe</strong></label>
<p class="subscribeParagraph">If you have entered an email address in the box, clicking this checkbox will subscribe your email address to this entry so that you are notified if any updates or additional comments occur on the entry.</p>

<label for="url">URL:</label><br />
<input id="url" name="url" /><br /><br />

<label for="text">Comments:</label><br />
<textarea id="text" name="text" rows="10" cols="50"></textarea><br /><br />

<input type="checkbox" id="bakecookie" name="bakecookie" /><label for="bakecookie">Remember info?</label><br /><br />

<input type="submit" name="preview" value=" PREVIEW " />
<input type="submit" name="post" value=" POST " /><br /><br />

<input type="button" onclick="forgetMe(this.form)" value="FORGET PERSONAL INFORMATION" />

You're probably going to want to add some styling to make things look right. I used relative positioning and negative offsets to get everything in the spots that I wanted them in. Here's the snippet from my stylesheet template:

.subscribeParagraph {
    position: relative;
    left: 240px;
    top: -35px;
    overflow: auto;
    width: 315px;
    padding-bottom: 0px;
    margin-bottom: -90px;

But, wait, there's more. (I always feel like a sleazy, late-night infomercial guy whenever I use the phrase "but, wait, there's more." Though, I would make a great infomercial guy. I've seen enough of them, I know all the tricks. You should see how well I can cut through a tin can with a knife while cooking a full rack of lamb in under 20 minutes much to the amazement of my attractive female co-host.)

Poking around in the comments section of my blog (especially this entry), you should see that all of the commenters have a picture associated with them. In the Internet world, these are known as "avatars." In particular, these are "Gravatars" or "Globally Recognized Avatar" that can follow you around the Internet and be used on any site that seeks avatars and knows how to use gravatars. To get one, just follow the provided link and upload a picture.

My gravatar is my favorite sign to come upon on warm sunny days.

And, you get this all for 3 easy installments of $29.95. Yes, that's $29.95. And, if you call right now, and you promise to tell at least one friend about this incredible offer, I'll slash one of the payments. That's right, 3 2 payments of $29.95.


  1. gravatar

    I added the overall notification ability to my blog by following your directions, so patrons may subscribe by email.

    When I tried it, I got a message saying I was successful in submitting my email address. But the email address does not show up in my notification list on the user managed side. Does this take some time before it will appear or is it not working correctly?