<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Adventures in Movable Type</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/" />
    <link rel="self" type="application/atom+xml" href="http://www.beausmith.com/mt/atom.xml" />
    <id>tag:www.beausmith.com,2008-09-17:/mt//2</id>
    <updated>2008-09-25T22:58:56Z</updated>
    <subtitle>idea &#8594; reqs &#8594; specs &#8594; comps &#8594; wires &#8594; code &#8594; qa... ship it.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.21-en</generator>

<entry>
    <title>Increase Basename Length for SEO URLs</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/09/increase-basename-length-for-seo-urls.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.273</id>

    <published>2008-09-25T22:45:08Z</published>
    <updated>2008-09-25T22:58:56Z</updated>

    <summary>Well authored urls make for good SEO. One the simplest ways to do this is to write good titles to your entries and then MT will dirify the title to create a basename from which the url to the entry...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>Well authored urls make for good SEO. One the simplest ways to do this is to write good titles to your entries and then MT will dirify the title to create a basename from which the url to the entry is created. But if your entry title is longer than 100 characters, the rest of the url is clipped. </p>

<p>Good news! Basename can be increased to 250 characters. As it seems that most people would prefer unclipped urls to long urls, I added a feature request to increase the default to the max of 250 characters. Then if a user prefers to have smaller urls, they can modify this setting.</p>

<p>To change your default, navigate to Preferences > Entry Settings, and change Basename Length to your desired length.</p>

<div class="thumbnail"><a href="http://skitch.com/beausmith/s9ta/entry-settings-adventures-in-movable-type-movable-type-pro"><img src="http://img.skitch.com/20080925-nk3x928t11besyttrs76kpn9n8.jpg" alt="Entry Settings - Adventures in Movable Type | Movable Type Pro"/></a></div>
]]>
        

    </content>
</entry>

<entry>
    <title>Adding Custom Fields to Edit Profile and Registration Forms</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/09/adding-custom-fields-to-edit-profile-and-registration-forms.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.272</id>

    <published>2008-09-25T22:02:28Z</published>
    <updated>2008-09-25T22:44:50Z</updated>

    <summary>Wondering how to customize the Global Templates &#8220;Profile Edit Form&#8221; or the &#8220;Registration Form&#8221;? Here&#8217;s a few options. Basic reordering of custom fields is possible on the edit profile page in the MT app. Using the &#8220;Reorder Fields&#8221; in the...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="code" label="code" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hack" label="hack" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tip" label="tip" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>Wondering how to customize the Global Templates &#8220;Profile Edit Form&#8221; or the &#8220;Registration Form&#8221;? Here&#8217;s a few options.</p>

<p>Basic reordering of custom fields is possible on the edit profile page in the MT app. Using the &#8220;Reorder Fields&#8221; in the &#8220;related content&#8221; sidebar. </p>

<p>If you want to intersperse custom fields between default fields it&#8217;s a little more trickey; by default all built-in fields are output and then all custom fields are output in the order specified on the edit profile page.</p>

<p>The <code>&lt;mt:AuthorCustomFields&gt;</code> tag should be used for this but as of MT4.2 I couldn&#8217;t get it to work on the edit profile or registration form, so for now you can use the same loop that currently outputs the custom fields, but limit the output with an <code>&lt;mt:if&gt;</code> tag. Here&#8217;s an example of how you can do it&#8230;</p>

<h3>Description</h3>

<p>Use three loops each containing an conditional tag (if or unless) to limit the output of the loop by custom field basename. The first and second loops limit by checking to see if the basename is equal to a value. The third loop outputs all fields except the the two I&#8217;ve specified (if fields are duplicated on the form the html will be invalid and only the second input&#8217;s value will be saved)</p>

<h3>Example</h3>

<p>Thi example uses the custom fields &#8220;Level&#8221; and &#8220;Bio&#8221;. You may place each loop anywhere in the Edit Profile template&#8217;s form.</p>

<pre><code>&lt;mt:Loop name="field_loop"&gt;
   &lt;mt:If name="__first__"&gt;
   &lt;input type="hidden" name="_type" value="author" id="obj_type" /&gt;
   &lt;input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" /&gt;
   &lt;/mt:If&gt;
   &lt;mt:if name="basename" eq="level"&gt;
   &lt;!-- start-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;mtapp:setting
   id="$field_id"
   label="$name"
   hint="$description"
   shown="$show_field"
   show_hint="$show_hint"
   required="$required"&gt;
   &lt;$mt:Var name="field_html"$&gt;
   &lt;/mt:App:Setting&gt;
   &lt;!-- end-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;/mt:if&gt;
&lt;/mt:Loop&gt;

&lt;!-- Default field here --&gt;

&lt;mt:Loop name="field_loop"&gt;
   &lt;mt:If name="__first__"&gt;
   &lt;input type="hidden" name="_type" value="author" id="obj_type" /&gt;
   &lt;input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" /&gt;
   &lt;/mt:If&gt;
   &lt;mt:if name="basename" eq="bio"&gt;
   &lt;!-- start-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;mtapp:setting
   id="$field_id"
   label="$name"
   hint="$description"
   shown="$show_field"
   show_hint="$show_hint"
   required="$required"&gt;
   &lt;$mt:Var name="field_html"$&gt;
   &lt;/mt:App:Setting&gt;
   &lt;!-- end-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;/mt:if&gt;
&lt;/mt:Loop&gt;

&lt;!-- Default field here --&gt;

