<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>Endevver Consulting</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/" />
    
    <id>tag:endevver.com,2008-01-25://1</id>
    <updated>2009-11-30T19:02:50Z</updated>
    <subtitle>Movable Type and Social media application development for the Enterprise and large businesses</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Enterprise</generator>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/EndevverConsulting" /><feedburner:info uri="endevverconsulting" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>EndevverConsulting</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly></feedburner:browserFriendly><entry>
    <title>Embed galleries into your blog posts using Asset Gallery</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/11/embed-galleries-into-your-blog-posts-using-asset-gallery.html" />
    <id>tag:endevver.com,2009://1.36</id>

    <published>2009-11-30T18:50:27Z</published>
    <updated>2009-11-30T19:02:50Z</updated>

    <summary>Endevver is happy to announce the release of the Asset Gallery plugin for Movable Type Pro. We are also happy to make this plugin available to the Movable Type community for free under an open source license. We believe in...</summary>
    <author>
        <name>Byrne Reese</name>
        <uri>http://majordojo.com</uri>
    </author>
    
        <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="galleries" label="galleries" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gallery" label="gallery" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opensource" label="open source" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plugins" label="plugins" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="slideshows" label="slideshows" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[<p>Endevver is happy to announce the release of the <a href="http://endevver.com/plugins/asset-gallery/">Asset Gallery plugin</a> for <a href="http://www.movabletype.com/">Movable Type Pro</a>. We are also happy to make this plugin available to the Movable Type community <strong>for free under an open source license</strong>. We believe in promoting open source software in all that we do because it provides the single best value for our clients, not only because they get high quality software with a lower cost of ownership over time, but because in working with us they help foster a vibrant community on top of the Movable Type platform.</p>

<p>The Asset Gallery plugin offers users the ability to embed one or more slideshows into a blog post, user profile, or page. Users have completely control over the titles and captions, as well as the ordering, for each image in a gallery or slideshow. To learn more about the plugin, visit its <a href="http://endevver.com/plugins/asset-gallery/">homepage</a>, read <a href="http://endevver.com/plugins/asset-gallery/documentation/">its documentation</a>, or watch the screencast!</p>

<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7724980&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7724980&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object></p>

