Twitter Commenters is a plugin for Movable Type that enables commenters to sign-in and comment on your blog using their Twitter account. Versions 2+ includes support for Twitter's OAuth authorization system and enables commenters to automatically share their comments to their Twitter stream.

Note: Version 2.1 fixes a serious bug when using OAuth, users would get a Comment Submission Error, saying that Name and Email are required. All sites running v2.0 should upgrade to v2.1 using the download link below. Simply upload the new files, no need to adjust settings or templates

Basic Auth (default):

OAuth:

Twitter comment authentication works like other auth methods in MT -- once you have installed the plugin you can enable Twitter as one of the auth options, as shown in the image above.

How It Works - Basic Auth

When the user enters their Twitter username and password in the form (shown above), the plugin submits those to the Twitter API to verfiy the credentials. If verified, the user can then post comments using their Twitter account. Their Twitter 'display name' will be shown beside their comments, and their Twitter avatar (profile photo) will be imported and shown beside their comments (if userpics are enabled in your templates).

Note that users' Twitter passwords are not stored in the MT database. An upcoming version of this plugin will enable Twitter's new OAuth support, in which case passwords would never be sent to MT at all. That version will like have an option for commenters to cc. their comments to their Twitter account. Stay tuned.

How It Works - OAuth

New in Version 2.0, you can optionally enable Twitter's new OAuth authorization system. With OAuth, user never have to submit their password info to your server. Instead, they click a "sign in with Twitter" button and they are taken to a page on Twitter.com asking them to authorize the application (see image above). One they click "Allow" they are returned to your site and they then post comments using their Twitter account. As with basic auth, their Twitter 'display name ' will be used as well as their Twitter avatar (profile photo).

Share Comments on Twitter

A new feature in version 2.0, only supported via OAuth, enables commenters to optionally share their comment to their Twitter stream. All they have to do is click a checkbox, no need to re-authorize or enter Twitter account info.

Try it Now

MT Hacks has the new OAuth method enabled. Try it now:

Click here to login with your Twitter account. After logging in, you will be returned to this entry, and you can leave a comment below.

Requirements

  • Net::Twitter 2.07 perl module (included with plugin) (note: do not upgrade to version 2.9+ of this module)
  • Net::Twitter::OAuth perl module (included with plugin)
  • Net::OAuth perl module (included with plugin)
  • Net::OAuth::Simple perl module (included with plugin)
  • JSON::Any perl (included with plugin)

Note: Net::Twitter requires newer versions of the libwww-perl collection of Perl modules. I am not sure what the minimum version required is, but on my server, I had to upgrade in order to get Net::Twitter to work. So if you get strange errors, try installing the latest version in your 'extlib' directory of your MT. Update: A common error message is: "Can't locate object method "default_header" via package "LWP::UserAgent" -- if you see this error, this the problem.

Download Twitter Commenters

Download Now
Downloads: 573

Installation

  1. Upload the contents of the 'plugins' folder to the 'plugins' directory for your MT install.
  2. Upload the contents of the 'mt-static' folder to your 'mt-static' directory.
  3. For each blog you want to enable, go to Preferences > Registration and check the box for 'Twitter'.

Enabling Twitter OAuth

Unfortunately, this is not as easy as it could be, maybe Twitter will make it easier in future. To set this up you need to create an Application on Twitter:

  1. While logged in to your Twitter account, go to http://twitter.com/oauth_clients/new.
  2. Fill out the form on that page:
    • Give it a unique name and description.
    • For 'Application Website', enter http://mt-hacks.com/twittercommenters.html. For 'Organization', enter MT Hacks.
    • For 'Website' enter http://mt-hacks.com.
    • For 'Application Type' choose 'Browser'.
    • For 'Callback URL' enter the full URL to your comments script followed by '?__mode=login_external&key=Twitter'. Example: http://www.domain.com/cgi-bin/mt/mt-comments.cgi?__mode=login_external&key=Twitter
    • For 'Default Access type' choose 'Read & Write'.
    • Check the box for 'Yes, use Twitter for login'
    • Hit the 'Save' button.
  3. After saving the application, you should now see a screen with a 'Consumer key' and 'Consumer secret'. Copy those to the system plugin Settings (System Overview > Plugins > Twitter Commenters > Settings). and save the plugin settings.
  4. To enable the share comment on Twitter option, add the <mt:TwitterShareCommentOption> tag below the comment text part of your comment form. This will display a checkbox option to people logged in via Twitter OAuth.
  5. Rebuild your entry pages and test it out