&lt;mt:Loop name="field_loop"&gt;
   &lt;mt:If name="__first__"&gt;
   &lt;input type="hidden" name="_type" value="author" id="obj_type" /&gt;
   &lt;input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" /&gt;
   &lt;/mt:If&gt;
   &lt;mt:unless name="basename" like="(bio|level)"&gt;
   &lt;!-- start-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;mtapp:setting
   id="$field_id"
   label="$name"
   hint="$description"
   shown="$show_field"
   show_hint="$show_hint"
   required="$required"&gt;
   &lt;$mt:Var name="field_html"$&gt;
   &lt;/mt:App:Setting&gt;
   &lt;!-- end-customfield_&lt;$mt:Var name="basename"$&gt; --&gt;
   &lt;/mt:unless&gt;
&lt;/mt:Loop&gt;
</code></pre>

<p><a href="http://aaronvanderzwan.com/blog/2008/08/movable-type-42-custom-fields-on-registration-sign-up-form/">Aaron Vanderzwan offers a similar solution</a> and Elise summarized the solution on <a href="http://learningmt4.com/2008/09/customizing-registration-and-profiles-with-custom-fields.php">LearningMT4.com</a></p>
]]>
        

    </content>
</entry>

<entry>
    <title>MTML Code in Entries or Pages</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/09/mtml-code-in-entries-or-pages.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.270</id>

    <published>2008-09-25T07:42:24Z</published>
    <updated>2008-09-25T08:03:01Z</updated>

    <summary>You want a page with a title and a few paragraphs&#8230; but you also want a list of entries as a part of the page. How to do it? You can use the mteval global modifier, but in the note...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="entry" label="entry" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="index" label="index" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="page" label="page" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tag" label="tag" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="template" label="template" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tip" label="tip" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>You want a page with a title and a few paragraphs&#8230; but you also want a list of entries as a part of the page. How to do it?</p>

<p>You can use the <a href="http://www.movabletype.org/documentation/appendices/modifiers/mteval.html"><code>mteval</code> global modifier</a>, but in the note I added there due to the way MT is optimized to publish, using the <code>mteval</code> global modifier isn&#8217;t really an option for most cases.</p>

<p>But there is a better way. The concept is to use an index template but to build the content of the template by combining content from a page and from entries.</p>

<p>Here&#8217;s how to create a page for entries tagged as events:</p>

<ol>
<li><p>Create a page titled &#8220;Events&#8221;.</p>

<p>Add the body text &#8220;These are our events&#8221;.</p>

<p>Add the tag &#8220;@eventpage&#8221;.</p></li>
<li><p>Create a few entries with sample event info and add the tag &#8220;event&#8221;.</p></li>
<li><p>Create a new index template called &#8220;Events&#8221; and set the output file as <code>events.html</code>.</p>

<p>In the body of the template add this code to list the most recent 10 events tagged with the private tag &#8220;@event&#8221;:</p>

<pre><code>&lt;mt:Pages tag="@eventpage" lastn="1"&gt;
    &lt;h1&gt;&lt;$mt:EntryTitle$&gt;&lt;/h1&gt;
    &lt;$mt:EntryBody$&gt;
&lt;/mt:Pages&gt;
&lt;ul&gt;
&lt;mt:Entries tag="event" lastn="10"&gt;
    &lt;li&gt;&lt;a href="&lt;$mt:EntryPermalink$&gt;"&gt;&lt;$mt:EntryTitle$&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/mt:Entries&gt;
&lt;/ul&gt;
</code></pre></li>
<li><p>Save the index template&#8230; and then publish the index template.</p></li>
</ol>