<p>Endevver would like to thank and invite everyone to <a href="http://twitter.com/home?status=Thank+you+@chicagonow+for+Asset+Gallery+plugin+for+Movable+Type!">thank</a> the entire <a href="http://www.chicagonow.com/">ChicagoNow</a> team for agreeing to make the Asset Gallery plugin available under an open source license.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Creating event calendars in Movable Type</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/11/creating-event-calendars-in-movable-type.html" />
    <id>tag:endevver.com,2009://1.33</id>

    <published>2009-11-09T23:00:50Z</published>
    <updated>2009-11-09T23:34:27Z</updated>

    <summary>Endevver is committed to making Movable Type better for everyone. Virtually every line of code we write is open source and we are engaged heavily in Melody, a collaborative, community-driven fork of Movable Type. Like most engineers we revel in...</summary>
    <author>
        <name>Byrne Reese</name>
        <uri>http://majordojo.com</uri>
    </author>
    
        <category term="News and Events" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="calendars" label="calendars" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="documentation" label="documentation" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="engineers" label="engineers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="events" label="events" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hackers" label="hackers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="melody" label="melody" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="movabletype" label="movable type" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opensource" label="open source" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[<p>Endevver is committed to making Movable Type better for everyone. Virtually every line of code we write is open source and we are engaged heavily in <a href="http://openmelody.org/">Melody</a>, a collaborative, community-driven fork of Movable Type. Like most engineers we revel in code, we enjoy mashing things together to make new things and old things work better, and delight in people using our software. Also like engineers, <strong>we value good documentation</strong>. Without it, most of us engineering-types are useless. Without it, we can't learn. And without it, most of us will go somewhere else where can <em>can</em> find it. </p>

<p>Which is why Endevver is also working to provide Movable Type and Melody with a resource its users have been in desperate need of: documentation and instructions on how to build a web site using this software we love. You can find much of this documentation on <a href="http://openmelody.org/">Melody's web site</a>. We have published a <a href="http://openmelody.org/docs/reference/templating-language-primer">primer on the Melody Templating Language</a>, and the first several introductory chapters on building web sites with Melody (a work in progress):</p>

<ul>
<li><a href="http://openmelody.org/docs/designer/01-introduction">Introduction</a></li>
<li><a href="http://openmelody.org/docs/designer/02-groundwork">Laying the Groundwork</a></li>
</ul>

<p>Our documentation will span the entire spectrum of skill levels, from beginner to expert. For experts, here is a preview of a chapter we just wrote that covers one of the more advanced topics: how to create an event calendar using Movable Type. Enjoy.</p>
]]>
        <![CDATA[<h2>Building an Event and Calendar Blog</h2>

<p>A blog can actually be a very effective mechanism by which to manage upcoming events. In this model, an event would need to exhibit the following properties:</p>

<ul>
<li><p>An event must be archived according to its start date, so that a list can easily be constructed of upcoming events, or even for all of the events scheduled for a given time frame (week, month, year, etc).</p></li>
<li><p>An event must be automatically unpublished and removed from the web site once the event has passed. Of course some people may want certain artifacts from the event to persist even after it has elapsed; we will leave determined that up to the administrator. </p></li>
</ul>

<p>To execute against this use case you will need one simple component:</p>

<ul>
<li><a href="http://endevver.com/plugins/expire/">Expire Entries Plugin</a> - a plugin that will automatically unpublish entries at a scheduled date.</li>
</ul>

<p>Let's begin.</p>

<h3>The Basic Setup</h3>

<p>Once the necessary components (Custom Fields and Expire Entries) have been installed, then there is not much for you to do. They key is understanding how to manage dates properly. Remember, every event has two key dates that must be managed in a specific way for this trick to work: the start and end date/time for the event. </p>

<p>The event start date/time field is managed by overloading the entry's publish date. The secret is in knowing that there is nothing wrong with setting an entry's publish date to some date in the future and also having its status set to "Published" (as opposed to scheduling it to be published in the future). Once the published date/time is set, the entry will be archived accordingly. So even if the current date is actually December 15, 2009, and the publish date for an entry is set to February 21, 2010 then your blog will still publish a monthly archive for February 2010 into which your blog post will be placed.</p>

<p>The challenge this hack creates in one of user education. Users engaged in managing the event calendar will need to be properly briefed as to the intended usage of the "Publish On" field, because its name will not really be an accurate reflection of its behavior. </p>

<p>The event's end date, luckily is a little more intuitive. It is achieved by installing the Expire Entries plugin which adds another date field to the Create/Edit Entry interface: "Expire On." Just like you can schedule an entry to be <em>published</em> on a given date and time, this plugin provides the opposite functionality by scheduling an entry to be <em>unpublished</em> as a designated date and time. The Expire On field therefore is used to hold the correspond event's end date/time.</p>

<p><strong>Publishing the Start and End Times for an Event</strong></p>

<p>Once the managers of your event calendar have been properly changed on the proper usage of the Publish On and Expire On fields, then you need to turn your attention to what information is being published to your web site. First up: making it obvious to one of your readers when an event is scheduled to start and end. This is achieved using the date tags provided by Melody and the Expire Entires plugin, as well as a few date formatting rules.</p>

<p>The following recipe will output one of two start/end time formats depending upon whether or not the event starts and ends on the same day or not:</p>

<ul>
<li>"<strong>Date</strong>: February 14, 2010 - 8:00am-3pm"</li>
<li>"<strong>Dates</strong>: Start: February 14, 2010 8:00am - February 21, 2010 6:00pm"</li>
</ul>

<p>This output is achieved by comparing just the month, day and year of both the publish on and expire on fields. If they differ, then we know to use the expanded syntax.</p>

<pre><code>&lt;mt:setvarblock name="start"&gt;&lt;$mt:EntryDate format="%x"$&gt;&lt;/mt:setvarblock&gt;
&lt;mt:setvarblock name="end"&gt;&lt;$mt:EntryExpireDate format="%x"$&gt;&lt;/mt:setvarblock&gt;
&lt;mt:if name="start" eq="$end"&gt;
  &lt;span class="datalabel"&gt;Date:&lt;/span&gt; &lt;$mt:var name="start"$&gt;, 
  &lt;$mt:EntryDate format="%X"$&gt; - &lt;$mt:EntryExpireDate format="%X"$&gt;
&lt;mt:else&gt;
  &lt;span class="datalabel"&gt;Dates:&lt;/span&gt; Start: &lt;$mt:var name="start"$&gt;, 
  &lt;$mt:EntryDate format="%X"$&gt;;  End: &lt;$mt:var name="end"$&gt;, 
  &lt;$mt:EntryExpireDate format="%X"$&gt;
&lt;/mt:if&gt;
</code></pre>

<p><strong>Displaying Events According to When They Were Added</strong></p>

<p>The default sort order for an entry within a blog is according to the date it was published. However, this default behavior may not be desirable for the front door of your web site, especially if you manage a lot of events. That is because events that happen later in the year will effectively be anchored to the top of your web site. If you want to keep your readers abreast of new events being added to the system, then when they visit your homepage they may not always see what is "newest."</p>

<p>To fix this, you will need to change the default sort key for entries on your homepage. This is done by added one attribute to your <code>&lt;mt:Entries&gt;</code> tag:</p>

<pre><code>&lt;mt:Entries sort_by="created_on"&gt;
  &lt;!-- your code here --&gt;
&lt;/mt:Entries&gt;
</code></pre>

<p>The above will force the events to be sorted in the order they were entered into the system irrespective of the event's start date.</p>

<p>You will need to remember to make this change not only to your homepage, but also your RSS/Atom feed if necessary as well.</p>

<p><strong>Displaying Upcoming Events</strong></p>

<p>In the event that you need to promote events that are scheduled to start soon, then you can use the <code>days</code> parameter on <code>&lt;mt:Entries&gt;</code> to display only those events scheduled to be published within a designated number of days. For example, the following template code will output all events scheduled to start in the next seven days:</p>

<pre><code>&lt;mt:Entries days="7"&gt;
  &lt;!-- your code here --&gt;
&lt;/mt:Entries&gt;
</code></pre>

<p><strong>Summary</strong></p>

<p>As you can hopefully see, managing and publishing an event calendar is not that complex and can be accomplished using some standard off the shelf components. In the next section we will delve into how you can accept events from the community for your calendar. </p>

<h3>Accepting User Submitted Calendar Events</h3>

<p><em>This tutorial is for users who have installed the Commercial.pack from Movable Type Pro into Melody as it requires the use of Community Solution. The performance of this combination has not been tested and may be in violation of your Movable Type licensing agreement. Proceed with caution.</em></p>

<p>Setting up your system to accept events submitted by readers or members of your community is slightly more involved. It still relies on the fundamentals discussed above, but a way for the user to specify a start and end date, and have those values inserted into the proper fields associated with an entry is required.</p>

<p>The bad news is that there is no off-the-shelf system that will do this for you. The good news is that this is a *solved problem," and that is precisely what this guide will help you in doing.</p>

<p>This is what you will need:</p>

<ul>
<li><p>Community Solution, provided by <a href="http://www.movabletype.com/">Movable Type Pro</a>.</p></li>
<li><p><a href="http://endevver.com/plugins/expire/">Expire Entries Plugin</a> - a plugin that will automatically unpublish entries at a scheduled date.</p></li>
<li><p>The courage to cut and paste and edit Perl code. </p></li>
</ul>

<p><strong>Getting Started</strong></p>

<p>First of all, the bulk of the work that needs to be done is already handled for us by the Movable Type Community Solution. This piece of software has within the ability to accept blog posts submitted by the community. The <em>missing</em> piece is how the community is allowed to set the publish and expire on fields from the public submission web interface. Before however we get into that, let's first make sure we can setup a blog to properly accept user submissions.</p>

<p><strong>Setting Up the Community Blog</strong></p>

<p>The most expedient way to get started is to create a new blog and use the "Community Blog" template set in the process. This will setup all the templates for you in just a few clicks. Granted, the look and feel of this blog may not be what you desire for your own site, but it will be far easier to apply this theme and strip away all that you don't like and need, then it will be to build a theme from the ground up for you event calendar. </p>

<p>Once this theme is applied there will be only a few templates you will need to concern yourself with. The rest can be discarded, or better yet, customized to suit the design of your site accordingly. They are:</p>

<ul>
<li><p>"Create Entry" index template - publishes the actual submission form to your web site. This will need to be customized to look like the rest of your site.</p></li>
<li><p>"Entry Form" template module - this is a template module that contains just the form elements for your entry submission form. </p></li>
<li><p>"Entry Response" system template - this template is responsible for displaying a message to the user after they submit an entry to your web site. </p></li>
</ul>

<p><strong>About the Entry Response System Template</strong></p>

<p>The "Entry Response" template is the most important template in this scenario because without the system won't work. Movable Type will instead return the following error message, "System template entry_response not found in blog." The core challenge here is that this template cannot be created manually. It can only be created by applying a template set that contains a template with this ID to a blog. The template sets that contain this template for you are:</p>

<ul>
<li>Motion</li>
<li>Community Blog</li>
</ul>

<p>Alternatively of course, you can build your own template set and include this system template within it. The approach you choose will depend largely upon what you think will be easiest and most expedient for you.</p>

<p><strong>Setting Up the Form</strong></p>

<p>The best way to setup your form is to take a form generated by Movable Type and then to customize it. This is because the HTML for this form matters, a lot. You must make sure you include all of the proper hidden HTML form elements, and use the proper input names so that the data submitted is properly submitted and processed by Movable Type. </p>

<p>If you are using Custom Fields, then you can define all of the custom fields you want your visitors to submit along with their event, e.g. event venue, contact info, etc. The custom fields will appear and be published for you automatically if you are using the default "Entry Form" template module that comes with the Community Blog template set. </p>

<p>There will be several fields however that will <em>not</em> be published for you, which you will need to add to your form manually. They are:</p>

<ul>
<li>Start Date</li>
<li>Start Time</li>
<li>Start AM/PM</li>
<li>End Date</li>
<li>End Time</li>
<li>End AM/PM</li>
</ul>

<p>The names you assign these fields will be very important because we will need to reference them in our Perl code that will populate the entry with the corresponding information. In addition, the dates and times submitted by your users must be a specific format in order for them to properly process by Movable Type. Here are some recommended names to use in the form, and the required format your visitors will need to use when supplying information to you:</p>

<ul>
<li>Start Date: <code>start_date_d</code> as "YYYY-MM-DD"</li>
<li>Start Time: <code>start_date_t</code> as "hh::mm::ss"</li>
<li>Start AM/PM: <code>start_ampm</code> as "am" or "pm"</li>
<li>End Date: <code>end_date_d</code> as "YYYY-MM-DD"</li>
<li>End Time: <code>end_date_t</code> as "hh::mm::ss"</li>
<li>End AM/PM: <code>end_ampm</code> as "am" or "pm"</li>
</ul>

<p>Here is some sample HTML for the end date form elements (the start date is identical except for the form input names):</p>

<pre><code>&lt;input type="hidden" id="end_date_d" name="end_date" value="" /&gt;
&lt;input type="hidden" id="end_date_t" name="end_time" value="00:00:00" /&gt;
&lt;input type="text" class="date-pick" id="end_date" name="end_date" value="" size="14" /&gt;
&lt;select name="end_hour"&gt;
&lt;option&gt;1&lt;/option&gt;
&lt;option&gt;2&lt;/option&gt;
&lt;option&gt;3&lt;/option&gt;
&lt;option&gt;4&lt;/option&gt;
&lt;option&gt;5&lt;/option&gt;
&lt;option&gt;6&lt;/option&gt;
&lt;option&gt;7&lt;/option&gt;
&lt;option&gt;8&lt;/option&gt;
&lt;option&gt;9&lt;/option&gt;
&lt;option&gt;10&lt;/option&gt;
&lt;option&gt;11&lt;/option&gt;
&lt;option value="0"&gt;12&lt;/option&gt;
&lt;/select&gt;:
&lt;select name="end_minutes"&gt;
&lt;option&gt;00&lt;/option&gt;
&lt;option&gt;15&lt;/option&gt;
&lt;option&gt;30&lt;/option&gt;
&lt;option&gt;45&lt;/option&gt;
&lt;/select&gt;
&lt;select name="end_ampm"&gt;
&lt;option&gt;PM&lt;/option&gt;
&lt;option&gt;AM&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p><strong>Formatting Dates and Times</strong></p>

<p>Asking your community members to enter in date and time according to a specific format can be onerous and error prone. Therefore it is recommended you use a third party calendar library with a little custom javascript to assist users in this process. This example utilizes jQuery, the jQuery date plugin and the jQuery Date Picker plugin to make this happen. Once installed, here is the javascript you will need to add to your Create Entry template to properly reference these javascript libraries:</p>

<pre><code>&lt;script type="text/javascript" src="&lt;mt:StaticWebPath&gt;plugins/MyPlugin/js/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="&lt;mt:StaticWebPath&gt;plugins/MyPlugin/js/date.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="&lt;mt:StaticWebPath&gt;plugins/MyPlugin/js/jquery.datePicker.min-2.1.2.js"&gt;&lt;/script&gt;
</code></pre>

<p>Then this javascript can be added to the same template so to properly initialize your calendar widgets and date fields:</p>

<pre><code>Date.format = 'mm/dd/yyyy';
$(document).ready( function() {
  var today = new Date();
  $('.date-pick').datePicker().val(today.asString()).trigger('change');
  $('#start_date_d').val( today.asString('yyyy-mm-dd') );
  $('#end_date_d').val( today.asString('yyyy-mm-dd') );
  $('#start_date').bind(
    'dpClosed',
    function(e, selectedDates) {
      var d = selectedDates[0];
      if (d) {
        d = new Date(d);
        $('#start_date_d').val( d.asString('yyyy-mm-dd') );
      }
    }
  );
  $('#end_date').bind(
    'dpClosed',
    function(e, selectedDates) {
      var d = selectedDates[0];
      if (d) {
        d = new Date(d);
        $('#end_date_d').val( d.asString('yyyy-mm-dd') );
      }
    }
  );
});
</code></pre>

<p>We are getting closer. Hopefully though we have not lost you along the way as the above recipes all require some familiarity with Javascript. If you need help along the way the Melody and jQuery communities are both very helpful resources to call upon for help.</p>

<p><strong>The Movable Type Plugin, a.k.a. "Perl Code"</strong></p>

<p>If you have gotten this far, it will assumed that you have successfully gotten your event submission form working. It may not set the publish on and expire on fields properly, but you will have:</p>

<ul>
<li>Published the Create Entry form and viewed it online.</li>
<li>Made the necessary changes to the Entry Form module to surface the start and end dates for your event.</li>
<li>Successfully submitted an event using the form above (without properly setting the times of course).</li>
</ul>

<p>If you have successfully performed the three tasks above, then the rest is really just a bunch of copy and pasting - with perhaps a tweak here and there. </p>

<p>Every Melody plugin first requires you to create a <code>config.yaml</code> file. Let create it in the following location:</p>

<pre><code>$MELODY_HOME/plugins/DatePopulator/config.yaml
</code></pre>

<p>In this file let's put the following contents:</p>

<pre><code>name: Date Populator
callbacks:
  MT::Entry::pre_save: $DatePopulator::DatePopulator::entry_presave
  MT::Entry::post_save: $DatePopulator::DatePopulator::entry_postsave
</code></pre>

<p>This <code>config.yaml</code> file refers to two subroutines that you must implement (again, by a little copy and paste). These subroutines will live in a perl file you are about to create. Now, create the following file:</p>

<pre><code>$MELODY_HOME/plugins/DatePopulator/lib/DatePopulator.pm
</code></pre>

<p>In this file, paste the following:</p>

<pre><code>package DatePopulator;
use strict;
use Carp qw( croak );

# You can edit the values below if you have customized the 
# field names in your HTML
use constant FIELD_START_DATE =&gt; "start_date_d";
use constant FIELD_START_TIME =&gt; "start_date_t";
use constant FIELD_START_TOD =&gt; "start_ampm";
use constant FIELD_END_DATE =&gt; "end_date_d";
use constant FIELD_END_TIME =&gt; "end_date_t";
use constant FIELD_END_TOD =&gt; "end_ampm";

sub entry_presave {
    my ( $cb, $obj ) = @_;
    my $app = MT::App-&gt;instance;
    if ( $app &amp;&amp; ($app-&gt;isa('MT::App::CMS') || 
                  $app-&gt;isa('MT::App::Community')) 
              &amp;&amp; $app-&gt;mode eq "post" ) {
        my $q = $app-&gt;{query};
        my $d = $q-&gt;param( FIELD_END_DATE );
        my $t = $q-&gt;param( FIELD_END_TIME );
        $d = "$3-$1-$2" if ($d =~ m!^(\d{1,2})/(\d{1,2})/(\d{4})$!);
        my $end_hour = $q-&gt;param(FIELD_START_TOD) eq "PM" ? 
          $q-&gt;param('end_hour') + 12 : $q-&gt;param('end_hour');
        $end_hour = $end_hour &lt; 10 ? '0' . $end_hour : $end_hour;
        my $end_time = $end_hour . ':' . 
           $app-&gt;param('end_minutes') . ":00";
        $app-&gt;param('expire_on_date',$d);
        $app-&gt;param('expire_on_time',$end_time);
        require ExpiredEntries::Plugin;
        return ExpiredEntries::Plugin::pre_save($cb, $app, $obj);
    }
    return 1;
}

sub entry_postsave {
    my ( $cb, $obj ) = @_;
    my $app = MT::App-&gt;instance;
    return 1 unless ($app-&gt;isa('MT::App::CMS') || 
      $app-&gt;isa('MT::App::Community'));
    if ( $app-&gt;mode eq "post" ) {
        my $q = $app-&gt;{query};
        my $d = $q-&gt;param( FIELD_START_DATE );
        my $t = $q-&gt;param( FIELD_START_TIME );
        # This should never happen                                                                     
        $d = "$3-$1-$2" if ($d =~ m!^(\d{1,2})/(\d{1,2})/(\d{4})$!);
        my $start_hour = $q-&gt;param( FIELD_START_TOD ) eq "PM" ? 
          $q-&gt;param('start_hour') + 12 : $q-&gt;param('start_hour');
        $start_hour = $start_hour &lt; 10 ? 
          '0' . $start_hour : $start_hour;
        my $start_time = $start_hour . ':' . 
          $q-&gt;param('start_minutes') . ":00";
        $obj-&gt;authored_on($d . " " . $start_time);
        $obj-&gt;save();

    }
    return 1;
}
1; # Don't forget this line!
</code></pre>

<p>If all goes well, then you will have successful closed the loop and now possess a theme that will allow community members to submit calendar events to your system. </p>
]]>
    </content>