As always, feedback is appreciated.

Follow @mthacks on Twitter for updates and other MT and Twitter hacks.

Flickr photos is a plugin that enables you to display thumbnail links of Flickr photos in your Movable Type blog. Flickr Photos focuses on displaying lists of photos, in many possible ways.

The new version, 0.80, has a few bug fixes and a few new features. The majority of these improvements were contributed by Annoying Old Guy, of Solid Wall of Code. Thanks, AOG!

New Features and Bug Fixes

Bug Fixes and Tuning:

-bug fix for MTFlickrPhotoTagURL, should now create correct links
-adjusted HTML in MTFlickrPhotoLink to be xhtml valid
-added a fix to an upgrade problem from v0.5 - if you receive errors after upgrading from v0.5, loading the plugin settings page should now fix it
-code optimizations to improve perfomance
-fixed a bug that was clearing configuration settings
-moved Expressions.pm to correct location to avoid conflicts

Features (details below):

-new tags for photo height and width
-added class elements to the FlickrPhotoLink tag for customization via CSS
-support for setting size and link arguments in MTFlickrPhotos container tag
-support for Plugin Manager (untested, as I was unsuccessful in installing Plugin Manager on my server, use with caution, feedback appreciated)

Basic Usage

You can easily list thumbnails by Filckr user and/or by Flickr tags. You can also control the number of thumbnails displayed and the size of the thumbnails. Each thumbnail can link to a larger version of the image, or to the Flickr page for that photo.

Here is an example of the easiest way to use FlickrPhotos in your templates:

<MTFlickrPhotos username="John Smith">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

The above template code will display thumbnail links for the 10 most recent photos for Flickr user "John Smith". (Tip: when entering the value for your 'username', you should use the name that appears after "Logged in as" on the top of each Flickr page when you are logged in. Your user name may contain spaces - if so, be sure to include those space as I have done with "John Smith" above).

Here another example that displays thumbnail links from any user tagged with "movabletype":

<MTFlickrPhotos tags="movabletype">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

Advanced Usage and FlickrPhotos Template Tags

