<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Posts by Michelle Jones 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/michelle/" />
   <id>tag:,2008-02-25:/5</id>
   <updated>2008-01-27T23:02:26Z</updated>
   <subtitle>Tutorials and helpful tips for the Movable Type web publishing system</subtitle>
   <generator uri="http://www.movabletype.org/">Movable Type Publishing Platform 4.01</generator>

<entry>
   <title>Share This Post in Movable Type 4</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/share_this_post_in_movable_type_4/" />
   <id>tag:www.learningmovabletype.com,2008://5.2036</id>
   
   <published>2008-01-20T03:58:50Z</published>
   <updated>2008-01-27T23:02:26Z</updated>
   
   <summary>This isn&apos;t really a tutorial since I&apos;m just advising you to install a plugin and giving you some reference html to make it look a tiny bit nicer than it does by default. However I still think this might be useful information for at least a few people so here...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="General Tips and Tricks" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="HTML and Javascript" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Reference" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="delicious" label="Del.icio.us" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="digg" label="Digg" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="plugins" label="Plugins" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="socialbookmarking" label="Social Bookmarking" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>This isn't really a tutorial since I'm just advising you to install a plugin and giving you some reference html to make it look a tiny bit nicer than it does by default. However I still think this might be useful information for at least a few people so here we go:</p>

<p>Social bookmarking sites like <a href="http://www.digg.com">Digg</a>, <a href="http://del.icio.us">del.icio.us</a>, <a href="http://www.stumbleupon.com">StumbleUpon</a> and countless others are very popular with blogs and websites. Becoming popular on one of those sites attracts serious traffic and let's face it, most blogs and websites are always looking to boost traffic. So making it easier for people to "add to del.icio.us or "digg this" seems to be a good idea. By making it easier I mean we'll be adding links for several of the most popular social bookmarking tools to all existing and future entries for a given blog. </p>

<p>To accomplish this we're going to use the <a href="http://www.majordojo.com/projects/promote-this.php">Promote This! plugin</a> by Byrne Reese. Download and install the plugin per the directions. Once you've installed the plugin it's time to insert code into the Entry Detail template module. The Promote This! site gives the example of the code for adding a "digg this" link. If you follow that format you'll get a nice text link that works just fine. But if you want to jazz it up a tiny bit you can add the logos for each of the social bookmarking services you want represented. </p>