</entry>

<entry>
    <title>Find and Vote for Us at SXSW 2010</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/09/find-and-vote-for-us-at-sxsw-2.html" />
    <id>tag:endevver.com,2009://1.29</id>

    <published>2009-09-03T16:38:47Z</published>
    <updated>2009-09-03T16:47:50Z</updated>

    <summary>Today and tomorrow are the last two days available for people to vote for the SXSW panels they would like to attend or be given the opportunity to present in 2010. We at Endevver plan on being in Austin for...</summary>
    <author>
        <name>Byrne Reese</name>
        <uri>http://majordojo.com</uri>
    </author>
    
        <category term="News and Events" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="austin" label="austin" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="conferences" label="conferences" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="events" label="events" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opensource" label="open source" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="panels" label="panels" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="southbysouthwest" label="south by southwest" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sxsw" label="sxsw" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://endevver.com/2009/09/03/sxsw2010.gif"><img alt="SXSW 2010 Logo" src="http://endevver.com/assets_c/2009/09/sxsw2010-thumb-140x210-20.gif" width="140" height="210" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></a></span>Today and tomorrow are the last two days available for people to <a href="http://panelpicker.sxsw.com/">vote for the SXSW panels</a> they would like to attend or be given the opportunity to present in 2010. We at Endevver plan on being in Austin for the event, and God-willing, to be presenting as well - sharing our experience with Melody, Open Source, FOSS Business Models, Github and more. If any of the topics we have proposed interest you, then please consider voting for them:</p>