FlickrPhotos includes the following template tags:

  • MTFlickrPhotos is container tag for displaying photos. arguments include:
    • username - restricts photos to a specific Flickr user.
    • tags - retricts photos to those with the specified tags. Multiple tags can be specified, separated by comma.
    • tag_mode - specifies the method for displaying photos by the tags argument. If tag_mode is set to 'any', it will display photos with at least one on the tags specified in tags. If tag_mode is set to 'all', it will only display photos tagged with each and every one of the tags specified by tags. Optional (the default value is 'any').
    • search - retricts photos to those with the specified search text
    • lastn - determines the number of photos to display. Optional (default is 10 photos).
    • sort - method to sort the photos. This must be one of date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, or relevance (with 'asc' meaning ascending and 'desc' meaning descending). The default sort method is 'date-posted-desc', which displays the mosting recently uploaded photo first.
    • size - specified the size of the thumbnail images. For size, you can specify "s" (small square), "t" (thubmnail), "m" (small), "med" (medium), "o" (original size).
    • min_upload_date - restricts photos to those with a minimum upload date. Date should be specified as YYYY-MM-DD.
    • max_upload_date - restricts photos to those with a maximum upload date. Date should be specified as YYYY-MM-DD.
    • min_taken_date - restricts photos to those with a minimum taken date. Date should be specified as YYYY-MM-DD.
    • max_taken_date - restricts photos to those with a maximum taken date. Date should be specified as YYYY-MM-DD.
    • Note that each of the above arguments can be used together, including at least 'username' and/or 'tags'. Arguments listed below are 'special' and cannot be used with many of the arguments above:

    • group - restricts the photos to those of a specific group pool. The group argument requires the complete URL of the group page or group pool page. For example <MTFlickrPhotos group="http://www.flickr.com/groups/catchy/">. When using the special group argument, you can further filter the photos by user the lastn, tags, and username arguments - but not the others described above.

    • set - restricts the photos to those of a specific photoset. The set argument requires the complete URL of the photoset page. For example <MTFlickrPhotos set="http://www.flickr.com/photos/markcarey/sets/55064/">. When using the special set argument, you cannot use the other arguments described above.

    • contacts - restricts the photos to those of the contacts of a specific user. The contacts argument requires that you also specify a username. When using the special group argument, you can further filter the photos by user the lastn argument and with the following: just_friends shows only photos from those contacts marked as friends, single_photo displays one photo from each contact, and include_user will display photos include photos from the user specified. For example <MTFlickrPhotos contacts="1" username="John Smith" single_photo="1" include_user="1">

    • favorites - restricts the photos to those of the favorite photos of a specific user. The favorites argument requires that you also specify a username. When using the special favorites argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos favorites="1" username="John Smith">

    • everyone - display recent photos from all Flickr users. When using the special everyone argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos everyone="1" lastn="10">

    • interestingness - display recent interesting photos from all Flickr users. When using the special interestingness argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos interestingness="1" lastn="15">

  • MTFlickrPhotoThumb outputs the URL to the thumbnail image. The size of thumbnail is determined by the FlickrPhotos plugin settings (see below), which can be overidden by an optional size argument. For size, you can specify "s" (small square), "t" (thubmnail), "m" (small), "med" (medium), "o" (original size) Example usage: <img src="<MTFlickrPhotoThumb size="t">">
  • MTFlickrPhotoWidth outputs the width of the photo thumbnail in pixels.
  • MTFlickrPhotoHeight outputs the height of the photo thumbnail in pixels.
  • MTFlickrPhotoURL outputs the destination URL that can be used to link each thumbnail. This URL will be to either to the Flickr photo page or directly to a different size of the photo, as determined by the plugin settings. These settings can be overidden by an optional target argument specifying the size of the photo to link to (see choices above) or "page" to link to the Flickr photo page. Example usage: <a href="<MTFlickrPhotoURL target="page">">
  • MTFlickrPhotoTitle outputs the Flickr title for the photo. This can be used as "alt" text for the thumbnails, and/or used a caption for each photo.
  • MTFlickrPhotoLInk combined each of the above tags - it outputs a linked thumbnail, using the title as the 'alt' and 'title' for the link. The link will open in a new window. This tag is the easiest way to use FlickrPhotos, becuase you don't have to write any HTML for creating the link or displaying the image. This tags supports both of th optional arguments described above, size and target.
  • MTFlickrPhotoDateUploaded outputs the date that the photo was uploaded.
  • MTFlickrPhotoDateTaken outputs the date that the photo was taken.
  • MTFlickrPhotoDescription outputs the description of the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoOwnerName outputs the username or real name of the owner of the photo. In order to display the real name, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoCommentsCount outputs the number of comments that have beeb made on the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoCommentsCount outputs the number of comments that have beeb made on the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTags is a container tag that displays each of the tags assigned to the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTagName displays the name of the tag. Must be used between <MTFlickrPhotoTags> and </MTFlickrPhotoTags> tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTagURL displays the URL to the Flickr page for the tag for the photo's owner. Must be used between <MTFlickrPhotoTags> and </MTFlickrPhotoTags> tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTIfFlickrPhotoTags is a conditional tag - anything between the <MTIfFlickrPhotoTags>. and </MTIfFlickrPhotoTags> tags will only be displayed if the photo has one or more tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below). Here is an example of how these tags can be used to display the tags of a photo:

    <MTIfFlickrPhotoTags>
    Tags for this photo: <br /> <ul>
    <MTFlickrPhotoTags>
    <li><a href="<MTFlickrPhotoTagURL>"><MTFlickrPhotoTagName></a> </li>
    </MTFlickrPhotoTags>
    </ul>
    </MTIfFlickrPhotoTags>