<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.onapathmedia.com/images/sharethis.html" onclick="window.open('http://www.onapathmedia.com/images/sharethis.html','popup','width=694,height=588,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.onapathmedia.com/images/sharethis-thumb-450x381.png" width="450" height="381" alt="sharethis.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span>]]>
      <![CDATA[<p>To get those handy little icons for each service you need to grab either the favicons or other logo button provided by the services. In the code below I'm hotlinking to all the images. I don't recommend you do this, it's just to show you the addresses of all the icons so you can grab them yourself and upload them to your own space.</p>

<p>This code will give you quicklinks to the sites that I've chosen to use/link to. Promote This! supports several other sites so feel free to add and subtract links as you like. </p>

<p><code>&lt;strong&gt;Share this post:&lt;/strong&gt;&lt;br/&gt;<br /><br />
&lt;img src="http://digg.com/favicon.ico"&gt;&lt;a href="&lt;$MTDiggURL$&gt;"&gt;digg&lt;/a&gt;<br /><br />
&lt;img src="http://del.icio.us/favicon.ico"&gt;&lt;a href="&lt;$MTdeliciousURL$&gt;"&gt; del.icio.us&lt;/a&gt;<br /><br />
&lt;img src="http://reallystatic.reddit.com/static/favicon.ico"&lt;a href="&lt;$MTredditURL$&gt;"&gt;reddit&lt;/a&gt;<br /><br />
&lt;img src="http://www.newsvine.com/favicon.ico"&gt;&lt;a href="&lt;$MTNewsvineURL$&gt;"&gt;Newsvine&lt;/a&gt;&lt;/td&gt;<br /><br />
&lt;br/&gt;&lt;img src="http://www.google.com/favicon.ico"&gt;&lt;a href="&lt;$MTGoogleURL$&gt;"&gt;Google Bookmark&lt;/a&gt;<br /><br />
&lt;img src="http://www.facebook.com/favicon.ico"&gt;&lt;a href="&lt;$MTFaceBookURL$&gt;"&gt;FaceBook&lt;/a&gt;<br /><br />
&lt;img src="http://www.stumbleupon.com/images/icon_su.gif"&gt;&lt;a href="&lt;$MTStumbleUponURL$&gt;"&gt;Stumble Upon&lt;/a&gt;</code></p>

<p>I've chosen to have links at the end of blog posts, before comments so I've placed the code, in the Entry Detail template module, between<br />
<code>&lt;$MTInclude module="Categories"$&gt;</code><br />
and <code>&lt;$MTInclude module="Tags"$&gt;</code>  </p>]]>
   </content>
</entry>

<entry>
   <title>Add Scrollbars to Image Popup Windows in Movable Type 4</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/add_scrollbars_to_image_popup_windows_in_movable_t/" />
   <id>tag:www.learningmovabletype.com,2007://5.1956</id>
   
   <published>2007-11-23T03:48:48Z</published>
   <updated>2007-11-25T07:23:43Z</updated>
   
   <summary>I post a lot of thumbnail images on Consuming Louisville that link to very large full size images. By default Movable Type doesn&apos;t add scrollbars or allow resizing for the popup windows created for images. That&apos;s a problem because those large images of mine get cut off with no way...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="HTML and Javascript" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Images" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="images" label="Images" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="popupwindow" label="Popup Window" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="thumbnail" label="Thumbnail" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>I post a lot of thumbnail images on <a href="http://www.consuminglouisville.com">Consuming Louisville</a> that link to very large full size images. By default <a href="http://www.movabletype.com">Movable Type</a> doesn't add scrollbars or allow resizing for the popup windows created for images. That's a problem because those large images of mine get cut off with no way to expand the window or scroll to see the rest of the image.   So of course I needed to turn on scrollbars and turn on window resizing for image popups. </p>

<p>Like with <a href="http://www.onapathmedia.com/archives/2007/11/how-to-change-the-default-imag.html">changing the default image upload location</a> I wish that there was a simple way, within the Movable Type application, to do this but there isn't one as far as I know. Instead we have to do a little monkeying around with the Movable Type application code. But, again like with changing the default image upload location, the is actually quite simple and only requires editing a single line of a single file.</p>]]>
      <![CDATA[<p>The file to edit is called Image.pm. Assuming you have your Movable Type files in your cgi-bin the path to this file looks something like cgi-bin/mt/lib/MT/Asset/Image.pm.</p>

<p>1. Download Image.pm (I highly recommend you save a backup copy of it before you edit it)</p>

<p>2. Open Image.pm and look for the following:<br />
<code>q|&lt;a href="%s" onclick="window.open('%s','popup','width=%d,height=%d,scrollbars=no,<br />
resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,<br />
left=0,top=0'); return false"&gt;%s&lt;/a&gt;|,</code></p>

<p>3. Change <br />
<code>scrollbars=no,resizable=no</code></p>

<p>to <code>scrollbars=yes,resizable=yes</code></p>

<p>So your final code should look like: <br />
<code>q|&lt;a href="%s" onclick="window.open('%s','popup','width=%d,height=%d,scrollbars=yes,<br />
resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,<br />
left=0,top=0'); return false"&gt;%s&lt;/a&gt;|,</code></p>

<p>4. Save and upload Image.pm</p>

<p>Now, the next time you have Movable Type create a popup window for the full size version of an image that popup window will have scrollbars and viewers will be able to resize it.</p>]]>
   </content>
</entry>

<entry>
   <title>Make Flickr&apos;s Blog This Feature Work with Movable Type 4.0</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/make_flickrs_blog_this_feature_work_with_movable_t/" />
   <id>tag:www.learningmovabletype.com,2007://5.1932</id>
   
   <published>2007-11-08T21:00:19Z</published>
   <updated>2007-11-21T12:07:29Z</updated>
   
   <summary>This tutorial is cross posted at On a path media Actually this applies to any version of Movable Type since 3.2 and to all kinds of external apps for posting to your Movable Type blog. I just suspect that the Blog This feature from Flickr is probably the most popular...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="Images" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Reference" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="externalapplications" label="External Applications" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="flickr" label="Flickr" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="images" label="Images" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p><i>This tutorial is cross posted at <a href="http://www.onapathmedia.com/archives/2007/11/make-flickrs-blog-this-feature.html">On a path media</a></i></p>

<p>Actually this applies to any version of Movable Type since 3.2 and to all kinds of external apps for posting to your Movable Type blog. I just suspect that the Blog This feature from Flickr is probably the most popular external blogging tool out there and it's really frustrating when you can't get it to work.</p>

<p>I should mention this post was inspired by my friend <a href="http://cecily.info">Cecily</a> who recently wrote about posting from <a href="http://cecily.info/2007/10/posting-from-textmate.php">TextMate to a Movable Type blog</a>. Her post reminded me about how the web services password can cause problems when setting up a Movable Type blog to work with <a href="http://www.flickr.com">Flickr's</a> Blog This feature. </p>

<p>When you go to setup your Movable Type blog with <a href="http://www.flickr.com">Flickr</a> you'll be asked for your password. Many folks put in their password only to be told its incorrect. They check and double check and absolutely certain they're putting the right password in only to still be rejected. The problem is that Flickr doesn't want your main blog password (the one you use to login to your blog with). What Flickr wants is your web services password. </p>

<span class="mt-enclosure mt-enclosure-image"><a href="http://www.onapathmedia.com/images/flickrblog.html" onclick="window.open('http://www.onapathmedia.com/images/flickrblog.html','popup','width=1013,height=575,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.onapathmedia.com/images/flickrblog-thumb-450x255.png" width="450" height="255" alt="flickrblog.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span>

<p>If you don't know what your web services password is that probably means you haven't set one up yet.  <b>System Overview -> Users -> Your User Identity</b></p>]]>
      <![CDATA[<p>flickrblog.png</p>

<p>If you don't know what your web services password is that probably means you haven't set one up yet. System Overview -> Users -> Your User Identity<br />
webservices.png</p>

<p>If you haven't set up a web services password the field will blank. If you have but can't remember what it is just click the reveal link and it will be shown. Now tell Flickr what your shiny new or newly revealed web services password is and you'll most likely be good to go.</p>]]>
   </content>
</entry>

<entry>
   <title>Alternating Comment Styles with Movable Type 4</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/alternating_comment_styles_with_movable_type_4/" />
   <id>tag:www.learningmovabletype.com,2007://5.1843</id>
   
   <published>2007-10-22T18:29:22Z</published>
   <updated>2007-10-23T11:54:58Z</updated>
   
   <summary>A list of comments, particularly a long list, that doesn’t include any style differentiation can get a little hard to read. Using two alternating comment styles will give your readers’ eyes a break and your blog a little more style. Happily, Movable Type 4 provides a relatively simple way to...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="Categories" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Style" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Templates" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="alternatestyles" label="Alternate Styles" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="comments" label="Comments" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="mt4" label="MT4" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="stylingcomments" label="Styling Comments" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>A list of comments, particularly a long list, that doesn’t include any style differentiation can get a little hard to read. </p>

<span class="mt-enclosure mt-enclosure-image"><a href="http://www.onapathmedia.com/images/Picture%201.png"><img alt="Picture 1.png" src="http://www.onapathmedia.com/images/Picture 1-thumb-450x259.png" width="450" height="259" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;"/></a></span>

<p>Using two alternating comment styles will give your readers’ eyes a break and your blog a little more style. Happily, Movable Type 4 provides a relatively simple way to do this. <br />
</p>]]>
      <![CDATA[<span class="mt-enclosure mt-enclosure-image"><a href="http://www.onapathmedia.com/images/Picture%202.png"><img alt="Picture 2.png" src="http://www.onapathmedia.com/images/Picture 2-thumb-450x260.png" width="450" height="260" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;"/></a></span>
There are really only two steps to implementing alternate comment styles. The first is actually creating the two different styles. You can of course call these styles anything you like but since the styles are going to alternate between even and odd comments I like to call the styles, well, even and odd. Define these styles however you like and place them in your stylesheet. Here’s an example: 

<p><code><br />
.even&#160;&#160;{ <br />
background-color:#FFF;<br />
padding:8px;<br />
margin-bottom:5px;<br />
}</p>

<p>.odd {<br />
background-color:#F4F4F4;<br />
padding:8px;<br />
margin-bottom:5px;<br />
border:2px dotted #999;<br />
}</code></p>

<p>Simple enough right? Good. The next step is where the alternating magic within Movable Type happens. I’m going to give you the code to make that magic work and then I’ll go into a bit of detail about what that code is doing. You can choose to either simply paste the code straight into your template and move on or you can dive into the why and how it works. </p>

<p>The following code can replace all of the code in your Comment Detail template module or you can paste the necessary new parts in. </p>

<p><code>&lt;mt:if name="__odd__"&gt;<br />
&lt;div class="odd"&gt;<br />
&lt;mt:else&gt;<br />
&lt;div class="even"&gt;<br />
&lt;/mt:if&gt;</p>

<p>&lt;div class="comment"&lt;MTIfArchiveTypeEnabled archive_type="Individual"&gt; id="comment-&lt;$MTCommentID$&gt;"&lt;/MTIfArchiveTypeEnabled&gt;&gt;<br />
&#160;&#160;&#160;&#160;&lt;div class="inner"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;div class="comment-header"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;$MTCommentAuthorLink default_name="Anonymous" show_email="0"$&gt; &lt;MTIfNonEmpty tag="CommentAuthorIdentity"&gt;&lt;$MTCommentAuthorIdentity$&gt;&lt;/MTIfNonEmpty&gt; </p>

<p>said:<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/div&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;div class="comment-content"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;$MTCommentBody$&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/div&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;div class="comment-footer"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;a href="#comment-&lt;$MTCommentID$&gt;" title="Permalink to this comment"&gt;&lt;$MTCommentDate format="%x %X"$&gt;&lt;/a&gt;</p>

<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/div&gt;<br />
&#160;&#160;&#160;&#160;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!--End odd or even class--&gt;</code></p>

<p>Pasted it in? Good. Seeing alternating styles between comments? Excellent. Why? It’s all thanks to <a href="http://www.movabletype.org/documentation/designer/loop-meta-variables.html">Template Loop Meta Variables</a> and if/else statements. </p>

<p>The Movable Type documentation explains Template Loop Meta Variables thusly: </p>

<blockquote>Movable Type exposes a number of different template tags called container tags that loop over a set of objects. This allows designers to display for example the last 10 entries on a blog, or to display each of the comments associated with an entry. <br/>As Movable Type iterates or loops over a list of objects in this fashion it maintains a number of meta variables for you, allowing you to test if the current item is an odd or even item in the list for example.
</blockquote>

<p>Got that? Maybe, maybe not. For our purposes the easiest way to understand this is to say that when anything Movable Type outputs takes the general form of a list where one item follows another (blog entries, comments, trackbacks, etc.) Movable Type keeps track of which items are oddly numbered (1, 3, 5) in that list and which are evenly (2, 4, 6) numbered.  Until you implement alternating comment styles or some other modification there is no difference between odd and even comments on your blog’s output. That doesn’t mean Movable Type doesn’t know which is which though. By knowing that difference Movable Type is able to conditionally apply different styles based on an if/else statement. That statement is:<br />
<code><br />
&lt;mt:if name="__odd__"&gt;<br />
&lt;div class="odd"&gt;<br />
&lt;mt:else&gt;<br />
&lt;div class="even"&gt;<br />
&lt;/mt:if&gt;</code></p>

<p>That code says “if a comment isn’t odd then it’s even. If it is an odd comment apply the odd style class, if it is an even comment then apply the even style class.” </p>

<p>You might be wondering, since the above code snippet doesn’t actually contain the word “comments” and it comes before any of the comment tags in the template we’ve put it in, how does Movable Type know for certain, that it’s odd and even numbered comments we want to keep track of. and not something else. In this case remember that the Comment Detail template module is pulled into the Comment template module as an include. So even though our code snippet is coming at the beginning of the Comment Detail template it’s really in the middle of all the tag soup for comments. So it’s clear to Movable Type that our if/else is referring to comments specifically. </p>

<p>This tutorial was inspired by a <a href="http://appnel.com/code/log/2007/10/alternating-values-in-mt">conversation about the Gizmos for MT plugin</a> at Appnel Solutions. </p>

<p>As always if I've made any mistakes or if you have any questions please let me know. </p>

<p>This tutorial is cross posted at <a href="http://www.onapathmedia.com/archives/2007/10/alternating-comment-styles-wit.html">On a path media</a>. Later this week at <a href="http://www.onapathmedia.com">On a path media</a> we'll look at how to style comments from a blog entry's author differently than other comments. </p>]]>
   </content>