<ul>
<li><a href="http://panelpicker.sxsw.com/ideas/view/4416?return=%2Fideas%2Findex%2Finteractive%2Fq%3Ajay">Building the Foundations for Open Source Success</a></li>
<li><a href="http://panelpicker.sxsw.com/ideas/view/4487?return=%2Fideas%2Findex%2Finteractive%2Fq%3Abyrne">Web Design and Development for Non-Programmers</a></li>
<li><a href="http://panelpicker.sxsw.com/ideas/view/4407?return=%2Fideas%2Findex%2Finteractive%2Fq%3Ajay">FORK YOU! How Git is Changing the Face of Open Source Development</a></li>
</ul>

<p>If you have a panel about open source, blogging, Movable Type or Melody, let us know so that we can vote for it as well!</p>
]]>
        

    </content>
</entry>

<entry>
    <title>A better way to produce images for your web site</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/08/a-better-way-to-produce-images.html" />
    <id>tag:endevver.com,2009://1.28</id>

    <published>2009-08-14T17:05:49Z</published>
    <updated>2009-08-14T17:59:17Z</updated>

    <summary>At Endevver we take great pride in the products we build for our customers because we take great care in not just addressing the needs of our clients, but also the needs of the Movable Type and Melody communities as...</summary>
    <author>
        <name>Byrne Reese</name>
        <uri>http://majordojo.com</uri>
    </author>
    
        <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="announcements" label="announcements" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="customcss" label="custom css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="customheader" label="custom header" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="imagecropper" label="image cropper" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="photoshop" label="photoshop" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plugins" label="plugins" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="products" label="products" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="screencast" label="screencast" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="talkingpointsmemo" label="talking points memo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="video" label="video" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[<p>At Endevver we take great pride in the products we build for our customers because we take great care in not just addressing the needs of our clients, but also the needs of the <a href="http://openmelody.org/">Movable Type and Melody communities</a> as a whole. Nothing illustrates this better than our most recent plugin called <a href="http://endevver.com/plugins/image-cropper/">Image Cropper</a>. </p>