FlickrPhotos Plugin Settings

The following settings can bet set on a per-blog basis. To access these settings, select the blog you want and then choose "Settings" from the menu. Then choose the "Plugins" tab. You should then see FlickrPhotos in the list of plugins - hit the settings link to display the settings. The settings are:

  • Thumbnail Size: This setting determines the size of the thumbnail images. Choice are Square, Thumbnail, Small, Medium, and Orginal. These sizes correspond to the sizes used by Flickr. The default is Thumbnail. This setting can be overidden by using the size argument as described above.
  • Link to: This setting determines where each thumbnail will link to. You can link directly to a different size of the photo (you can choose from the same sizes as above) OR you can link each photo to the Flickr page for that photo. The default is Flickr Page This setting can be overidden by using the target argument as described above..
  • Number of Photos: The default numbers of photos to display. The default is 10. You can override this by using the 'lastn' argument (for example, <MTFlickrPhotos username="John Smith" lastn="15"> )
  • Photo List Cache: The length of time to cache the list of photos. After the above time frame has passed, FlickPhotos will check with Flickr to see if there are any new photos. It is highly recommended that this setting be set to 1 hour or longer. Choosing 'none' may slow down your rebuilds considerably. You can override this setting on a case by case basis by specifying the number of seconds in the refresh argument (for example, to set the Photo List Cache to 1 hour you could use <MTFlickrPhotos username="John Smith" refresh="3600"> )
  • Photo Info Cache: The length of time to cache the detailed information for each photo (title, tags, description, number of comments, etc.). After the above time frame has passed, FlickPhotos will check with Flickr to see if there have been any changes to the photo information. It is highly recommended that this
    setting be set to 1 week or longer. Choosing 'none' may slow down your rebuilds considerably. You can override this setting on a case by case basis by specifying the number of seconds in the refresh_details argument (for example, to set the Photo Info Cache to 2 weeks you could use <MTFlickrPhotos username="John Smith" refresh_details="1209600"> )
  • Clear Cache Older Than: This setting will delete cache information about photo lists and photo details that are older than the time frame selected above. This is useful to remove data for older photos that you are no longer displaying, thus preventing your database from growing too large. It is recommended that this setting be set to 1 month or longer. Choosing 'Never' may cause your database to grow sigificantly larger, depending on how you use the plugin. IMPORTANT: With this setting, the cache will not be cleared automatically. To clear the cache you MUST return to this Plugin settings page. To prevent slow rebuilds, the cache-clearing function only runs when you access the Plugin settings page. Also note that this setting is global, meaning that it applies to photo cache data for all of your blogs.
  • Get Photo Details: If set to "On", FlickrPhotos will ask Flickr for some details about each photo. Photo details includes the following: description (<MTFlickrPhotoDescription> ), number of comments
    (<MTFlickrPhotoCommentsCount> ), owner location (<MTFlickrPhotoOwnerLocation> ), and tags (<MTFlickrPhotoTags> ). If you are not displaying these tags on your pages, you can change this setting to "Off" to improve perfomance and speed rebuild times. You can override this setting on a case by case basis by using the "fetchdetails" argument (for example, <MTFlickrPhotos username="John Smith" fetchdetails="1"> )
  • Install Sidebar Widget: Checking the box for this setting and entering a Flickr username will automatically install a Sidebar widget that displays 5 recent photos. You can then customize this by editing the "Sidebar: FlickrPhotos" template module, which will be created after checking this option. This setting works with the Sidebar Manager plugin: Learn more about Sidebar Manager.

Requirements:

  • MT 3.2
  • Flickr::API Perl Module (included in download for convenience)
  • XML:: Parser::Lite (included for convenience)
  • XML:: Parser::Lite::Tree (included for convenience)
  • XML:: Parser::Lite::Tree::XPath (included for convenience)

Download Now

FlickrPhotos.zip

Membership required, please sign-in or register:

Installation

  1. Expand the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation and the contents of the 'extlib' folder to the 'extlib' folder of your MT installation.
  2. Adjust the plugin settings if desired (see above)
  3. Start using the above template tags in your templates.