<p>That&#8217;s it. =)</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Automating Movable Type Installation</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/06/automating-movable-type-installation.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.92</id>

    <published>2008-06-26T18:41:29Z</published>
    <updated>2008-06-26T20:15:42Z</updated>

    <summary>Automation is awesome! This script I use to set up a new MT instance probably saves me 15-20 hours a year, that 2-3 workdays. I use the below shell script to: checkout target release of MT checkout addons (Packs [ProPack,...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>Automation is awesome! This script I use to set up a new MT instance probably saves me 15-20 hours a year, that 2-3 workdays.</p>

<p>I use the below shell script to:</p>

<ul>
<li>checkout target release of MT</li>
<li>checkout addons (Packs [ProPack, MTCS, Enterprise], static files, &amp; Tristan Theme)</li>
<li>checkout addons themes (Tristan</li>
<li>issue <code>make</code></li>
<li>set up a static directory for the release</li>
<li>set permissions</li>
<li>create a <code>mt-config.cgi</code> file</li>
<li>and finally&#8230; open the release in TextMate</li>
</ul>

<p>If you have an suggested improvements, please comment below!</p>

<h2>Usage</h2>

<p>Simple command does the above</p>

<pre><code>$ makemt 41
</code></pre>

<p>Full command</p>

<pre><code>$ makemt target-release {local-dir} {addons-release}
</code></pre>

<p><strong>Note:</strong> If you are not using the addons (or don&#8217;t have access to them) you&#8217;ll need to comment out the portions of the script containing <code>addons_branch</code>.</p>

<h2>Script</h2>

<pre><code>#!/usr/bin/env sh

# setup a new MT release
function makemt ()
{
    # usage: makemt target_release local_release_dir addons_branch
    # example: makemt 40 r40
    # target_release = svn repo name
    # local_release_dir = local release dir to place this repo
    target=${1};
    local_release_dir=${2};
    if [ ! $local_release_dir ]; then
        local_release_dir=$target;
    fi
    addons_branch=${3};
    if [ ! $addons_branch ]; then
        addons_branch="cal";
    fi
    if [ $target ]; then
        echo $target $local_release_dir $addons_branch;

        svn co http://code.sixapart.com/svn/movabletype/branches/release-$target /Sites/_live/cgi/release-$local_release_dir;
        echo SUCCESS: release-$target checked out;

        cd /Sites/_live/cgi/release-$local_release_dir;
        make;
        echo SUCCESS: make;

        mkdir /Sites/_live/html/r$local_release_dir;
        echo SUCCESS: created /Sites/_live/html/r$local_release_dir;

        chmod 777 /Sites/_live/html/r$local_release_dir;
        echo SUCCESS: permissions updated /Sites/_live/html/r$local_release_dir;

        cd /Sites/_live/html/r$local_release_dir;
        ln -s /Sites/_live/cgi/release-$local_release_dir/mt-static /Sites/_live/html/r$local_release_dir/mt-static;
        echo SUCCESS: symlink to /Sites/_live/html/r$local_release_dir/mt-static;

        chmod -R 777 /Sites/_live/cgi/release-$local_release_dir/mt-static/support;
        echo SUCCESS: permissions updated /Sites/_live/cgi/release-$local_release_dir/mt-static/support;

        cd /Sites/_live/cgi/release-$local_release_dir/;
        svn co http://svn.sixapart.com/repos/eng/mtaddons/branches/$addons_branch/addons/;
        echo SUCCESS: svn co $addons_branch/addons;

        svn co http://svn.sixapart.com/repos/eng/mtaddons/branches/$addons_branch/mt-static/addons mt-static/addons;
        echo SUCCESS: svn co $addons_branch/mt-static/addons;

        svn co http://svn.sixapart.com/repos/eng/mtaddons/branches/$addons_branch/mt-static/themes/tristan-blue mt-static/themes/tristan-blue;
        echo SUCCESS: svn co $addons_branch/mt-static/themes/tristan-blue;

        curl http://svn.sixapart.com/repos/eng/mtaddons/branches/$addons_branch/mt-cp.cgi &gt; mt-cp.cgi;
        echo SUCCESS: svn co $addons_branch/mt-cp.cgi;

        chmod 755 mt-cp.cgi
        echo SUCCESS: chmod 755 mt-cp.cgi;

        mt_config="# Config File Generated via makemt command
CGIPath /cgi-bin/release-$target/
StaticWebPath /r$target/mt-static

ObjectDriver DBI::mysql
Database mt_r21
DBUser root
DBPassword root
DBHost localhost
#DBSocket /Applications/MAMP/tmp/mysql/mysql.sock

##### CGI LOCATIONS #####
# AdminScript mt.fcgi
# CommentScript mt-comments.fcgi
# TrackbackScript mt-tb.fcgi
# ActivityFeedScript mt-feed.fcgi
# XMLRPCScript mt-xmlrpc.fcgi
# AtomScript mt-atom.fcgi
# UpgradeScript mt-upgrade.fcgi

DebugMode 1
DeleteFilesAtRebuild 1
# HTTPTimeout 60
# EnableAddressBook 1
# ShowIPInformation 1";
        echo "$mt_config" &gt; mt-config.cgi;
        echo SUCCESS: mt-config.cgi created;

        mate /Sites/_live/cgi/release-$local_release_dir/;
        mate /Sites/_live/cgi/release-$local_release_dir/mt-config.cgi;
    else
        echo 'usage = makemt target local_release_dir addons_branch';
    fi
}
</code></pre>
]]>
        

    </content>
</entry>

<entry>
    <title>Enabling FastCGI on Movable Type 4.x</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/06/enabling-fastcgi-on-movable-type-4x.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.72</id>

    <published>2008-06-03T21:43:55Z</published>
    <updated>2008-06-10T03:58:38Z</updated>

    <summary>Getting FastCGI configured and running can be a pain. There are FastCGI instructions on MovableType.org, but the page is so long that it looks kinda daunting. Strangecode has got FastCGI enabled for all hosting accounts. So after installing Movable Type...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="fastcgi" label="FastCGI" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="performance" label="performance" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tricks" label="tricks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>Getting FastCGI configured and running can be a pain. There are <a href="http://www.movabletype.org/documentation/administrator/maintenance/fastcgi.html">FastCGI instructions</a> on <a href="http://www.movabletype.org/">MovableType.org</a>, but the page is so long that it looks kinda daunting.</p>

<p><a href="http://strangecode.com">Strangecode</a> has got FastCGI enabled for all hosting <a href="http://strangecode.com/accounts/">accounts</a>. So after installing Movable Type all I had to do to was the following two steps:</p>

<ol>
<li><p>Create symlinks to the primary MT scripts with names ending in .fcgi.</p>

<pre><code>$ cd /PATH/TO/MT
$ for F in mt{,-comments,-search}.cgi; do ln -s $F $(basename $F .cgi).fcgi; done
</code></pre></li>
<li><p>Add these lines to mt-config.cgi.</p>

<pre><code>AdminScript mt.fcgi
CommentScript mt-comments.fcgi
SearchScript mt-search.fcgi
</code></pre></li>
</ol>
]]>
        

    </content>
</entry>

<entry>
    <title>Advanced Archive Widget</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/05/advanced-archive-widget.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.71</id>

    <published>2008-05-29T20:23:16Z</published>
    <updated>2008-10-07T07:53:34Z</updated>

    <summary>Mie has been blogging every month since 2003 on kokochi.com, the list of 57 monthly archives in her sidebar was getting really long. Mie asked if I could add an archive widget to her blog&#8217;s sidebar like the one Anil...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="advanced" label="advanced" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="code" label="code" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="movabletype" label="movable type" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mtml" label="mtml" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Anil Archives" src="http://www.beausmith.com/mt/assets/anil-archives.gif" width="361" height="254" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></span>Mie has been blogging every month <a href="http://kokochi.com/archives/2003/09/where_do_i_start.shtml">since 2003</a> on <a href="http://kokochi.com">kokochi.com</a>, the list of 57 monthly archives in her sidebar was getting really long.</p>