<p>In short Image Cropper addresses the problem web site producers have in creating and crafting the images they use on their web site to promote their content. Image Cropper enables producers to create a set of standard image sizes, crops and filters directly within Movable Type and Melody where they can be automatically applied when authors create their entries.  This completely eliminates nearly all of the post-processing steps normally performed by complex tools like Photoshop.</p>

<p>Not only does this save time and money, but it helps every blogger produce a web site that looks as professional as those who commissioned and sponsored the development of this plugin: <a href="http://endevver.com/">Talking Points Memo</a> (an Endevver client). Check out the demo:</p>

<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5898588&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5898588&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object></p>

<p>But Image Cropper is a tool not just for producers, it is a tool for <strong>designers</strong> as well. Similar to the suite of plugins we maintain and support, like <a href="http://www.majordojo.com/projects/movable-type/config-assistant/">Config Assistant</a>, <a href="http://www.majordojo.com/projects/movable-type/custom-css/">Custom CSS</a>, <a href="http://www.majordojo.com/projects/movable-type/custom-header/">Custom Header</a> and more, Image Cropper exposes a simple config file-driven mechanism for theme designers to create and specify their own custom image sizes that Image Cropper can help users of the theme to produce. </p>

<p>Our ultimate goal here is to make Movable Type and Melody easier and more fun to use, but also to make it a tool that designers <em>like to use</em> because it helps them produce great products faster and cheaper.</p>