If you like this plugin, please consider making a donation:

This plugun is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5. In other words, if you use this plugin, please display a "powered by Flickr Photos" link, such as the one below:

<a href="http://mt-hacks.com/flickrphotos.html" target="_blank">Powered by Flickr Photos</a>

Update: Included with this plugin is the MT Plugin Network plugin. MT Plugin Network helps keep you up to date about new and updated plugins from MT Hacks and other plugin providers, by displaying a list of recent plugin announcements with the MT admin area. Click here to learn more.

As always, please let me know if you find any bugs, or if you have any suggestions or comments.

Flickr photos is a plugin that enables you to display thumbnail links of Flickr photos in your Movable Type blog. The new version, 0.75, has many more features than the previous version. Flickr Photos focuses on displaying lists of photos, in many possible ways.

New Features

This version has many new features, including:

  • display photos from a specific photo set
  • display photos from a specific group pool
  • display photos of the contacts of a specific user
  • display the favorite photos of a specific user
  • display recent photos from all Flickr users
  • display photos based on search text
  • display recent interestingness photos
  • display detailed information about each photo (description, date taken, date uploaded, owner name, owner location, number of comments, and tags)
  • display photos within a specified date range
  • sort photo displays in various ways
  • caching features for photo list and photo details to speed rebuilds
  • install Sidebar Manager widget setting, displays recent photos in your sidebar

Here are few examples:

Basic Usage

You can easily list thumbnails by Filckr user and/or by Flickr tags. You can also control the number of thumbnails displayed and the size of the thumbnails. Each thumbnail can link to a larger version of the image, or to the Flickr page for that photo.

Here is an example of the easiest way to use FlickrPhotos in your templates:

<MTFlickrPhotos username="John Smith">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

The above template code will display thumbnail links for the 10 most recent photos for Flickr user "John Smith". (Tip: when entering the value for your 'username', you should use the name that appears after "Logged in as" on the top of each Flick page when you are logged in. Your user name may contain spaces - if so, be sure to include those space as I have done with "John Smith" above).

Here another example that displays thumbnail links from any user tagged with "movabletype":

<MTFlickrPhotos tags="movabletype">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

Advanced Usage and FlickrPhotos Template Tags