</entry>

<entry>
   <title>Putting MT:MultiBlog to Work</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/putting_mtmultiblog_to_work/" />
   <id>tag:www.learningmovabletype.com,2007://5.1824</id>
   
   <published>2007-10-09T18:03:48Z</published>
   <updated>2007-10-10T07:02:31Z</updated>
   
   <summary>Last week on my personal blog I discussed how to put the MT:OtherBlog tag to use and compared that tag with using PHP includes to create the same functionality. In the comments of that post J. Brotherlove reminded me of one serious advantage PHP includes have over using MT:OtherBlog: automatic...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="General Tips and Tricks" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Reference" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Tags" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="multiblog" label="MultiBlog" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="otherblog" label="OtherBlog" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>Last week on my <a href="http://www.michellejones.net/onapath/2007/10/putting-the-mtotherblog-tag-to.php">personal blog</a> I discussed how to put the MT:OtherBlog tag to use and compared that tag with using PHP includes to create the same functionality. <br /> </p>

<p>In the <a href="http://www.michellejones.net/onapath/2007/10/putting-the-mtotherblog-tag-to.php#comments">comments of that post</a> <a href="http://www.thebrotherlove.com/">J. Brotherlove</a>
reminded me of one serious advantage PHP includes have over using
MT:OtherBlog: automatic updating. If I’m pulling content from Blog 1
with a PHP include into Blog 2 whenever Blog 1 is updated the pulled
content is automatically updated on Blog 2. This isn’t the case when using
MT:OtherBlog. When I update Blog 1 the pulled content on Blog 2 will
not be updated until Blog 2 is rebuilt (either indexes or the entire
blog depending on how you’ve got it set up). So after round 1 the score
card finds MT:OtherBlog winning in the ease of use category but PHP
includes winning in terms of actual useful functionality. So, a tie. </p>]]>
      <![CDATA[<p>But then (again in the comments of my post on MT:OtherBlog) <a href="http://rayners.org/">David Raynes</a> dropped some <a href="http://www.michellejones.net/onapath/2007/10/putting-the-mtotherblog-tag-to.php#comment-32032">incredibly helpful knowledge</a>
that turned PHP includes and MT:OtherBlog both into also-rans. Turns
out David originally developed the MT:OtherBlog functionality as a
plugin for an older version of Movable Type. With Movable Type 4.0 this
functionality was packaged into the application as MT:MultiBlog. While
on the surface MT:MultiBlog and MT:OtherBlog do the same thing (namely
allow you to easily pull content from one blog into another blog) the
former has a serious advantage.</p>

<p>The MT:MultiBlog tag gets its functionality from the MT:MultiBlog
plugin and that plugin has rebuild triggering options. Whereas when
using MT:OtherBlog I would have to manually rebuild Blog 2 to force it
to pull the most recent content from Blog 1 when using MT:MultiBlog I
can set a rebuild trigger to automatically rebuild. </p>

<p>Let me use my personal blog <a href="http://www.michellejones.net/onapath">On a path</a> and content from <a href="http://www.correspondencenotes.com/">Correspondence Notes</a> as a real world example. I want the content I’m pulling from
Correspondence Notes into the footer of On a path to always be up to
date. Using MT:MultiBlog I have two steps to making that happen. First
step is getting the code in order: <br /></p><p>
<code>&lt;mt:MultiBlog include_blogs="1"&gt; <br />
&lt;MTEntries lastn="2"&gt;<br />
&lt;a href="&lt;$MTEntryLink$&gt;"&gt;&lt;$MTEntryTitle$&gt;&lt;/a&gt;<br />
&lt;$MTEntryExcerpt$&gt;&lt;p&gt;<br />
&lt;/MTEntries&gt;<br />
&lt;/mt:MultiBlog&gt;</code></p>

<p>This is of course almost identical to the code used in the <a href="http://www.michellejones.net/onapath/2007/10/putting-the-mtotherblog-tag-to.php">MT:OtherBlog example</a>. David rightly <a href="http://www.michellejones.net/onapath/2007/10/putting-the-mtotherblog-tag-to.php#comment-32032">points out</a>
that this code could be condensed but I prefer writing it out like I
have here. Just a personal preference so feel free to do it however you
like. </p>

<p>The second step is to configure a rebuild trigger using the MT:MultiBlog plugin. Go to plugin configurations for Blog 2. </p>

<span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/Picture%201.php" onclick="window.open('http://www.michellejones.net/onapath/images/Picture%201.php','popup','width=984,height=555,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/Picture%201-thumb-400x225.png" alt="Picture 1.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="225" width="400" /></a></span>

<p>Select MT:MultiBlog 2.0, click settings and then Create Rebuild
Trigger. Choose the blog that will be triggering the rebuild (in my
example it’s Correspondence Notes) and configure it. I chose to rebuild
the <a href="http://www.michellejones.net/onapath">On a path</a> indexes whenever a <a href="http://www.correspondencenotes.com/">Correspondence Notes</a> entry is saved. </p>

<span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/Picture%202.php" onclick="window.open('http://www.michellejones.net/onapath/images/Picture%202.php','popup','width=985,height=575,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/Picture%202-thumb-400x233.png" alt="Picture 2.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="233" width="400" /></a></span>

<p>Now the Correspondence Notes content in the <a href="http://www.michellejones.net/onapath">On a path</a> footer will always be rebuilt when a new entry is saved at <a href="http://www.correspondencenotes.com/">Correspondence Notes </a>and thus the On a path footer will always have the most up to date content. Sweet.</p><p><i>This a slightly modified version of an article that originally appeared at <a href="http://www.michellejones.net/onapath/2007/10/forget-mtotherblog-lets-all-us.php">On a path</a></i><br /> </p>]]>
   </content>
</entry>

<entry>
   <title>Working with Movable Type 4.0 Templates: Sidebar</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/working_with_mo/" />
   <id>tag:www.learningmovabletype.com,2007://5.1811</id>
   
   <published>2007-10-05T18:19:47Z</published>
   <updated>2007-10-06T21:34:38Z</updated>
   
   <summary>This tutorial is cross posted on my personal blog On a path.The new templates and template structure in Movable Type 4 streamline and simplify the process of making site wide changes to your blog. Well that’s what they do once you actually understand the templates and template structure. But understanding...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="Templates" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="mt4" label="MT4" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="sidebar" label="Sidebar" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="templates" label="Templates" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<i>This tutorial is cross posted on my personal blog <a href="http://www.michellejones.net/onapath/2007/10/working-with-movable-type-40-t.php">On a path</a>.</i><br /><br />The new templates and template structure in Movable Type 4 streamline
and simplify the process of making site wide changes to your blog. Well
that’s what they do once you actually understand the templates and
template structure. But understanding how the templates work together
and digesting the tag soup that swims in each of those templates? Not
exactly simple. So at the suggestion of a friend I thought I’d create a
series of basic tutorials that help explain the templates and template
structure. The tutorials will begin at a relatively basic entry level. <br /><br />Instead
of just breaking down templates line by line I thought it would be
easier and more practical to look at templates in the context of
actually doing something. You don’t really need to understand every
single line of code if you know where and how to make the changes to
accomplish what you want. For this first tutorial we’ll be making
changes to the sidebar. Specifically we’re going to remove a widget we
don’t want and add Google AdSense ads in the sidebar, after the archive
content, on every page of a blog. <br />]]>
      <![CDATA[Before we get to actually editing any templates I can’t recommend highly enough that you download and install the <a href="http://plugins.movabletype.org/template-shelf/">Template Shelf</a>
plugin. If you’re going to spend any time at all editing your templates
this plugin will make your life much easier. For this tutorial we’re
only going to be editing one template. But it’s not unlikely that
you’ll be needing to hop back and forth between multiple templates and
modules in the future and this plugin makes that much, much simpler. <br />
<br />
I’ve set up a <a href="http://www.michellejones.net/tutorials/">brand new blog</a>
to serve as an example of the work done in this tutorial. I selected
the minimalist light blue style and a two column (wide-thin) layout
from Stylecatcher in Movable Type. Since we’ve got a two column layout
the template we’re going to be modifying is the Sidebar - 2 Column
Layout. This template is actually a template module. What’s a module?
The best analogy I can think of is that a template module is like a
backpack. You’ve got a whole bunch of stuff (all the code for the
sidebar) you need to get somewhere (in the sidebar of all the pages on
your blog) and it’s much easier to put all of that stuff in a backpack
(a template module) and then unpack it when you get to where you’re
going. <br />
<br />
So instead of having to put all your sidebar code into
every template (main index, individual archive pages, monthly archives,
etc) you just reference the particular module that contains the code
like so &lt;$MTInclude module="Sidebar - 2 Column Layout"$&gt;. <br />
<br />
Out of the gate this is what the sidebar looks like. <br />
<span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/beforeedits.php" onclick="window.open('http://www.michellejones.net/onapath/images/beforeedits.php','popup','width=995,height=586,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/beforeedits-thumb-300x176.png" alt="beforeedits.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="176" width="300" /></a></span>The first thing I want to do, is remove the text that says “Tag Cloud.”
Tag clouds can be fun but I’m not using tags on the tutorial example
blog so there is no reason to have it there. <br /><br />To remove the Tag
Cloud we need to find the following section of code in the Sidebar - 2
Column Layout template module (line 169 if you’ve got syntax
highlighting turned on):<br />&lt;MTIf name="main_index"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="widget-cloud widget"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h3 class="widget-header"&gt;Tag Cloud&lt;/h3&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="widget-content"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ul class="widget-list"&gt;<br />&nbsp;&nbsp;&nbsp; &lt;MTTags limit="20" sort_by="rank"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;li class="rank-&lt;$MTTagRank max="10"$&gt;
widget-list-item"&gt;&lt;a
href="&lt;$MTTagSearchLink$&gt;"&gt;&lt;$MTTagName$&gt;&lt;/a&gt;&lt;/li&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/MTTags&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ul&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br />&lt;/MTIf&gt;<br /><br />Let’s look some of the important code in this section before we remove it. <br /><br />&lt;MTIf
name="main_index"&gt; and &lt;/MTIf&gt; Everything that falls between
these two template tags is governed by a rule that basically says “<b>if</b> a template is the main index template <b>then</b>
this information will be displayed on that template’s published page.
If a template is not the main index template then this information will
not be displayed on that template’s published page(s).” In other words
“the information within these tags is only going to be displayed on the
main index page and not any of the archive pages.”<br /><br /><i>Wrap your head around the if/then idea here. It’s going to be really important later.</i> <br /><br />&lt;div
class="widget-cloud widget"&gt; and &lt;/div&gt; The first tag in this
pair says “we’re dealing with the tag cloud widget here.” Th second tag
(which comes just before &lt;/MTif&gt; if you’re confused) says “we’re
done dealing with the tag cloud widget now.” <br /><br />Combine those
four tags together with all the code included between them and you’ve
got a Tag Cloud that appears on your blog’s main index page and nowhere
else. <br /><br />I don’t want a Tag Cloud to appear on the main page or
anywhere else so I’m totally deleting all of this code. If you think
you might want to implement the tag cloud later on you can just <a href="http://www.w3schools.com/tags/tag_comment.asp">comment out</a> this section instead. <br /><span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/posttagcloud.php" onclick="window.open('http://www.michellejones.net/onapath/images/posttagcloud.php','popup','width=989,height=584,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/posttagcloud-thumb-300x177.png" alt="posttagcloud.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="177" width="300" /></a></span>Tag Cloud gone we can now move on to adding the code for <a href="http://www.google.com/adsense">AdSense</a>
into the sidebar. To do this next step you’ll have of course needed to
setup an AdSense account and grabbed the code they give you to put ads
on your site. It will look something like this<br /><br />&lt;script type="text/javascript"&gt;<br />&lt;!--<br />google_ad_client = "pub-################";<br />google_ad_width = 120;<br />google_ad_height = 600;<br />google_ad_format = "120x600_as";<br />google_ad_type = "text";<br />google_ad_channel = "";<br />google_color_border = "FFFFFF";<br />google_color_bg = "FFFFFF";<br />google_color_link = "000000";<br />google_color_text = "000000";<br />google_color_url = "333333";<br />google_ui_features = "rc:10";<br />//--&gt;<br />&lt;/script&gt;<br />&lt;script type="text/javascript"<br />&nbsp; src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;<br />&lt;/script&gt;<br /><br />I
want the ads to appear, on every page of my tutorial blog, after the
monthly archives list and before “Subscribe to this blog’s feed.”<br /><br />On
or about line 242 (depending on whether you deleted or commented out
the Tag Cloud code) you should find the code block that begins &lt;div
class="widget-syndicate widget"&gt;. Like the previous code in this
format this is saying “hey we’re dealing with the syndicate widget now.”<br /><br />Since
we want our ads to be directly about the syndication widget (the
syndication widget is where the phrase “Subscribe to this blog’s feed”
is coming from) we want to paste in the code Google gave of us here.&nbsp; <br /><br />Voila!
Now you’ve got ads on all the pages of your blog in the sidebar
between the list of monthly archives and “Subscribe to this blog’s
feed.”<br /><span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/ads1.php" onclick="window.open('http://www.michellejones.net/onapath/images/ads1.php','popup','width=996,height=583,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/ads1-thumb-300x175.png" alt="ads1.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="175" width="300" /></a></span>Or
do you? You’ve got the ads on every page sure enough. Those ads always
appear above “Subscribe to this blog’s feed” just like we want but on
some pages, say an individual archive page for example, there is no
list of monthly archives. And this is where things get a wee bit
tricky. <br /><br /><span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/ads3.php" onclick="window.open('http://www.michellejones.net/onapath/images/ads3.php','popup','width=993,height=583,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/ads3-thumb-300x176.png" alt="ads3.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="176" width="300" /></a></span>By
default Movable Type thinks you probably want slightly different
content in the sidebars of each of the main sections of your blog. For
example on your <a href="http://www.michellejones.net/tutorials">main page</a>
it thinks you want a search box, a list of recent entries, a list of
categories, a list of monthly archives, the syndication widget and
finally the powered by Movable Type graphic. On your <a href="http://www.michellejones.net/tutorials/2007/10/fake-entry-2.html">individual archive pages</a>
it thinks you want a search box, meta data about the individual entry,
a link to to the main index page, a link to the main archive page, the
syndication widget and finally the powered by Movable Type graphic. All
the other sections (monthly archives, main archives, etc) have, by
default, some variation of either of these two versions of sidebar
content. <br /><br />Remember how I said if/then was going to be important later? Later is now. <br /><br />Movable
Type is right, I want the search box at the top of the sidebar on every
page of my blog so I’m not going to touch the search box code at all.
Search box related code takes up the first 40 lines of the Sidebar - 2
Column Layout template so let’s skip to line 41. <br /><br />Line 41 is
&lt;MTIf name="module_about_context"&gt;. Just like when we saw MTIf
before this is signifying the beginning of an if/then statement. This
particular if/then statement is saying “the following content is a
module called about context. If a template calls for the module called
“about context” then display the following information. Simple enough
right? Wrong.<br /><br />Wrong because the about context module has several
other if/then statements wrapped up in it and some if/then/else statements
as well. <br /><br />An example:<br />&lt;h3 class="widget-header"&gt;<br />&lt;MTIf name="entry_template"&gt;<br />About this Entry<br />&lt;MTElse&gt;<br />&lt;MTIf name="archive_template"&gt;<br />About this Archive<br />&lt;/MTIf&gt;<br />&lt;/MTIf&gt;<br />&lt;MTIf name="archive_index"&gt;<br />About Archives<br />&lt;/MTIf&gt;<br />&lt;/h3&gt;<br /><br />The
English translation: if a page is built from the entry template then
display “About this Entry” if the page is built from the archive
template then display “About this Archive” and if the page is built
from the archive index template then display “About Archives.” In this
case “About this Entry”, “About this Archive” and “About Archives” are
all headers for the section that immediately follow the search box in
the sidebars of pages built from the templates. On individual entry
pages the section is called “About this Entry” and so on. <br /><br />As
my high school band director liked to ask “is that clear as mud?” That
part actually should be relatively easy to follow. It’s the next
section, starting at line 55 and going all the way through 116 that is
a bit more complex. This section contains another round of if/then/else
statements that determines what content to display in the about section
the sidebar depending on which template was used to build a page. <br /><br />But
for our current project I don’t want to change the “About” section
content that Movable Type is creating by default. I want the about info
MT is spitting out by default for the various pages to stay the same.
All I’m concerned about right now is getting the Monthly Archives list
to appear on every page so I can have my ads between the Monthly
Archive list and “Subscribe to this blog’s feed.” There are two steps
to making the monthly archive list appear on every page. <br /><br />The first step is to address the if statement that line 188 contains. It says<br />&lt;MTIf
name="module_monthly_archives"&gt;. From past experience we know this
is saying “if a template calls for the module called monthly archives
then display this information.” By understanding that I know I’ve got
two ways for making the monthly archives list appear on every page, an
easy way and a hard way. The hard way is to go through every single
index template and add in a call for the monthly archive modules. The
easy way is to remove the if statement. Meaning, there’s no if about
it, I want this content on every single page so I’m removing &lt;MTIf
name="module_monthly_archives"&gt; and the accompanying &lt;/MTIf&gt;
(line 205) from the template. Now the content that was surrounded by
those two lines will now appear everywhere, not just on pages calling
for the monthly archives module.&nbsp; <br /><br />On <a href="http://www.correspondencenotes.com/">Correspondence Notes</a>
I wanted the right sidebar content to just contain AdSense ads and not
the about content Movable Type puts there by default. Since I wanted
this on every page, like we wanted our monthly archive list on the
tutorial blog,&nbsp; I put this technique of removing if statements to work
there as well. With all the if statements removed the code gets really
simple. So mentally bookmark the idea of removing if statements when
you don’t need to change the content depending on which template a page
is built from. <br /><br />As an example here is what the code for the right sidebar of <a href="http://www.correspondencenotes.com/">Correspondence Notes</a> it looks like this:<br />&lt;div class="widget-welcome widget"&gt;<br />&lt;h3 class="widget-header"&gt;<br />Welcome<br />&lt;/h3&gt;<br />&lt;div class="widget-content"&gt;<br />Correspondence Notes is about communication.<br />&lt;p&gt;end
tips, suggestions or perhaps just a greeting to &lt;a
href="mailto:info@correspondencenotes.com"&gt;info@correspondencenotes.com&lt;/a&gt;<br />&lt;/div&gt;<br />&lt;/div&gt;<br /><br />The
second part of getting our Monthly Archives list in order is editing
the header. If you leave the code as is (line 193: &lt;h3
class="widget-header"&gt;&lt;$MTArchiveLabel$&gt; &lt;a
href="&lt;$MTBlogURL$&gt;archives.html"&gt;Archives&lt;/a&gt;&lt;/h3&gt;)
your monthly archive list will be right in most places but not on your
individual entry pages. Instead of saying “Monthly Archives” and then
listing your monthly archives it will say “Entry Archives” and then
list your monthly archives. Everywhere else will look just peachy but
to make the individual entry pages come inline we need to replace
&lt;$MTArchiveLabel$&gt; with the actual word “Monthly. ” So the new
line 193 should look like this:&nbsp; <br /><br />&lt;h3 class="widget-header"&gt;Monthly &lt;a href="&lt;$MTBlogURL$&gt;archives.html"&gt;Archives&lt;/a&gt;&lt;/h3&gt;<br /><br />Whoo.
That wasn’t too bad was it? It’s a shame we aren’t quite done yet. Take
a look at the screenshot below from category archive page. It’s got the
Monthly Archives list alright but then it’s got the listing of the
monthly entries for the particular category we’re currently looking at.
Who needs that? Not us. Looking at the code directly beneath the
monthly archives list in the template (starting with line 206) we can
see that Movable Type thinks we might want to list not only a
category’s monthly archives but also monthly archives by author. Again
I say who needs that? And again I answer myself with not us.<br /><span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/categoryarchive.php" onclick="window.open('http://www.michellejones.net/onapath/images/categoryarchive.php','popup','width=989,height=579,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/categoryarchive-thumb-300x175.png" alt="categoryarchive.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="175" width="300" /></a></span>To
get rid of these unwanted archive lists I’m cutting out everything in
the template that falls between the end of the monthly archive listing
code block and the beginning of my Google AdSense code. Again, you can
comment these out if you think you might want to use them later. I
never will so they’re getting cut. <br /><br />Now we’re done. For real. Go ahead, look around all the pages of the <a href="http://www.michellejones.net/tutorials">tutorials blog</a>.
AdSense ads on every page between the Monthly Archive listing and the
syndication widget and not a Tag Cloud to be found. Feel free to <a href="http://www.michellejones.net/onapath/files/sidebar2.txt">download the edited version</a>
of the Sidebar - 2 Column Layout template from this tutorial. Remember
that I deleted whole sections of code instead of commenting them out. <br /><br />If
you’re new to Movable Type templates and template tags editing them may
still seem a bit overwhelming but give it time and some practice,
you’ll get the hang of it. Hopefully this tutorial will help clear some
things up and make things a bit easier on you. I hope to write more of
these project based tutorials. To that end I’m asking for requests/taking suggestions on what projects to write tutorials for
next. PHP includes? Adding Flickr badges? CSS modifications? Etc.
Please leave a comment or write me at the address in this page’s footer.<br /><br />Naturally if I've made any mistakes or if you have additional questions please let me know. <br />
]]>
   </content>
</entry>

<entry>
   <title>How To Change the Default Image Upload Location in Movable Type 4.0</title>
   <link rel="alternate" type="text/html" href="http://www.learningmovabletype.com/a/how_to_change_t/" />
   <id>tag:www.learningmovabletype.com,2007://5.1801</id>
   
   <published>2007-10-01T18:52:19Z</published>
   <updated>2007-10-05T20:40:25Z</updated>
   
   <summary>Nearly every article for my site Correspondence Notes contains at least one image. I use Movable Type&apos;s built in upload feature to upload images and add them to entries. The process is fine except for one step. By default Movable Type will upload images to your Site Root. That&apos;s great...</summary>
   <author>
      <name>Michelle Jones</name>
      <uri>http://www.onapathmedia.com</uri>
   </author>
   
      <category term="General Tips and Tricks" scheme="http://www.sixapart.com/ns/types#category" />
   
      <category term="Images" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="images" label="Images" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="mt4" label="MT4" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="uploadimages" label="Upload Images" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.learningmovabletype.com/">
      <![CDATA[<p>Nearly every article for my site <a href="http://ww.correspondencenotes.com">Correspondence Notes</a> contains at least one image. I use Movable Type's built in upload feature to upload images and add them to entries. The process is fine except for one step. By default  Movable Type will upload images to your Site Root. That's great except I like my images to go into a subdirectory I like to call...images. I can of course, with the file upload utility, tell Movable Type to put the images into the images subdirectory. The problem is that the utility will not remember this preference. Every time I upload an image I have to tell Movable Type again to put the new image in the images directory instead of the Site Root. Though it only takes a few key strokes to type "images" into the subdirectory field it's a silly time waster since I want every single image I upload to go into that folder. </p>

<p>Since there isn't an option within the Movable Type user interface to make the file upload utility remember that I want my images to always go into the images subdirectory I decided to go straight to the source and make it happen.</p>]]>
      <![CDATA[<p>Please remember that if these steps break your copy of Movable Type I'm not the least bit responsible. </p>

<p>Configuring the upload utility to upload to the same subdirectory by default is actually quite simple. It only requires editing a single line of a single .tmpl file. However, if monkeying with an application's source code makes you really nervous I've heard there is a <a href="http://www.eatdrinksleepmovabletype.com/announcements/better_file_uploader_22_for_movable_type_4/">great plugin for improving Movable Type's file upload utility that only costs $10</a>. </p>

<p>The file to edit is called asset_upload.tmpl. Assuming you have your Movable Type files in your cgi-bin the path to this file looks something like cgi-bin/mt/tmpl/cms/dialog/asset_upload.tmpl.</p>

<p>1. Download asset_upload.tmpl (I highly recommend you save a backup copy of it before you edit it)</p>

<p>2. Open asset_upload.tmpl and look for the following: <code><br />
/ &lt;input name="extra_path" id="extra_path" value="&lt;mt:var name="extra_path" escape="html"&gt;" /&gt;<br />
</code></p>

<p>3. Change <br />
<code> value="&lt;mt:var name="extra_path" escape="html"&gt;"</code> <br />
to <br />
<code> value="images"</code> <br />
where "images" is whatever subdirectory name you want your images uploaded to by default. </p>

<p>So your final code should look like this <br />
<code><br />
/ &lt;input name="extra_path" id="extra_path" value="images" /&gt;<br />
</code></p>

<p>4. Save and upload asset_upload.tmpl</p>

<p>5. Upload an image</p>

<span class="mt-enclosure mt-enclosure-image"><a href="http://www.michellejones.net/onapath/images/uploadedit.php" onclick="window.open('http://www.michellejones.net/onapath/images/uploadedit.php','popup','width=656,height=495,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.michellejones.net/onapath/images/uploadedit-thumb-300x226.png" width="300" height="226" alt="uploadedit.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span>

<p>You'll notice that the subdirectory field is still completely editable. So while Movable Type will, by default, now upload my images to the images subdirectory, should I want to upload a particular image to a different directory all I have to do is type a different name into the subdirectory text box. </p>]]>
   </content>
</entry>

</feed>

