<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Posts by Toni Hambilton on Learning Movable Type</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/" />
   <link rel="self" type="application/atom+xml" href="http://www.learningmovabletype.com/contributors/toni/" />
   <id>tag:www.learningmovabletype.com,2008-02-25:/5</id>
   <updated>2007-12-12T21:56:13Z</updated>
   <subtitle>Tutorials and helpful tips for the Movable Type web publishing system</subtitle>
   <generator uri="http://www.movabletype.org/">Movable Type Pro 4.361</generator>

<entry>
   <title>Favicon and Gravatar in MT4</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/favicon_and_gravatar_in_mt4/" />
   <id>tag:www.learningmovabletype.com,2007://5.1934</id>
   
   <published>2007-11-09T09:57:20Z</published>
   <updated>2007-12-12T21:56:13Z</updated>
   
   <summary>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&#8217;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...</summary>
   <author>
      <name>Toni Hambilton</name>
      <uri>http://mt4.juneeonline.com/babble-on/</uri>
   </author>
   
      <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="comments" label="Comments" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="favicon" label="Favicon" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="gravatar" label="Gravatar" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="plugins" label="Plugins" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="trackback" label="Trackback" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>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&#8217;s only a matter of knowing where to put them in the template modules. </p>

<p><a href="http://gemal.dk/mt/favicon.html">Favicon</a> is a plugin for Movable Type that adds favicons to comments and trackbacks. </p>

<p><img src="http://mt4.juneeonline.com/babble-on/images/Picture1.jpg" width="191" height="66" alt="Favicon for comments and trackbacks" /></p>

<p>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.</p>

<p>Go to the Movable Type dashboard in your browser, Design &gt; Templates &gt; and click on Template Modules. Open the Comment Detail module.</p>

<p>Place the following code right before the <code>&lt;$MTCommentAuthorLink default&#95;name="Anonymous" show&#95;email="0"$&gt;</code> tag and save the changes.</p>

<pre><code>&lt;MTFaviconCommentIfAvailable&gt;
&lt;$MTFaviconComment full="1"$&gt;
&lt;/MTFaviconCommentIfAvailable&gt;
</code></pre>

<p>Open the Trackbacks Module and copy the following code to the footer section, placing it just before the words &#8220;Tracked on&#8230;.&#8221;. Save your changes. </p>

<pre><code>&lt;MTFaviconTrackbackIfAvailable&gt;
&lt;$MTFaviconTrackback full="1"$&gt;
&lt;/MTFaviconTrackbackIfAvailable&gt;
</code></pre>

<p>Rebuild your entry pages to see the <a href="http://mt4.juneeonline.com/babble-on/archives/2007/08/installed_mt4_release.php">favicons in action</a>. </p>
]]>
      <![CDATA[<p><a href="http://site.gravatar.com/signup"><img src="http://mt4.juneeonline.com/babble-on/images/a52.gif" width="50" height="50" alt="Gravatar" class="floatimgleft" /></a>A <a href="http://www.gravatar.com/">gravatar</a> 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 <a href="http://site.gravatar.com/site/implement#section_2_4">MovableType CommentBodyPlusGravatar Plugin</a> installed. When used inside the <code>MTComments</code> tag as a replacement for <code>MTCommentBody</code>, outputs the comment body <strong>and</strong> inserts the gravatar image code <strong>inside</strong> the opening <code>&lt;p&gt;</code> tag. This is important if you want to use CSS to float the image so that text will wrap around it. </p>

<p>Download and install the plugin, and follow the <a href="http://site.gravatar.com/site/implement">instructions</a> for the version you&#8217;ve chosen. Open the Comment Detail module and insert the tag inside the comment content section. Here&#8217;s an example of how mine looks. </p>

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

<p>Use <code>&lt;br style="clear: both" /&gt;</code> to push the next comment down so they don&#8217;t pile up on top of each other or overlap. Don&#8217;t forget to rebuild your site to see the changes. </p>
]]>
   </content>
</entry>