FlickrPhotos includes the following template tags:

  • MTFlickrPhotos is container tag for displaying photos. arguments include:
    • username - restricts photos to a specific Flickr user.
    • tags - retricts photos to those with the specified tags. Multiple tags can be specified, separated by comma.
    • tag_mode - specifies the method for displaying photos by the tags argument. If tag_mode is set to 'any', it will display photos with at least one on the tags specified in tags. If tag_mode is set to 'all', it will only display photos tagged with each and every one of the tags specified by tags. Optional (the default value is 'any').
    • search - retricts photos to those with the specified search text
    • lastn - determines the number of photos to display. Optional (default is 10 photos).
    • sort - method to sort the photos. This must be one of date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, or relevance (with 'asc' meaning ascending and 'desc' meaning descending). The default sort method is 'date-posted-desc', which displays the mosting recently uploaded photo first.
    • min_upload_date - restricts photos to those with a minimum upload date. Date should be specified as YYYY-MM-DD.
    • max_upload_date - restricts photos to those with a maximum upload date. Date should be specified as YYYY-MM-DD.
    • min_taken_date - restricts photos to those with a minimum taken date. Date should be specified as YYYY-MM-DD.
    • max_taken_date - restricts photos to those with a maximum taken date. Date should be specified as YYYY-MM-DD.
    • Note that each of the above arguments can be used together, including at least 'username' and/or 'tags'. Arguments listed below are 'special' and cannot be used with many of the arguments above:

    • group - restricts the photos to those of a specific group pool. The group argument requires the complete URL of the group page or group pool page. For example <MTFlickrPhotos group="http://www.flickr.com/groups/catchy/">. When using the special group argument, you can further filter the photos by user the lastn, tags, and username arguments - but not the others described above.

    • set - restricts the photos to those of a specific photoset. The set argument requires the complete URL of the photoset page. For example <MTFlickrPhotos set="http://www.flickr.com/photos/markcarey/sets/55064/">. When using the special set argument, you cannot use the other arguments described above.

    • contacts - restricts the photos to those of the contacts of a specific user. The contacts argument requires that you also specify a username. When using the special group argument, you can further filter the photos by user the lastn argument and with the following: just_friends shows only photos from those contacts marked as friends, single_photo displays one photo from each contact, and include_user will display photos include photos from the user specified. For example <MTFlickrPhotos contacts="1" username="John Smith" single_photo="1" include_user="1">

    • favorites - restricts the photos to those of the favorite photos of a specific user. The favorites argument requires that you also specify a username. When using the special favorites argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos favorites="1" username="John Smith">

    • everyone - display recent photos from all Flickr users. When using the special everyone argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos everyone="1" lastn="10">

    • interestingness - display recent interesting photos from all Flickr users. When using the special interestingness argument, you can further filter the photos by user the lastn argument. For example <MTFlickrPhotos interestingness="1" lastn="15">

  • MTFlickrPhotoThumb outputs the URL to the thumbnail image. The size of thumbnail is determined by the FlickrPhotos plugin settings (see below), which can be overidden by an optional size argument. For size, you can specify "s" (small square), "t" (thubmnail), "m" (small), "med" (medium), "o" (original size) Example usage: <img src="<MTFlickrPhotoThumb size="t">">
  • MTFlickrPhotoURL outputs the destination URL that can be used to link each thumbnail. This URL will be to either to the Flickr photo page or directly to a different size of the photo, as determined by the plugin settings. These settings can be overidden by an optional target argument specifying the size of the photo to link to (see choices above) or "page" to link to the Flickr photo page. Example usage: <a href="<MTFlickrPhotoURL target="page">">
  • MTFlickrPhotoTitle outputs the Flickr title for the photo. This can be used as "alt" text for the thumbnails, and/or used a caption for each photo.
  • MTFlickrPhotoLInk combined each of the above tags - it outputs a linked thumbnail, using the title as the 'alt' and 'title' for the link. The link will open in a new window. This tag is the easiest way to use FlickrPhotos, becuase you don't have to write any HTML for creating the link or displaying the image. This tags supports both of th optional arguments described above, size and target.
  • MTFlickrPhotoDateUploaded outputs the date that the photo was uploaded.
  • MTFlickrPhotoDateTaken outputs the date that the photo was taken.
  • MTFlickrPhotoDescription outputs the description of the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoOwnerName outputs the username or real name of the owner of the photo. In order to display the real name, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoCommentsCount outputs the number of comments that have beeb made on the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoCommentsCount outputs the number of comments that have beeb made on the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTags is a container tag that displays each of the tags assigned to the photo. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTagName displays the name of the tag. Must be used between <MTFlickrPhotoTags> and </MTFlickrPhotoTags> tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTFlickrPhotoTagURL displays the URL to the Flickr page for the tag for the photo's owner. Must be used between <MTFlickrPhotoTags> and </MTFlickrPhotoTags> tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below).
  • MTIfFlickrPhotoTags is a conditional tag - anything between the <MTIfFlickrPhotoTags>. and </MTIfFlickrPhotoTags> tags will only be displayed if the photo has one or more tags. For this tag to work, the "Get Photo Details" setting must be turned on (see details below). Here is an example of how these tags can be used to display the tags of a photo:

    <MTIfFlickrPhotoTags>
    Tags for this photo: <br /> <ul>
    <MTFlickrPhotoTags>
    <li><a href="<MTFlickrPhotoTagURL>"><MTFlickrPhotoTagName></a> </li>
    </MTFlickrPhotoTags>
    </ul>
    </MTIfFlickrPhotoTags>

FlickrPhotos Plugin Settings