<p>Mie asked if I could add an archive widget to her blog&#8217;s sidebar like the one Anil sports on <a href="http://dashes.com/anil/">dashes.com</a>. After looking at the source <code>HTML</code> I realized that coding it in <code>MTML</code> was gonna be kinda complex. In <code>MTML</code> typically for each year in your archives you&#8217;d list all the months, but&#8212;because of the way that <code>html</code> tables are built&#8212;I&#8217;d need to list all the months for each year. For example, I need to list all the Jan archives, then all the Feb archives, etc. etc.)</p>

<p>So I asked Anil for his code. Doh! He admitted he was manually updating it. =P</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="mie-archives.gif" src="http://www.beausmith.com/mt/assets/mie-archives.gif" width="241" height="238" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></span>I mentioned this to <a href="http://bradchoate.com/">Brad</a>, and he got so excited that he wrote a rough draft. I added the code to the sidebar on Kokochi.com, but the code wasn&#8217;t working. =/ After some testing, I realized that there were a few limitations (year&#8217;s w/o posts, and the inability to output the month as a number w/o a &#8220;0&#8221; prefix on single digit months), but then after consulting with Brad, solutions were found!</p>

<p>Follow the below code and you too can have this advanced archive table widget as seen on <a href="http://kokochi.com">kokochi.com</a> and <a href="http://dashes.com/anil">dashes.com/anil</a>.</p>

<p><strong>Update:</strong> The blog must be publishing a yearly archive file. This file can have zero content, but needs be published in order for the Yearly ArchiveList block tag to output content. <em>2008 Oct 7</em></p>

<h3>The MTML Code</h3>

<pre><code>&lt;table id="archives-table"&gt;
&lt;mt:ArchiveList type="Yearly" sort_order="ascend"&gt;
    &lt;mt:ArchiveListHeader&gt;&lt;tr&gt;&lt;$mt:ArchiveDate format="%Y" setvar="start_year"$&gt;&lt;/mt:ArchiveListHeader&gt;
    &lt;th&gt;&lt;$mt:ArchiveDate format="'%y"$&gt;&lt;/th&gt;
    &lt;$mt:ArchiveDate format="%Y" setvar="year"$&gt;
    &lt;$mt:setvar name="is_posts_year_{$year}" value="1"$&gt;
    &lt;mt:ArchiveList type="Monthly"&gt;
        &lt;$mt:ArchiveDate format="%m_%Y" setvar="month_year"$&gt;
        &lt;mt:SetVarBlock name="links_{$month_year}"&gt;&lt;a href="&lt;$MTArchiveLink$&gt;"&gt;&lt;mt:ArchiveDate format="%b"$&gt;&lt;/a&gt;&lt;/mt:SetVarBlock&gt;
    &lt;/mt:ArchiveList&gt;
    &lt;mt:ArchiveListFooter&gt;&lt;/tr&gt;&lt;$mt:ArchiveDate format="%Y" setvar="end_year"$&gt;&lt;/mt:ArchiveListFooter&gt;
&lt;/mt:ArchiveList&gt;
&lt;mt:for var="month" from="1" to="12"&gt;
    &lt;tr&gt;
    &lt;mt:for var="year" from="$start_year" to="$end_year"&gt;
        &lt;mt:if name="is_posts_year_{$year}"&gt;
            &lt;mt:setvarblock name="month_year"&gt;&lt;mt:var name="month" sprintf="%02d"&gt;_&lt;mt:var name="year"&gt;&lt;/mt:setvarblock&gt;
        &lt;td&gt;&lt;$mt:var name="links_{$month_year}" default="&amp;nbsp;"$&gt;&lt;/td&gt;
        &lt;/mt:if&gt;
    &lt;/mt:for&gt;
    &lt;/tr&gt;
&lt;/mt:for&gt;
&lt;/table&gt;
</code></pre>

<h3>The Code Explained</h3>

<p>Here&#8217;s a play-by-play on the <code>MTML</code> code used to produce this list&#8230;</p>

<p>Open the table.</p>

<pre><code>&lt;table id="archives-table"&gt;
</code></pre>

<p>List yearly archives in an ascending order (2001, 2002, 2003, etc).</p>

<pre><code>&lt;mt:ArchiveList type="Yearly" sort_order="ascend"&gt;
</code></pre>

<p>Open the TR; set the $start_year variable.</p>

<pre><code>    &lt;mt:ArchiveListHeader&gt;&lt;tr&gt;&lt;$mt:ArchiveDate format="%Y" setvar="start_year"$&gt;&lt;/mt:ArchiveListHeader&gt;
</code></pre>

<p>Output the two-digit year in a TD.</p>

<pre><code>    &lt;th&gt;&lt;$mt:ArchiveDate format="'%y"$&gt;&lt;/th&gt;
</code></pre>

<p>Set $year variable with the current year in the archive list.</p>

<pre><code>    &lt;$mt:ArchiveDate format="%Y" setvar="year"$&gt;
</code></pre>

<p>Set $is_posts_year_$year using year variable set above. This is a boolean variable that determines if there are posts within the year in context.</p>

<pre><code>    &lt;$mt:setvar name="is_posts_year_{$year}" value="1"$&gt;
</code></pre>

<p>List monthly archives for the current year.</p>

<pre><code>    &lt;mt:ArchiveList type="Monthly"&gt;
</code></pre>

<p>Set the $month_year variable after removing the &#8220;0&#8221; from the front of the month if it exists (eg. 1_2005, 2_2005 &#8230; 12_2005).</p>

<pre><code>        &lt;$mt:ArchiveDate format="%m_%Y" regex_replace="/^0/","" setvar="month_year"$&gt;
</code></pre>

<p>Set the links_$month_year variable. This variable name is dynamically set using the $month_year var set above. The value will be a month linked to the correct archive (eg. <code>&lt;a href="http://kokochi.com/archives/2004/05/"&gt;May&lt;/a&gt;</code>).</p>

