MT-Upcoming Documentation


ABOUT MT-UPCOMING

MT-Upcoming is a Movable Type plug-in that interfaces with Upcoming, the social events calendar. To use MT-Upcoming most effectively, you should have an Upcoming account and use the site to track which events you are interested in or plan to attend. MT-Upcoming will then be able to show that information on your Movable Type weblog. The plug-in can also be used to show scheduled events for a particular city or venue.


REQUIREMENTS

MT-Upcoming is supported on Movable Type 3.2, 3.1/3.0 and 2.661.


INSTALLATION

To install MT-Upcoming, download the plug-in and uncompress it. The following files are included:

mt-upcoming.pl
mt-upcoming/mt-upcoming.cgi
mt-upcoming/tmpl/mt-upcoming.tmpl
mt-upcoming/LICENSE
mt-upcoming/CHANGELIST
mt-upcoming/WebService/...

Upload or copy these files into the plugins/ directory and (for MT 3.0 or MT 3.1) set the permissions on mt-upcoming.cgi to 755. If you want to remove MT-Upcoming, delete mt-upcoming.pl and the mt-upcoming/ directory from plugins/, remove the MT-Upcoming tags from your templates and re-build your site.


LICENSE

MT-Upcoming is released under the Artistic License. The text of this license can be found in LICENSE in the release, and is available at http://www.opensource.org/licenses/artistic-license.php. MT-Upcoming is copyright © 2005 Greg Knauss.


CAVEATS

Where to Use MT-Upcoming: MT-Upcoming has the potential to make several calls to the Upcoming API each time <MTUpcomingSearch> or <MTUpcomingWatchlist> is used. In order not to flood Upcoming with requests, you can do one of two things:

Updating MT-Upcoming’s Listings: MT-Upcoming will only re-generate its listings when the template that contains its tags are used in a re-build, not when changes are made on Upcoming. This is important to keep in mind, and another reason to only use MT-Upcoming in often-rebuilt templates like Main Index.

Alternately, you can use the MT-Rebuild plug-in to automatically re-build your site on a regular basis. This will cause any changes made at Upcoming to be reflected on your site with the next automatic re-build.

Where to Find *_ids: A handful of the attributes to, and responses from, <MTUpcomingSearch> are numeric identifiers instead of textual names. These identifiers can be discovered by using the Upcoming API’s metro.getCountryList, metro.getStateList, metro.getList, venue.getList and user.getList calls.


INTERFACE

For Movable Type 3.2, MT-Upcoming uses the integrated plug-in settings editor accessable from the Main Menu by clicking “Plugins,” then the “Show Settings” link in the “MT-Upcoming” section.

For Movable Type 3.0 or 3.1, MT-Upcoming offers a plug-in settings editor, accessable from the “Configure Active Plugins” section of the Main Menu. You must have Blog Create permission in Movable Type to access it.

For Movable Type 2.661, users do not have access to a plug-in settings interface and must specify their settings on the tags, defined below.

With either the MT 3.0/3.1 or 3.2 interface, you can define a default Upcoming username, password and API key to use for all the MT-Upcoming tags. If you use the interface to define any or all of these values, you do not need to specify them on the tags themselves, even if they are required. If you do specify the values on the tags, they over-ride the values define by this interface.

The intention of allowing secure Upcoming information to be set via an interface is to add some small measure of security. If the Upcoming password is set on a tag, then anybody with Template Edit access will be able to see it. By using the interface, it can be limited to Movable Type users with Blog Create permission.


EXAMPLES

The following code will display an Upcoming user’s watchlist, indicating which events he’s interested in, where they are occuring and if the user is attending or not:

<h2>My Upcoming Events</h2>
<ul>
 <MTUpcomingWatchlist>
  <li>
   <a href="http://upcoming.org/event/<MTUpcomingEventId />"><b><MTUpcomingEventName /></b></a>
   @
   <a href="http://upcoming.org/venue/<MTUpcomingVenueId />"><MTUpcomingVenueName /></a>
   on
   <MTUpcomingEventStartDate format="%m/%d/%Y" />
    <MTUpcomingEventIfEndDate> -
     <MTUpcomingEventEndDate format="%m/%d" />
    </MTUpcomingEventIfEndDate>
    <MTUpcomingWatchlistIfStatusAttend>
     (I'll see you there!)
    </MTUpcomingWatchlistIfStatusAttend>
  </li>
 </MTUpcomingWatchlist>
</ul>

The following code will display the next twenty events occuring in Los Angeles tagged with “music”:

<h2>L.A. Music Events</h2>
<ul>
 <MTUpcomingSearch metro_id="1" tags="music" per_page="20">
  <li>
   <a href="http://upcoming.org/event/<MTUpcomingEventId />"><<b>MTUpcomingEventName /></b></a>
   @
   <a href="http://upcoming.org/venue/<MTUpcomingVenueId />"><MTUpcomingVenueName /></a>
   on
   <MTUpcomingEventStartDate format="%m/%d/%Y" />
  </li>
 </MTUpcomingSearch>
</ul>


TAGS