The following settings can bet set on a per-blog basis. To access these settings, select the blog you want and then choose "Settings" from the menu. Then choose the "Plugins" tab. You should then see FlickrPhotos in the list of plugins - hit the settings link to display the settings. The settings are:

  • Thumbnail Size: This setting determines the size of the thumbnail images. Choice are Square, Thumbnail, Small, Medium, and Orginal. These sizes correspond to the sizes used by Flickr. The default is Thumbnail. This setting can be overidden by using the size argument as described above.
  • Link to: This setting determines where each thumbnail will link to. You can link directly to a different size of the photo (you can choose from the same sizes as above) OR you can link each photo to the Flickr page for that photo. The default is Flickr Page This setting can be overidden by using the target argument as described above..
  • Number of Photos: The default numbers of photos to display. The default is 10. You can override this by using the 'lastn' argument (for example, <MTFlickrPhotos username="John Smith" lastn="15"> )
  • Photo List Cache: The length of time to cache the list of photos. After the above time frame has passed, FlickPhotos will check with Flickr to see if there are any new photos. It is highly recommended that this setting be set to 1 hour or longer. Choosing 'none' may slow down your rebuilds considerably. You can override this setting on a case by case basis by specifying the number of seconds in the refresh argument (for example, to set the Photo List Cache to 1 hour you could use <MTFlickrPhotos username="John Smith" refresh="3600"> )
  • Photo Info Cache: The length of time to cache the detailed information for each photo (title, tags, description, number of comments, etc.). After the above time frame has passed, FlickPhotos will check with Flickr to see if there have been any changes to the photo information. It is highly recommended that this
    setting be set to 1 week or longer. Choosing 'none' may slow down your rebuilds considerably. You can override this setting on a case by case basis by specifying the number of seconds in the refresh_details argument (for example, to set the Photo Info Cache to 2 weeks you could use <MTFlickrPhotos username="John Smith" refresh_details="1209600"> )
  • Clear Cache Older Than: This setting will delete cache information about photo lists and photo details that are older than the time frame selected above. This is useful to remove data for older photos that you are no longer displaying, thus preventing your database from growing too large. It is recommended that this setting be set to 1 month or longer. Choosing 'Never' may cause your database to grow sigificantly larger, depending on how you use the plugin. IMPORTANT: With this setting, the cache will not be cleared automatically. To clear the cache you MUST return to this Plugin settings page. To prevent slow rebuilds, the cache-clearing function only runs when you access the Plugin settings page. Also note that this setting is global, meaning that it applies to photo cache data for all of your blogs.
  • Get Photo Details: If set to "On", FlickrPhotos will ask Flickr for some details about each photo. Photo details includes the following: description (<MTFlickrPhotoDescription> ), number of comments
    (<MTFlickrPhotoCommentsCount> ), owner location (<MTFlickrPhotoOwnerLocation> ), and tags (<MTFlickrPhotoTags> ). If you are not displaying these tags on your pages, you can change this setting to "Off" to improve perfomance and speed rebuild times. You can override this setting on a case by case basis by using the "fetchdetails" argument (for example, <MTFlickrPhotos username="John Smith" fetchdetails="1"> )
  • Install Sidebar Widget: Checking the box for this setting and entering a Flickr username will automatically install a Sidebar widget that displays 5 recent photos. You can then customize this by editing the "Sidebar: FlickrPhotos" template module, which will be created after checking this option. This setting works with the Sidebar Manager plugin: Learn more about Sidebar Manager.

Requirements:

  • MT 3.2
  • Flickr::API Perl Module (included in download for convenience)
  • XML:: Parser::Lite (included for convenience)
  • XML:: Parser::Lite::Tree (included for convenience)
  • XML:: Parser::Lite::Tree::XPath (included for convenience)

Download Now

Download the plugin by clicking here.

Membership required, please sign-in or register:

Installation

  1. Expand the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation and the contents of the 'extlib' folder to the 'extlib' folder of your MT installation.
  2. Adjust the plugin settings if desired (see above)
  3. Start using the above template tags in your templates.

If you like this plugin, please consider making a donation:

This plugun is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5. In other words, if you use this plugin, please display a "powered by Flickr Photos" link, such as the one below:

<a href="http://mt-hacks.com/flickrphotos.html" target="_blank">Powered by Flickr Photos</a>