<p>To learn more, visit the <a href="http://endevver.com/plugins/image-cropper/">Image Cropper homepage</a>, which contains links to our <a href="http://endevver.com/plugins/image-cropper/documentation/">documentation</a> and our <a href="https://endevver.lighthouseapp.com/projects/34923-image-cropper/overview">bug tracking system</a>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>A New Partner and a New Product</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/06/endevver-byrne-reese-and-melody.html" />
    <id>tag:endevver.com,2009://1.24</id>

    <published>2009-06-24T18:22:05Z</published>
    <updated>2009-06-24T18:35:39Z</updated>

    <summary>I am very excited to announce that Byrne Reese and I are joining forces and that he is now a full partner in Endevver Consulting.  In this article, I talk about what Byrne brings to the table and also introduce our very first collaborative project: Melody.</summary>
    <author>
        <name>Jay Allen</name>
        <uri>http://endevver.com</uri>
    </author>
    
    <category term="byrnereese" label="byrne reese" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="melody" label="melody" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[<p>For over two years, Endevver has been serving the <a href="http://movabletype.com">Movable Type</a> <a href="http://movabletype.org">community</a> as one of the leading independent consultancies for Movable Type and Movable Type Enterprise on the market. Since its founding, Endevver has:</p>

<ul>
<li>Helped to redefine how people communicate both internally and externally in large corporations like <a href="http://boeing.com">Boeing</a>, <a href="http://wellpoint.com">Wellpoint</a> and <a href="http://blogs.intel.com">Intel</a> by deploying some of the largest and most customized blog-based publishing solutions of their kind.</li>
<li>Served as the primary Movable Type development shop for <a href="http://blogs.adobe.com">Adobe Systems</a>, one of the pioneers and roles models for corporate blogging</li>
<li>Made sure its clients remain competitive by helping them take advantage of the latest products and technologies emerging from within the industry, as it did with <a href="http://texturadesign.com">Textura Design</a> to make them the first web site to launch a blog powered by Six Apart's Motion product: <a href="http://bikehugger.com">Bike Hugger</a></li>
</ul>

<p>Through all of this, I have enjoyed an incredible amount of success, built up an excellent client base and have collected a wonderful team of talented partners who make the Endevver engine run. The only real challenge I have had is my ability to meet the great demand that exists for Endevver's services.</p>

<p>Given that I work with many other firms and independent contractors alike to produce our client's cutting edge and beautiful sites, I certainly could just increase capacity by farming work out.  However, I have always felt that it was absolutely critical that I be intimately involved with each project (usually as the primary developer and/or project manager) to ensure that my extremely high quality standards would always be met.</p>

<p>The end result is: There's never enough of me to go around.</p>

<h2>Introducing new Endevver partner, Byrne Reese</h2>

<p>Luckily, I've found another who shares my passion for quality, who matches my level of expertise, with whom I've <em>already</em> worked alongside for years and who brings to the table qualities I do not posses that complement my own.  For all of these reasons, I am happy to announce that <a href="http://majordojo.com">Byrne Reese</a> has joined forces with me as a full partner in Endevver Consulting.</p>

<p>Byrne and I have long been friends, but what brought us together as partners was the realization that we could accomplish and help our clients accomplish so much more by working together, than we ever could working on our own. What makes that possible is simple: <strong>unparalleled expertise</strong>.</p>

<p>Together, we possess over <em>thirteen</em> years of experience using, working with and developing for Movable Type and, in fact, have <strong>defined</strong> its direction and daily progress for much of the past 4+ years. We have contributed numerous features to the core product and together we have released well over forty open source plugins and themes for the platform. Through all of this, we arguably possess, as a team, the greatest and deepest knowledge of Movable Type in the industry, outside of Six Apart.</p>

<p>What this means for our clients is simple:</p>

<ul>
<li><p><strong>More Services</strong> - With an even greater array of experience on board, we can begin delivering a wider variety of services to the Movable Type community.</p></li>
<li><p><strong>Faster Time to Market</strong> - With more people working for you, we will be able to bring your products and web sites to market faster.</p></li>
<li><p><strong>Greater Capacity</strong> - By expanding the Endevver team, we make it possible to service more clients across a greater spectrum of needs.</p></li>
</ul>

<h2>Melody: The First Fruit of Our Labor</h2>

<p>Our work together has already culminated in a project we are immensely proud of: <a href="http://openmelody.com">Melody</a>.  </p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://openmelody.org"><img alt="Melody: Community Powered Publishing" src="http://endevver.com/assets_c/2009/06/melody-logo-on-white-thumb-480x183-7.jpg" width="480" height="183" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span></p>

<p>We conceived of Melody in our initial conversations about working together.  We decided it was something we should do not just because we love Movable Type and want to see it flourish, but because as professionals Melody presents the opportunity to us to provide a better and higher quality product to our customers. It also allows us to more easily deliver solutions more tightly tailored to meet our client's needs.</p>

<p>To make it happen, we quickly pulled together a dream team of many of the very same people that we work with as Endevver partners in our everyday client work as well as a few more who are leaders in the MT community and beyond.  The results, we believe, speak for themselves.</p>

<p>We'll certainly talk more about Melody in the coming days, but I wanted to say now that Byrne and I are excited to make Endevver one of the first companies to <strong>officially offer support and services</strong> for both Melody and Movable Type.  We are also incredibly proud to be a part of Melody community, as co-founders, as board members of the <a href="http://openmelody.org/about/omsg">Open Melody Software Group</a> and, most importantly, as contributors to an effort that we believe strongly will be a success.</p>

<h2>Let Us Help You</h2>

<p>The only thing remaining is this simple question, <em>"what do you want to build today?"</em></p>

<p>Endevver can help.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>The beauty of MT template modularization</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2009/01/movable-type-template-modularization.html" />
    <id>tag:endevver.com,2009://1.18</id>

    <published>2009-01-27T20:33:29Z</published>
    <updated>2009-01-27T22:38:54Z</updated>

    <summary>When the Movable Type team released MT 4.0 it featured major change in the default template set: The templates abstracted out repeated code and put them into modules which could be reused not only for the blog but for all...</summary>
    <author>
        <name>Jay Allen</name>
        <uri>http://endevver.com</uri>
    </author>
    
    <category term="benefits" label="benefits" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="complexity" label="complexity" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="discussion" label="discussion" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="modularization" label="modularization" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="movabletype" label="movable type" 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://endevver.com/">
        <![CDATA[When the Movable Type team released MT 4.0 it featured major change in the default template set: The templates abstracted out repeated code and put them into modules which could be reused not only for the blog but for all blogs in the system.<div><br /></div><div>The main benefit of modularization is clear: When you want to make a change that affects more than one template (e.g. adding a section to the header of every page of your site), you only have to edit <span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-style: italic;"><span class="Apple-style-span" style="font-weight: normal;">a single template</span></span> </span>instead of making <span class="Apple-style-span" style="font-weight: bold;">redundant changes</span> to potentially fifteen or twenty templates.</div><div><br /></div><div>However, there were many detractors who decried the change because of its one main drawback: <span class="Apple-style-span" style="font-weight: bold;">Complexity</span>.  In order to make a single snippet of template code work in all the places it needs to, conditional statements must be added to allow it to publish differentially for those use cases which deviate from the norm.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">How Expert Modularization Neutralizes a Newbie Mistake</span></div><div><br /></div><div>While the concerns and complaints are certainly valid ones -- especially for new users who are intimidated by the extra code -- I have an anecdote that I must share to illustrate yet another way that this change was not only positive, but essential.</div><div><br /></div><div>We are currently working on and nearing the end of a complete redesign for a client whose site is powered by MT 3.x.  At the beginning of the project we decided that we would scrap the 3.x templates and start fresh putting an emphasis -- as we always do -- on both flexibility and maintainability after the project.  Since we've been modularizing the templates for years, using the MT 4 model (if not the actual template code) was a natural decision as the MT team did a number of things right in their design.</div><div><br /></div><div>Late last night, I happened to be editing a particular template but my changes didn't seem to be taking.  It was as if MT simply wasn't rebuilding the template anymore despite me making obvious and drastic changes to the template like, for example, replacing all of the code with "WTF?!?". Like any good developer who never thinks they are at fault, I spent 30 minutes debugging the problem, checking the error logs, disabling plugins, tracing execution of the application.  Eventually, I found the problem: I had inadvertently switched tabs in the browser and copy/pasted my template code (which I was working on in TextMate) into the <span class="Apple-style-span" style="font-style: italic;">wrong template</span><span class="Apple-style-span" style="font-weight: bold;">, the Main Index</span>.</div><div><br /></div><div>So, not only had I wasted nearly forty-five minutes on this problem but I had destroyed the home page entirely.  Normally, we keep template code in Subversion so that we have versioned backups but not so for this project.  So, because of my cursed lack of preparation and my fatigue-induced flub, I was faced with the unhappy task of rebuilding the entire main index from scratch.</div><div><br /></div><div>However, I'm happy to report that the entire process took <span class="Apple-style-span" style="font-weight: bold;">less than fifteen minutes</span> thanks in very large part<span class="Apple-style-span" style="font-style: italic;"> </span>to our dedication to modularized template code!</div><div><br /></div><div>You see, one of the less trumpeted benefits of modularization is a massive <span class="Apple-style-span" style="font-style: italic;">reduction</span> in the complexity of your <span class="Apple-style-span" style="font-style: italic;">main templates</span>, the ones that MT actually builds.  These templates now act as simple, architectural outlines of what should exist on the page instead of complex blueprints detailing each and every line of code.  In fact, the rebuilt main index is only 40 lines long with extra newlines for spacing.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Dr Strangecode or How I Learned to Stop Worrying and Love the Modules</span></div><div><br /></div><div>There is no doubt that the complexity of modularized templates creates a higher barrier to learning Movable Type and its template language.  The abstraction and conditionalization simply takes more brainpower and concentration in order to successfully juggle all the variability.  This makes it harder to truly grasp the final output and how changes to any particular module might affect that.</div><div><br /></div><div>However, I urge all of you Movable Type newbies out there and those of you who long for the "old way of doing it" to <span class="Apple-style-span" style="font-weight: bold;">shed your fears and</span> <span class="Apple-style-span" style="font-weight: bold;">embrace the model</span>.  I promise you that, in a shorter time than you can imagine, modularized templates will not only become completely understandable but you'll be rewarded a thousand times over in future development and site maintenance.</div><div><br /></div><div><span class="Apple-style-span" style="font-style: italic;">Shorter link to this entry: </span><a href="http://icanhaz.com/MTTemplateModularization">http://icanhaz.com/MTTemplateModularization</a></div>]]>
        
    </content>
</entry>

<entry>
    <title>On sabbatical</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2008/11/sabbatical-through-november-20.html" />
    <id>tag:endevver.com,2008://1.17</id>

    <published>2008-11-08T21:10:37Z</published>
    <updated>2008-12-05T09:54:38Z</updated>

    <summary><![CDATA[This is just a note to let you know that the Endevver team will be on vacation&nbsp;and doing their best to avoid talking about, thinking about or working on the Internet&nbsp;through November 20th, 2008. &nbsp;If you're interested in talking with...]]></summary>
    <author>
        <name>Jay Allen</name>
        <uri>http://endevver.com</uri>
    </author>
    
    <category term="clientnotice" label="client notice" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sabbatical" label="sabbatical" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[This is just a note to let you know that the Endevver team will be on vacation&nbsp;and doing their best to avoid talking about, thinking about or working on the Internet&nbsp;through November 20th, 2008. &nbsp;If you're interested in talking with us about your project, feel free to send us mail and we'll get back to you once we return.]]>
        
    </content>
</entry>

<entry>
    <title>Welcome to Endevver</title>
    <link rel="alternate" type="text/html" href="http://endevver.com/2008/05/welcome-to-endevver.html" />
    <id>tag:endevver.com,2008:/new//1.15</id>

    <published>2008-05-09T04:22:31Z</published>
    <updated>2008-05-09T06:47:50Z</updated>

    <summary>There are at least a few moments in every endeavor which seem to mark themselves in your mind as significant even as they are happening.  Although I've been making websites in one form or another for 14 years (hard to even fathom), the launch of this site is one of those.</summary>
    <author>
        <name>Jay Allen</name>
        <uri>http://endevver.com</uri>
    </author>
    
    <category term="mission" label="mission" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sitenews" label="site news" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://endevver.com/">
        <![CDATA[There are at least a few moments in every endeavor which seem to mark themselves in your mind as <i>significant</i> even as they are happening.&nbsp;  Although I've been making websites in one form or another for 14 years (hard to even fathom), the launch of this site is one of those.<br /><br />It's not because I expect to garner a massive waves of traffic to the site.&nbsp; I'm not a pundit and my contributions to the web are spread far and wide across dozens of different sites.&nbsp; This site exists solely as a way for people to engage with Endevver for projects and for us to help tell the world about them.<br /><br />It's not because this marks the beginning of my career or even a new part of it.&nbsp; Endevver has been in operation now for nearly four months and already has several excellent clients.&nbsp; Furthermore, I personally have been working with Movable Type in one form or another for years, as a freelance consultant, a <a href="http://members.movabletype.org/jallen/">developer</a>, a <a href="http://www.amazon.com/Hacking-Movable-Type-ExtremeTech-Allen/dp/076457499X">writer</a>, its <a href="http://www.jayallen.org/journey/2004/10/powered_by_movable_type">Product Manager</a> and Application Architect for <a href="http://texturadesign.com/">Textura Design</a>.<br /><br />No, I think that what makes this launch so significant is that it is the first tangible evidence of the Endevver's core mission: To bring together a coalition of fantastically talented and passionate people who are dedicated to making beautiful, functional and successful sites using Movable Type.<br /><br />I'm proud of the people I work with on a daily basis and happy to bring the force of their expertise to bear for every Endevver client.<br />]]>
        
    </content>
</entry>

</feed>