<pre><code>        &lt;mt:SetVarBlock name="links_{$month_year}"&gt;&lt;a href="&lt;$MTArchiveLink$&gt;"&gt;&lt;mt:ArchiveDate format="%b"$&gt;&lt;/a&gt;&lt;/mt:SetVarBlock&gt;
</code></pre>

<p>Close monthly archive list.</p>

<pre><code>    &lt;/mt:ArchiveList&gt;
</code></pre>

<p>Close the TR. Set the $end_year variable.</p>

<pre><code>    &lt;mt:ArchiveListFooter&gt;&lt;/tr&gt;&lt;$mt:ArchiveDate format="%Y" setvar="end_year"$&gt;&lt;/mt:ArchiveListFooter&gt;
</code></pre>

<p>Close the yearly archive list.</p>

<pre><code>&lt;/mt:ArchiveList&gt;
</code></pre>

<p>For months 1 thorugh 12 do the following.</p>

<pre><code>&lt;mt:for var="month" from="1" to="12"&gt;
</code></pre>

<p>Open TR.</p>

<pre><code>    &lt;tr&gt;
</code></pre>

<p>Loop through the years between $start_year and $end_year.</p>

<pre><code>    &lt;mt:for var="year" from="$start_year" to="$end_year"&gt;
</code></pre>

<p>If there is posts in the current year, then continue.</p>

<pre><code>        &lt;mt:if name="is_posts_year_{$year}"&gt;
</code></pre>

<p>Set the $month_year variable using the $month and $year variables from the above for loops.</p>

<pre><code>            &lt;mt:setvarblock name="month_year"&gt;&lt;mt:var name="month"&gt;_&lt;mt:var name="year"&gt;&lt;/mt:setvarblock&gt;
</code></pre>

<p>Use the $month_year variable to output the links_$month_year set in the archive lists above.</p>

<pre><code>        &lt;td&gt;&lt;$mt:var name="links_{$month_year}" default="&amp;nbsp;"$&gt;&lt;/td&gt;
</code></pre>

<p>Close all the <code>MTML</code> loops,  <code>MTML</code> conditionals, and  <code>HTML</code> tags.</p>

<pre><code>        &lt;/mt:if&gt;
    &lt;/mt:for&gt;
    &lt;/tr&gt;
&lt;/mt:for&gt;
&lt;/table&gt;
</code></pre>

<h3>Scaleable?</h3>

<p>As long as your sidebar is wide enough, you&#8217;ll have room for this widget as it get&#8217;s wider. But by hacking the above code it shouldn&#8217;t be to hard to break the table into two vertically stacked tables or add some javascript to produce a solution involving hiding/showing of content.</p>

<p>If you hack the above, I&#8217;d love to hear about it.</p>

<p>Enjoy.</p>

<p>And thx again to Brad Choate, Mie Yaginuma, and Anil Dash for the instigation and assistance to produce this advanced example of <code>MTML</code>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Movable Type Bleeding Edge Updates Via Subversion</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/movable-type-bleeding-edge-updates-via-subversion.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.57</id>

    <published>2008-04-15T03:03:25Z</published>
    <updated>2008-04-15T04:18:13Z</updated>

    <summary>Follow these steps to easily switch between versions of Movable Type. Requirements Subversion - Movable Type development is kept in a version control system called Subversion. Subversion allow many developers to work on the same code at the same time....</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="bleedingedge" label="bleeding edge" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="code" label="code" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="release" label="release" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="stable" label="stable" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="svn" label="svn" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tag" label="tag" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="trac" label="trac" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>Follow these steps to easily switch between versions of Movable Type.</p>

<h3>Requirements</h3>

<ul>
<li>Subversion - Movable Type development is kept in a version control system called Subversion. Subversion allow many developers to work on the same code at the same time.</li>
<li>shell access - I use Terminal.app on my MacBook Pro.</li>
</ul>

<h3>Development Branches</h3>

<p>There is a branch for each development cycle. These branches are worked on for 1-3 weeks, before a branch is closed and passed to QA for testing. If QA finds any bugs, then bugs are fixed in the branch. All subsequent features are implemented in the next branch sequentially. The branch with the highest number is the most current release (as of this writing, release-35)</p>

<ul>
<li><a href="http://code.sixapart.com/svn/movabletype/branches/" title="Movable Type Branches">http://code.sixapart.com/svn/movabletype/branches/</a></li>
</ul>

<h3>Stable Tags</h3>

<p>Once a particular place in development is tested and approved for release the code at that point is tagged with a release number. </p>

<ul>
<li>
<a href="http://code.sixapart.com/svn/movabletype/tags/" title="Movable Type Stable Tags">http://code.sixapart.com/svn/movabletype/tags/</a></li>
</ul>

<h3>Checkout the Code</h3>

<p>These steps will be a little different based upon the setup of the web hosting environment. Here&#8217;s a simplified example of how I set-up Movable Type:</p>

<pre><code>www.beausmith.com/
    cgi/
        release-33/
        release-34/
        mt  -&gt; release-34
        mt4.01
        mt4.11
    html/
        blog/
            (archives here)
        index.php
        mt-static -&gt; ../../cgi/mt/mt-static
</code></pre>

<p>The items with the arrow <code>-&gt;</code> are symlinks. These allow me to not have to change urls when I update to a new release and also allow me to keep my mt-static directory inside the release folder. When I want to update to release-35, here&#8217;s the steps I&#8217;ll take:</p>

<ol>
<li><p>Navigate to the <code>cgi</code> directory &amp; use the subversion checkout command to get the latest version:</p>

<pre><code>$ pwd;
/www.beausmith.com
$ cd cgi;
$ svn co http://code.sixapart.com/svn/movabletype/branches/release-35;
</code></pre></li>
<li><p>Issue the make command to build the current release</p>

