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.
MT-Upcoming is supported on Movable Type 3.2, 3.1/3.0 and 2.661.
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.
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.
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:
Digest::MD5
Perl module
installed on your system. If Digest::MD5
is available,
MT-Upcoming will cache responses from the Upcoming API and re-use them,
allowing often-repeated templates like the Individual Entry Archive to
only request information from Upcoming once. (A version of
Digest::MD5
that does not require a compiler to install
can be downloaded
here.
After unpacking, simply upload the Digest directory into
Movable Type’s extlib/
directory and MT-Upcoming will
begin caching.
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.
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.
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>
<MTUpcomingEvent*>
and
<MTUpcomingVenue*>
tags may be used inside it, as well
as the <MTUpcomingWatchlist*>
tags. To alter the
default behavior of <MTUpcomingWatchlist>
, you may use
the following attributes:
No upcoming events.
0
.
<MTUpcomingWatchlist>
-iterated event: “attend” or
“watch”.
<MTUpcomingWatchlist>
-iterated event has a status of
“watch.”
<MTUpcomingWatchlist>
-iterated event has a status of
“attend.”
<MTUpcomingEvent*>
and <MTUpcomingVenue*>
tags may be used inside it.
The search is defined by the attributes below — each attribute acting as
a filter. Exclude them all to return every event, include multiple to
narrow a search.
No upcoming events.
0
.
username=""
if you do not
want to return private events even if this value is defined via the
MT-Upcoming interface.
password=""
if you do not want to return private events even if this value is
defined via the MT-Upcoming interface.
100
.
1
.
1
if an event is private, 0
otherwise.
1
if an event is public, 0
otherwise.
1
if an event is marked as self-promotional,
0
otherwise.
<MTUpcomingEventIf*>
. If a textual or non-zero value
is present for the tag, then the If
version will include
its contents. For example:
Event Date: <MTUpcomingStartDate /> <MTUpcomingEventIfEndDate> through <MTUpcomingEventEndDate /> </MTUpcomingEventIfEndDate>
1
if a venue is private, 0
otherwise.
1
if a venue is public, 0
otherwise.
<MTUpcomingVenueIf*>
. If a textual or non-zero value
is present for the tag, then the If
version will include
its contents. For example:
<!-- Only show public venues --> Location: <MTUpcomingVenueIfPublic> <MTUpcomingVenueName /> </MTUpcomingVenueIfPublic> <MTUpcomingVenueIfPrivate> [It's a secret!] </MTUpcomingVenueIfPrivate>
Copyright © 2005 Greg Knauss. All Rights Reserved.