As always, please let me know if you find any bugs, or if you have any suggestions or comments.

Flickr photos is a plugin that enables you to display thumbnail links of Flickr photos in your Movable Type blog.

You can list thumbnails by Filckr user and/or by Flickr tags. You can also control the number of thumbnails displayed and the size of the thumbnails. Each thumbnail can link to a larger version of the image, or to the Flickr page for that photo.

Here is an example of the easiest way to use FlickrPhotos in your templates:

<MTFlickrPhotos username="John Smith">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

The above template code will display thumbnail links for the 10 most recent photos for Flickr user "John Smith". (Tip: when entering the value for your 'username', you should use the name that appears after "Logged in as" on the top of each Flick page when you are logged in. Your user name may contain spaces - if so, be sure to include those space as I have done with "John Smith" above).

Here another example that displays thumbnail links from any user tagged with "movabletype":

<MTFlickrPhotos tags="movabletype">
<MTFlickrPhotoLink> <br />
<br />
</MTFlickrPhotos>

FlickrPhotos Template Tags

FlickrPhotos includes the following template tags:

  • MTFlickrPhotos is container tag for displaying photos. Arguments include:
    • username - restricts photos to a specific Flickr user. Required if a tags argument is not included.
    • tags - retricts photos to those with the specified tags. Multiple tags can be specified, separated by comma. Required if a username argument is not included.
    • tag_mode - specifies the method for displaying photos by the tags argument. If tag_mode is set to 'any', it will display photos with at least one on the tags specified in tags. If tag_mode is set to 'all', it will only display photos tagged with each and every one of the tags specified by tags. Optional (the default value is 'any').
    • lastn - determines the number of photos to display. Optional (default is 10 photos).
    Example tag with all arguments included: <MTFlickrPhotos username="John Smith" tags="movabletype,hacks" tag_mode="all" lastn="5">
  • MTFlickrPhotoThumb outputs the URL to the thumbnail image. The size of thumbnail is determined by the FlickrPhotos plugin settings (see below). Example usage: <img src="<MTFlickrPhotoThumb>">
  • MTFlickrPhotoURL outputs the destination URL that can be used to link each thumbnail. This URL will be to either to the Flickr photo page or directly to a different size of the photo (as determined by the plugin settings). Example usage: <a href="<MTFlickrPhotoURL>">
  • MTFlickrPhotoTitle outputs the Flickr title for the photo. This can be used as "alt" text for the thumbnails, and/or used a caption for each photo.
  • MTFlickrPhotoLInk combined each of the above tags - it outputs a linked thumbnail, using the title as the 'alt' and 'title' for the link. The link will open in a new window. This tag is the easiest way to use FlickrPhotos, becuase you don't have to write any HTML for creating the link or displaying the image.

FlickrPhotos Plugin Settings

There are two settings which you can set on a pe-blog basis. To access these settings, select the blog you want and then choose "Settings" from the menu. Then choose the "Plugins" tab. You should then see FlickrPhotos in the list of plugins - hit the settings link to display the settings. The two settings are:

  • Thumbnail Size: This setting determines the size of the thumbnail images. Choice are Square, Thumbnail, Small, Medium, and Orginal. These sizes correspond to the sizes used by Flickr. The default is Thumbnail.
  • Link to: This setting determines where each thumbnail will link to. You can link directly to a different size of the photo (you can choose from the same sizes as above) OR you can link each photo to the Flickr page for that photo. The default is Flickr Page.

Requirements:

  • MT 3.2 (it may work with earlier versions, but I have not tried)
  • Flickr::API Perl Module (included in download for convenience)
  • XML:: Parser::Lite and XML:: Parser::Lite::Tree (included for convenience)

Download Now

Download the plugin by clicking here.

Membership required, please sign-in or register:

Installation

  1. Expand the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation and the contents of the 'extlib' folder to the 'extlib' folder of your MT installation.
  2. Adjust the plugun settings if desired (see above)
  3. Start using the above template tags in your templates.

As always, please let me know if you find any bugs, or if you have any suggestions or comments.