<pre><code>$ make;
</code></pre></li>
<li><p>Make the support files writeable</p>

<pre><code>$ chmod -R 777 release-35/mt-static/support
</code></pre></li>
<li><p>Remove the current symlink and create a new symlink to point to your release branch. I do this in the same step so as to avoid any potential downtime while switching. </p>

<pre><code>$ rm mt; ln -s release-35 mt;
</code></pre></li>
</ol>

<p>That&#8217;s it! Go access you MT installation.</p>

<h3>Updating</h3>

<p>Since changes will be committed round the clock by the MT teams in San Francisco and Japan, you&#8217;ll want to update often to get the latest changes.</p>

<pre><code>    $ cd cgi/release-35;
    $ svn up;
    $ make;
</code></pre>

<p>Doing a <code>make</code> is not necessary unless there are *.pre files that need to be rendered for the current language.</p>

<p><strong>Note:</strong> If you make changes to the files in the MT code, they may conflict with the updated code. Look forward to a future article about Subversion basics.</p>

<h3>Switching Between Movable Type Installs</h3>

<p>Is there a bug in release-35 and you want to go back to the stable mt4.11 install? Easy. Remove the <code>mt</code> symlink and then create a new one pointing to the desired MT install:</p>

<pre><code>    $ rm mt; ln -s mt4.11 mt;
</code></pre>

<h3>View Changes &amp; Code Diffs with Trac</h3>

<p>Trac also makes it easy to browse through all the recent changes to any branch of Movable Type. Note the similarity &amp; differences in the urls</p>

<ul>
<li>trac: http://code.sixapart.com/trac/movabletype/browser/branches/release-35/</li>
<li>svn: http://code.sixapart.com/svn/movabletype/branches/release-35/</li>
</ul>

