Skip to content

A Movable Type plugin to add info about the number of twitter shares of each entry in a blog

Notifications You must be signed in to change notification settings

mschenk/mt-plugin-twittersharecount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

TwitterShareCount for Movable Type

This is a plugin for the Movable Type CMS (http://www.movabletype.org). It pulls in the number of Twitter shares for each of a blog's entries periodically, and makes this data available for display and/or sorting, both in the backend and on the frontent of the blog.

Compatibility

This plugin has been developed on Movable Type 5.13, but earlier versions of MT5.x should work. It hasn't been tested on Movable Type 4.x, but it should work except for the parts that use the listing framework in the backend.

Requirements

This plugin uses a scheduled task to pull in the data from Twitter every hour, so either the tools/run-periodic-tasks on the server needs to be run regularily or the RSS feed of the system activity log needs to be fetched periodically (this also triggers the scheduled tasks framework in Movable Type).

Installation

Simply copy the TwitterShareCount folder into the 'plugins' folder of your Movable Type installation.

Configuration

Go to the Tools > Plugins menu of the blog you want to enable this plugin for, and open the settings for the TwitterShareCount plugin. Check the box to enable the plugin, and save the settings. By default, the plugin only checks the Twitter share count for entries that are less than 30 days old. You can increase this number in the plugin settings, or set it to zero to make the plugin check all entries in the blog every hour. NOTE: this may result in rate limitation by the Twitter API if you have a very large blog.

Usage

  • In Movable Type 5, go to the screen listing a blog's entries and click on the 'Display Options'. There should now be an option to add a 'Twitter Shares' column to the listing. NOTE: the data is refreshed hourly, so right after plugin installation the column might still be blank. Also, if none of your posts are shared on Twitter, the column will remain blank as well.
  • The plugin adds a tag <mt:EntryTWShares> to any entry context in MT's templates, which will display the current number of Twitter shares at the time the template was published.
  • The plugin adds a 'twshares' field to the standard MT::Entry object, allowing entries lists to be sorted by this number in this way: <mt:entries lastn="99999" sort_by="twshares" sort_order="desc">
  • -

Credits

This plugin was written by Maarten Schenk ([email protected]) of http://www.yesitcan.be and http://www.movabletips.com in 2012. You are free to use this plugin on your Movable Type installation for any purpose provided you leave this message intact.

About

A Movable Type plugin to add info about the number of twitter shares of each entry in a blog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages