MTSmugMug

This container tag must is used to create a block which will encompass all of the other content that you wish to display. You will use it similar to an MTEntries block, and make use of other tags inside to display other content.

If you don't include any attributes on this container, you will retrieve the most popular photos from today. However, there are a number of possible options that you might want to consider using when you use this container in your templates.

<MTSmugMug type="keyword" data="computers" nickname="username">

When you specify the type attribute as keyword, you also must include the data attribute (computers in this case), which determines which keyword to retrieve. The SmugMug API also supports the user of the nickname attribute, and if included, it will be sent, but at this time, it doesn't seem to work with the keyword feed.

<MTSmugMug type="popular" data="all|today">

If you use a type of popular, the data attribute must be either all, for popular photos from all time, or today, for popular photos from today (the last 24 hours). Using an attribute of today is the same as leaving the attributes off, but there is no harm in specifying this value.

<MTSmugMug type="popularCategory" data="category">

Using a type of popularCategory, requires a data attribute of the category name

<MTSmugMug type="geoAll">

The type of geoAll does not require a data attribute - it is the only attribute that does not require any additional information. However this option doesn't seem to return anything.

<MTSmugMug type="geoSearch" data="term">

A type of geoSearch runs a search for the term specified in the data attribute, but like the geoAll attribute above, this option doesn't seem to work.

<MTSmugMug type="geoCommunity" data="community">

To search for a community, entery the type geoCommunity with a data attribute of the community name, but like the other geo options, this one doesn't seem to return data correctly.

<MTSmugMug type="gallery" data="id">

In order to return content from a particular gallery, entery gallery as the type attribute, and include the id for the data attribute. I have found this to be one of the more useful sets of attributes.

<MTSmugMug type="nickname" data="nickname">

If all you want to see are the recent galleries from a user, enter nickname for the type attribute and the user's nickname for the data attribute.

<MTSmugMug type="nicknameRecent" data="nickname">

To see the recent photos from a user, enter nicknameRecent for the type attribute and the user's nickname for the data attribute.

<MTSmugMug type="nicknamePopular" data="nickname">

Since photos can be voted as popular, if you want to see a list of photos that have been returned as popular, enter nicknamePopular as the type attribute and the user's nickname as the data attribute. If no photos are popular, nothing will be returned.

<MTSmugMug type="usercomments" data="nickname">

When you would like to see comments on photos, enter usercomments as the type attribute and the user's nickname as the data attribute. Comments must exist or nothing will be returned.

<MTSmugMug type="geoUser" data="nickname">

To return a list of geotagged photos by user, enter geoUser as the type attribute and the user's nickname as the data attribute. Note that this option appears to work, but it seems to return photos system-wide, not by user.

<MTSmugMug type="geoAlbum" data="id">

In order to see geotagged photos by album, enter geoAlbum as the type attribute and the album id as the data attribute. Note that this option appears to work, but it seems to return photos system-wide, not by user.

<MTSmugMug lastn="9">

All options have the ability to restrict the number of items returned by specifying the lastn attribute. This is also available in the plugin settings screen, and if it is included in the template, this value overrides that setting.

This container is required. Without it, the plugin will not function.

MTSmugMugCopyright
MTSmugMugCreatedDate
MTSmugMugDatasource
MTSmugMugFeedimage
MTSmugMugGenerator
MTSmugMugLink
MTSmugMugModifiedDate
MTSmugMugPhotoCount
MTSmugMugRSSVersion
MTSmugMugTitle
MTSmugMugXMLVersion

Inside of the MTSmugMug container you may use a number of tags to return values containing information about the content itself (not about photos within - that comes next). The "date" fields are able to be formatted according to standard Movable Type formatting rules.

MTSmugMugPhotos

The real meat of the plugin comes from another container - MTSmugMugPhotos. This creates a block that allows you to loop over the photos returned from the MTSmugMug container. This container has no attributes, and serves only to hold the structure for your photos that will be found inside.

MTSmugMugPhotoCategory
MTSmugMugPhotoDescription
MTSmugMugPhotoID
MTSmugMugPhotoLatitude
MTSmugMugPhotoLink
MTSmugMugPhotoLongitude
MTSmugMugPhotoOriginalDate
MTSmugMugPhotoPage
MTSmugMugPublishedDate
MTSmugMugPhotoTitle

Inside of the MTSmugMugPhotos container, there is another set of tags to return data about your photos. These are provided to give you the details that you might want to share with your visitors, and should be used to give you all the information you may need. The MTSmugMugPhotoLink is the GUID of the photo, while the MTSmugMugPhotoPage is the actual URL to the photo. One other word of warning: If you use the MTSmugMugPhotoDescription tag, use the decode_html attribute - because these may have HTML in them, you may end up with strange results otherwise!

Putting it all Together

Your template might look something like:

<div class="module">
<h2 class="module-header">Photos</h2>
<div class="module-content">
<MTSmugMug lastn="3">
<MTSmugMugPhotos>
<img src="http://www.smugmug.com/photos/<$MTSmugMugPhotoID$>-Ti.jpg" /><br />
</MTSmugMugPhotos>
</MTSmugMug>
</div>
</div>

This code grabs the last three items from today's most popular list (in "tiny" size), like so:

I made it so that they link to the photo pages, but you get the idea. Enjoy!