<entry>
   <title>Create a Contact Form using MT4</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/create_a_contact_form_using_mt4/" />
   <id>tag:www.learningmovabletype.com,2007://5.1822</id>
   
   <published>2007-10-09T06:27:28Z</published>
   <updated>2007-10-11T14:04:34Z</updated>
   
   <summary>I have used the contact form on previous versions of Movable Type following the instructions from Learning Movable Type and it&#8217;s always worked well. Trying to implement it in MT4 has proved more difficult because of the way the templates are set up using modules. Several templates need to be...</summary>
   <author>
      <name>Toni Hambilton</name>
      <uri>http://mt4.juneeonline.com/babble-on/</uri>
   </author>
   
      <category term="Email" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="captcha" label="Captcha" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="contactforms" label="Contact Forms" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="email" label="Email" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>I have used the contact form on previous versions of Movable Type following the instructions from <a href="http://www.learningmovabletype.com/a/001873creating_a_cont/">Learning Movable Type</a> and it&#8217;s always worked well. Trying to implement it in MT4 has proved more difficult because of the way the templates are set up using modules. Several templates need to be modified to get this to work.</p>
]]>
      <![CDATA[<p>Before you begin, install the ReCaptcha plugin provided by Movable Type. </p>

<ol>
<li>Copy the reCaptcha folder from extras/examples/plugins to your plugins directory.</li>
<li>Edit the reCaptcha.pl file: change <code>system&#95;config&#95;template</code> to <code>config&#95;template</code> at line 20.</li>
<li>Also in reCaptcha.pl at line 29, add your <a href="http://recaptcha.net/whyrecaptcha.html">keys</a> like so:</li>
</ol>

<pre><code>['recaptcha&#95;publickey', { Default =&gt; 'YOUR-PUBLIC-KEY-HERE' }],
['recaptcha&#95;privatekey', { Default =&gt; 'YOUR-PRIVATE-KEY-HERE' }],
</code></pre>

<p><strong>Update:</strong> Editing <code>recaptcha.pl</code> is <a href="http://mt4.juneeonline.com/babble-on/archives/2007/10/recaptcha_code_fixed_in_movabl.php">not necessary</a> since the release of Movable Type 4.01. Install as per the readme in the plugin folder and it should work properly. (A good reason to update!)</p>

<p>You need to create a new blog. I called mine Contact. </p>

<p>Now go to the Movable Type dashboard in your browser, Preferences &gt; Blog Settings &gt; Comments. 
Choose &#8220;Immediately approve comments from Anyone&#8221;. Select E-mail Notification as &#8220;On&#8221;. Near the bottom is a chooser called &#8220;CAPTCHA provider.&#8221; Select reCAPTCHA and click Save Changes.</p>

<p>Go the Registration. De-select Require Registration. Choose Anonymous Comments and Require E-mail Address for Anonymous Comments. De-select the rest of the options.</p>

<p>Rebuild your site to create the index pages.</p>

<p>Now go to Design &gt; Templates &gt; Archive Templates. Click on the Entry template. </p>

<pre><code>&lt;MTSetVar name="body_class" value="mt-archive-listing mt-entry-archive"&gt;
&lt;MTSetVar name="sidebar" value="0"&gt;
&lt;MTSetVar name="module_about_context" value="0"&gt;
&lt;MTSetVar name="body_onload" value="individualArchivesOnLoad(commenter_name)"&gt;
&lt;MTSetVarBlock name="page_title"&gt;&lt;$MTEntryTitle remove_html="1"$&gt;&lt;/MTSetVarBlock&gt;

&lt;$MTInclude module="Header"$&gt;

&lt;$MTInclude module="Comments"$&gt;

&lt;$MTInclude module="Footer"$&gt;
</code></pre>

<p>Change <code>&lt;$MTInclude module ="Comments"$&gt;</code> to <code>&lt;$MTInclude module ="Comment Form"$&gt;</code>. Under &#8220;Archive Mapping&#8221; at the bottom of the page change the &#8220;Path&#8221; to &#8220;Custom&#8221;. Fill in <code>%f</code> in the field. Save changes.</p>

<p>From the sidebar, under <strong>Includes and Widgets</strong>, click on Comment Form. Change the label for Comments to &#8220;Message&#8221;, and the heading &#8220;<code>&lt;&#95;&#95;trans phrase="Leave a comment"&gt;</code>&#8221; to &#8220;Please use this form to send an email&#8221; or something similar. </p>

<p>In System Templates, choose the Comment Response template. Change responses to match your contact form. Here is an example template. I have included a link back to the contact page in case of submission errors, and a button to close the window.</p>

<pre><code>
&lt;MTSetVar name="page_layout" value="layout-one-column"&gt;
&lt;MTSetVar name="system&#95;template" value="1"&gt;
&lt;MTSetVar name="feedback&#95;template" value="1"&gt;

&lt;MTIf name="body_class" eq="mt-comment-pending"&gt;
&lt;MTSetVarBlock name="page&#95;title"&gt;Thank You&lt;/MTSetVarBlock&gt;

&lt;MTSetVar name="heading" value="Thank you for e-mail."&gt;

&lt;MTSetVarBlock name="message"&gt;
&lt;p&gt;Thank you for contacting me. &lt;/p&gt;
&lt;/MTSetVarBlock&gt;

&lt;/MTIf&gt;

&lt;MTIf name="body_class" eq="mt-comment-error"&gt;
&lt;MTSetVarBlock name="page_title"&gt;Contact Submission Error&lt;/MTSetVarBlock&gt;

&lt;MTSetVar name="heading" value="$page_title"&gt;

&lt;MTSetVarBlock name="message"&gt;
&lt;p&gt;Your contact submission failed for the following reasons:&lt;/p&gt;
&lt;blockquote&gt;
&lt;$MTErrorMessage$&gt;
&lt;/blockquote&gt;
&lt;/MTSetVarBlock&gt;

&lt;/MTIf&gt;

&lt;MTIf name="body_class" eq="mt-comment-confirmation"&gt;
&lt;MTSetVarBlock name="page_title"&gt;Email Posted&lt;/MTSetVarBlock&gt;

&lt;MTSetVar name="heading" value="Confirmation..."&gt;

&lt;MTSetVarBlock name="message"&gt;
&lt;p&gt;Your email has been sent.&lt;/p&gt;
&lt;/MTSetVarBlock&gt;

&lt;/MTIf&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=&lt;$MTPublishCharset$&gt;" /&gt;
&lt;meta name="generator" content="&lt;$MTProductName version="1"$&gt;" /&gt;
&lt;link rel="stylesheet" href="&lt;$MTBlogURL$&gt;styles-site.css" type="text/css" /&gt;
&lt;title&gt;
&lt;$MTBlogName encode_html="1"$&gt;: &lt;$MTGetVar name="page_title"$&gt;
&lt;/title&gt;
&lt;script type="text/javascript" src="&lt;$MTBlogURL$&gt;mt-site.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body class="layout-one-column comment-preview" onload="individualArchivesOnLoad(commenter_name)"&gt;
&lt;div id="container"&gt;
&lt;div id="container-inner" class="pkg"&gt;
&lt;div id="banner"&gt;
&lt;div id="banner-inner" class="pkg"&gt;
&lt;h1 id="banner-header"&gt;&lt;a href="http://mt4.juneeonline.com/contact/contact_me.html"&gt;Contact&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="banner-description"&gt;&lt;$MTBlogDescription$&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="pagebody"&gt;
&lt;div id="pagebody-inner" class="pkg"&gt;
&lt;div id="alpha"&gt;
&lt;div id="alpha-inner" class="pkg"&gt;

&lt;h1&gt;&lt;$MTGetVar name="heading"$&gt;&lt;/h1&gt;

&lt;$MTGetVar name="message"$&gt;
&lt;p&gt;Return to the &lt;a href="http://mt4.juneeonline.com/contact/contact_me.html"&gt;contact form&lt;/a&gt;.&lt;/p&gt;
&lt;input type="button" onClick="javascript: window.close();" value="Close" /&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Save the changes.</p>

<p>Open the Comment Preview template and change the heading &#8220;<code>&lt;&#95;&#95;trans phrase="Previewing your Comment"&gt;</code>&#8221; to &#8220;Previewing your submission&#8221;.</p>

<p>Save the changes and rebuild your site.</p>

<p>Create an new entry, with the title &#8220;Contact&#8221; and nothing in the entry body or extended entry. Publish the entry. View your site and open the entry by clicking on <strong>permalink</strong>. Note the URL of the contact form.</p>

<p>You can follow <a href="http://www.learningmovabletype.com/a/001873creating_a_cont/">Elise&#8217;s instructions</a> on <a href="http://www.learningmovabletype.com/">Learning Movable Type</a> for creating a popup window for the contact form if that&#8217;s what you want. </p>

<p>Click on &#8220;Preview&#8221; to see the Contact Form page. Test the form by sending yourself a test message. </p>

<p>The last step is to create a link on the websites for visitors to contact you.</p>

<pre><code>&lt;a href="http://www.yoursite.com/contact/contact.html" 
target="_blank" rel="nofollow"&gt;Contact&lt;/a&gt;
</code></pre>

<p>Why not <a href="http://mt4.juneeonline.com/contact/contact_me.html" target="_blank">send me an email</a> using the Contact Form I created if you&#8217;re having problems?</p>
]]>
   </content>
</entry>

</feed>