<p>Questions? Please comment below.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Adding Custom Styles for a Single Entry in Movable Type</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/adding-custom-styles-for-a-single-entry-in-movable-type.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.55</id>

    <published>2008-04-14T20:50:53Z</published>
    <updated>2008-04-14T21:13:44Z</updated>

    <summary><![CDATA[ #entry-55 ul li { color: blue; } The first three lines of this entry&#8217;s content is: &lt;style type="text/css"&gt; #entry-55 ul li { color: blue; } &lt;/style&gt; Are the items in this unordered list blue? blue blue blue If so,...]]></summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="css" label="css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="entry" label="entry" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="inline" label="inline" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="style" label="style" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p><style type="text/css">
#entry-55 ul li { color: blue; }
</style></p>

<p>The first three lines of this entry&#8217;s content is:</p>

<pre><code>&lt;style type="text/css"&gt;
#entry-55 ul li { color: blue; }
&lt;/style&gt;
</code></pre>

<p>Are the items in this unordered list blue?</p>

<ul>
<li>blue</li>
<li>blue</li>
<li>blue</li>
</ul>

<p>If so, I&#8217;ve added custom styles to this single entry.</p>

<ol>
<li>Create your entry</li>
<li>Save it as draft</li>
<li><p>Look in the url of your browser to find the <code>id</code> which is a unique <strong>id</strong>entifier for the entry (careful not to use blog_id as that is a unique id for the blog)</p>

<pre><code>http://www.chezbeau.com/cgi-bin/mt/mt.cgi?__mode=view&amp;_type=entry&amp;id=55&amp;blog_id=2&amp;saved_changes=1
</code></pre></li>
<li><p>Enter the id into your css</p></li>
<li>Change Status to Published</li>
<li>Save your entry</li>
</ol>

<p>All this assumes you are using the default templates from MT, if not you&#8217;ll have to add <code>&lt;$mt:EntryID$&gt;</code> to a container wrapping each entry in your templates.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Default Upload Destination in Movable Type</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/default-upload-destination-in-movable-type.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.54</id>

    <published>2008-04-14T20:10:28Z</published>
    <updated>2008-04-14T21:38:14Z</updated>

    <summary>By default, assets are placed in the site root as defined in the publishing settings. For example, if the site root was http://beausmith.com/ then the asset image.gif would be uploaded to http://beausmith.com/image.gif. There are two common ways to change this:...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Client Education" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="assets" label="assets" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mt4" label="mt4" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tricks" label="tricks" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="upload" label="upload" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>By default, assets are placed in the site root as defined in the publishing settings. For example, if the site root was <code>http://beausmith.com/</code> then the asset <code>image.gif</code> would be uploaded to <code>http://beausmith.com/image.gif</code>.</p>

<p>There are two common ways to change this:
1. Define a default upload destination folder.
2. Hard code upload destination and hide it from the form.</p>

<h2>1. Define a default upload destination folder</h2>

<p>To pre-populate the folder where assets will be placed add this line to the top of <code>MT_BASE/tmpl/cms/include/asset_upload.tmpl</code> and replace &#8220;assets&#8221; with your preferred folder name:</p>

<pre><code>&lt;$mt:setvar name="extra_path" value="assets"$&gt;
</code></pre>

<p>I use &#8220;assets&#8221; because this is the most generic word to describe all the things that could be placed in this folder: photos, video, documents etc.</p>

<h2>2. Hard code upload destination and hide it from the form</h2>

<p>Open <code>MT_BASE/tmpl/cms/include/asset_upload.tmpl</code> and search for this code (from MT4.0, code from MT4.1.x has a big chunk of javascript in the middle of the second <code>&lt;mtapp:setting&gt;</code> block, but the javascript can safely be removed as well):</p>

<pre><code>&lt;mt:setvarblock name="upload_hint"&gt;
    &lt;__trans phrase="_USAGE_UPLOAD" params="&lt;$mt:var name="blog_name" escape="html"$&gt;"&gt;
&lt;/mt:setvarblock&gt;
&lt;mtapp:setting
    id="folder"
    label_class="top-label"
    label="&lt;__trans phrase="Upload Destination"&gt;"
    hint="&lt;$mt:var name="upload_hint"$&gt;"
    show_hint="1"&gt;
    &lt;!-- &lt;$mt:var name="blog_url" escape="html"$&gt; --&gt;
    &lt;select name="site_path" onchange="setExtraPath(this)"&gt;
        &lt;option value="1"&gt;&amp;#60;&lt;__trans phrase="Site Root"&gt;&amp;#62;&lt;/option&gt;
    &lt;mt:if name="enable_archive_paths"&gt;
        &lt;option value="0"&lt;mt:if name="archive_path"&gt; selected="selected"&lt;/mt:if&gt;&gt;&amp;#60;&lt;__trans phrase="Archive Root"&gt;&amp;#62;&lt;/option&gt;
    &lt;/mt:if&gt;
    &lt;mt:if name="extra_paths"&gt;
        &lt;mt:loop name="extra_paths"&gt;
        &lt;option value="&lt;mt:if name="enable_archive_paths"&gt;0&lt;mt:else&gt;1&lt;/mt:if&gt;" middle_path="&lt;mt:var name="path" escape="html"&gt;"&lt;mt:if name="selected"&gt; selected="selected"&lt;/mt:if&gt;&gt;&lt;mt:var name="label" escape="html"&gt;&lt;/option&gt;
        &lt;/mt:loop&gt;
    &lt;/mt:if&gt;
    &lt;/select&gt;
    / &lt;input name="extra_path" id="extra_path" value="&lt;mt:var name="extra_path" escape="html"&gt;" /&gt;
&lt;/mtapp:setting&gt;
</code></pre>

<p>Replace the code with this code which will set the upload destination to <code>&lt;Site Root&gt;/assets/</code>:</p>

<pre><code>&lt;input type="hidden" name="site_path" id="site_path" value="1" /&gt;
&lt;input type="hidden" name="extra_path" id="extra_path" value="assets" /&gt;
</code></pre>

<p>The &#8220;Upload Destination&#8221; form elements should now be gone from the upload asset modal. </p>

<p><strong>Note:</strong> There are other ways to do this in the Perl code. It&#8217;d be nice to just have <a href="http://www.movabletype.org/documentation/appendices/config-directives/">config directives</a> to handle this.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Scrolling Preformatted Code Examples</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/scrolling-preformatted-code-examples.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.52</id>

    <published>2008-04-04T23:19:38Z</published>
    <updated>2008-04-14T20:45:05Z</updated>

    <summary>I was adding more examples to the Movable Type Documentation site today and my lines of code were so long that they went beyond the width of the column&#8230; so I implemented some css to use a scrollbar to display...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="code" label="code" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="css" label="css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="overflow" label="overflow" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pre" label="pre" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>I was adding more examples to the <a href="http://www.movabletype.org/documentation/">Movable Type Documentation site</a> today and my lines of code were so long that they went beyond the width of the column&#8230; so I implemented some css to use a scrollbar to display longer lines. Shorter lines display without the scrollbar.</p>

<h3>Examples (and HTML source)</h3>

<p>Short code renders no scroll bar&#8230;</p>

<pre><code>&lt;pre&gt;&lt;code&gt;short code example&lt;/code&gt;&lt;/pre&gt;
</code></pre>

<p>Long code renders scroll bar&#8230;</p>

<pre><code>&lt;pre&gt;&lt;code&gt;long code example (is it odd that the word "short" is longer that the word "long") long code example long code example&lt;/code&gt;&lt;/pre&gt;
</code></pre>

<h3>CSS Code</h3>

<pre><code>pre {
    overflow: auto;
    width: auto;
    background-color: #f0f6fa;
    border: 1px solid #CCCCCC;
    border-width: 1px 0;
    padding: 10px;
}
</code></pre>

<ul>
<li><code>overflow: auto;</code> - creates the scrollbar if content is wider than container.</li>
<li>`width: auto; - .</li>
<li><code>&lt;pre&gt;</code> &#8220;preformatted&#8221; &#8212; all the <strong>spaces and carriage returns</strong> are rendered exactly as you type them. All other formating (links, code, etc) are preserved.</li>
<li><code>&lt;code&gt;</code> tag renders in mono-spaced font.</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Give Movable Type User System Admin Rights via MySQL</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/give-movable-type-user-system-admin-rights-via-mysql.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.50</id>

    <published>2008-04-03T00:14:21Z</published>
    <updated>2008-04-03T00:22:07Z</updated>

    <summary><![CDATA[ login to mysql $ mysql -u USERNAME -p DATABASENAME find id of user &gt; select author_name, author_id from mt_author; +---------------+-----------+ | author_name | author_id | +---------------+-----------+ | beau | 1 | | quinn | 2 | | ryan |...]]></summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="mysql" label="mysql" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sysadmin" label="sysadmin" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tricks" label="tricks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<ol>
<li><p>login to mysql</p>

<pre><code>$ mysql -u USERNAME -p DATABASENAME
</code></pre></li>
<li><p>find id of user</p>

<pre><code>&gt; select author_name, author_id from mt_author;
+---------------+-----------+
| author_name   | author_id |
+---------------+-----------+
| beau          |         1 |
| quinn         |         2 |
| ryan          |         3 |
| jono          |         4 |
+---------------+-----------+
</code></pre></li>
<li><p>issue the command using the correct author id from the table</p>

<pre><code>&gt; update mt_author set author_is_superuser = 1 where author_id = 1;
</code></pre></li>
</ol>
]]>
        

    </content>
</entry>

<entry>
    <title>Reset Password for Movable Type User via MySQL</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/04/reset-password-for-movable-type-user-via-mysql.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.49</id>

    <published>2008-04-02T23:55:42Z</published>
    <updated>2008-04-02T23:59:23Z</updated>

    <summary><![CDATA[ login to mysql $ mysql -u USERNAME -p DATABASENAME find id of user &gt; select author_name, author_id from mt_author; +---------------+-----------+ | author_name | author_id | +---------------+-----------+ | beau | 1 | | quinn | 2 | | ryan |...]]></summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="mysql" label="mysql" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="password" label="password" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="reset" label="reset" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tricks" label="tricks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<ol>
<li><p>login to mysql</p>

<pre><code>$ mysql -u USERNAME -p DATABASENAME
</code></pre></li>
<li><p>find id of user</p>

<pre><code>&gt; select author_name, author_id from mt_author;
+---------------+-----------+
| author_name   | author_id |
+---------------+-----------+
| beau          |         1 |
| quinn         |         2 |
| ryan          |         3 |
| jono          |         4 |
+---------------+-----------+
</code></pre></li>
<li><p>issue the command using the correct author id from the table</p>

<pre><code>&gt; update mt_author set author_password = encrypt('foobar') where author_id = 1;
</code></pre></li>
</ol>
]]>
        

    </content>
</entry>

<entry>
    <title>Fastest Way to Login to Movable Type</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/03/fastest-way-to-login-to-movable-type.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.47</id>

    <published>2008-03-28T19:47:07Z</published>
    <updated>2008-09-25T07:41:51Z</updated>

    <summary>I&#8217;m a keyboard-short-cut whore, feel me roar! Enter username (shouldn&#8217;t have to tab as your cursor should already be there) Hit tab Enter password Control-R (access key to check the remember me checkbox) Control-S (access key for &#8220;submit&#8221; throughout the...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Tips &amp; Tricks" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>I&#8217;m a keyboard-short-cut whore, feel me roar!</p>

<ol>
<li><strong>Enter username</strong> (shouldn&#8217;t have to tab as your cursor should already be there)</li>
<li><strong>Hit tab</strong></li>
<li><strong>Enter password</strong></li>
<li><strong>Control-R</strong> (access key to check the remember me checkbox)</li>
<li><strong>Control-S</strong> (access key for &#8220;submit&#8221; throughout the app)</li>
</ol>
]]>
        

    </content>
</entry>

<entry>
    <title>Firefox Shortcut to MT Docs</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/03/firefox-shortcut-to-mt-docs.php" />
    <id>tag:www.beausmith.com,2008:/mt//2.44</id>

    <published>2008-03-20T07:52:58Z</published>
    <updated>2008-03-20T08:25:04Z</updated>

    <summary>I visit the docs so often I made a Firefox shortcut for it. To go to the docs for the tag I type the following into the location bar: docs entries and then I&#8217;m redirected to: http://www.movabletype.org/documentation/appendices/tags/entries.html BAM! Here&#8217;s a...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
    <category term="docs" label="docs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="firefox" label="firefox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hack" label="hack" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="shortcut" label="shortcut" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<p>I visit the docs so often I made a Firefox shortcut for it.</p>

<p>To go to the docs for the tag <$mt:Entries$> I type the following into the location bar:</p>

<pre><code>docs entries
</code></pre>

<p>and then I&#8217;m redirected to:</p>

<pre><code>http://www.movabletype.org/documentation/appendices/tags/entries.html
</code></pre>

<p>BAM!</p>

<p>Here&#8217;s a screenshot of how you set it up. Basically you use %s to grab the string after the keyword.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Firefox MT Docs Bookmark Shortcut" src="http://www.beausmith.com/mt/assets/ff-docs-bookmark.gif" width="509" height="240" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>
]]>
        

    </content>
</entry>

<entry>
    <title>WTF is CGI-BIN MT MT CGI?  BAH!</title>
    <link rel="alternate" type="text/html" href="http://www.beausmith.com/mt/2008/03/wtf-is-cgibin-mt-mt-cgi-bah.php" />
    <id>tag:www.chezbeau.com,2008:/mt//2.43</id>

    <published>2008-03-03T17:05:46Z</published>
    <updated>2008-03-03T09:27:06Z</updated>

    <summary> What the f*ck is cgi-bin mt mt cgi? Apparently that doesn&#8217;t make sense Mr. Client. So I updated his .htaccess file with this: Redirect /admin http://www.domain.com/cgi-bin/mt/mt.cgi?blog_id=1 Now he points his browser to http://www.domain.com/admin and he is redirected to his...</summary>
    <author>
        <name>Beau Smith</name>
        <uri>http://beausmith.com</uri>
    </author>
    
        <category term="Client Education" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="client" label="client" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hack" label="hack" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tricks" label="tricks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.beausmith.com/mt/">
        <![CDATA[<blockquote>
  <p>What the f*ck is <code>cgi-bin mt mt cgi</code>?</p>
</blockquote>

<p>Apparently that doesn&#8217;t make sense Mr. Client.</p>

<p>So I updated his .htaccess file with this:</p>

<pre><code>Redirect /admin http://www.domain.com/cgi-bin/mt/mt.cgi?blog_id=1
</code></pre>

<p>Now he points his browser to <code>http://www.domain.com/admin</code> and he is redirected to his blog in his MT install.</p>

<p>Then he decided he didn&#8217;t want to type, just click&#8230; but didn&#8217;t want a link to &#8220;admin&#8221; visible on his site&#8230; so I made an invisible one.</p>

<p>So just after the date that appears on every entry in his blog, we linked a non-breaking space to his install:</p>

<pre><code>&lt;a href="http://www.domain.com/cgi-bin/mt/mt.cgi?blog_id=1"&gt;&amp;nbsp;&lt;/a&gt;
</code></pre>
]]>
        

    </content>
</entry>

</feed>
