Convert To Global Template is a plugin for Movable Type 4.1+ that does exactly what it says: it enables you to convert blog templates to global (system-wide) templates in MT 4.1.

Movable Type 4.1 has a new feature in which you can create template modules and widgets at the system level. These "global" templates can then be included from any blog in the system. This plugin enables you to convert blog-level modules and widgets to global ones, in just a few clicks. Simply check the templates you want to convert, choose "Convert to Global" from the "more actions..." dropdown box, and hit Go.

You can also convert in the other direction, from global to blog level.

Requirements

  • MT 4.1+

Installation

  1. Upload the contents of the 'plugins' folder to the 'plugins' directory of your MT install.
  2. Convert templates as desired from the Blog Templates listing of modules and widgets.

Note: Only users with system admin permissions will be able to see and use this action.

Get Convert To Global Template

This plugin is free to members of MT Hacks.

Download Now

Download Now
Downloads: 199

Membership required, please sign-in or register:


Visitor Stats is a plugin for Movable Type 4+ that displays visitor and page view statistics for your MT sites. Visitor Stats Pro provides even more statistics and widgets (details below).

Visitor Stats looks like this:

New Features in Visitor Stats 1.6

  • Support for MT 4.1
  • Some template tags now supported under MT's PHP-dynamic publishing system (<MTVisitorStatsTracker>, <MTVisitorStatsCounter>, <MTEntryStats>, and <MTPageStats>)
  • Option to build dashboard stats via scheduled for better performance (Pro)
  • Code optimized for better overall performance

Visitor Stats Pro

Additional features included with Visitor Stats Pro:

  • Blog Widget for displaying a ranked list of "Most Read Entries"
  • Entry Stats graph that displays entry pages views by date.
  • List of Recent Visitors and Views on the admin Dashboard (including IP address, username, referrer and keywords).
  • Dashboard widgets for displaying top search engine keywords and referrers.
  • Detailed Entry Stats screen with graph, top keywords used to find the entry, and a list with details of each page view for that entry.
  • Many new template tags for displaying stats on the published pages for your blog.
  • See details about Visitor Stats Pro below

Visitor Stats also provides a "stats counter" tag (and widget) that you can place on your site to display your stats. Note: you can visit the MT4 Test Blog to to see some of the Visitor Stats (and Pro) publishing widgets and tags in action.

Visitor and View Stats

Visitor Stats tracks two key statistics for your blog:

  • Visits - A visit represents a real person who visited your blog. Even if the person views 20 pages of your site, it only counts as one visit (per day).
  • Views - Also known as page views, a view represents the viewing of a single web page on your site. If the person views 20 pages, it counts as 20 views. If a person refreshes the same page several times, each time counts a view.

How it Works

Visitor Stats tracks visitor and view information and records that information directly into your Movable Type database. After placing a single template tag in your templates, Visitors Stats will begin recording stats automatically using a combination of JavaScript and PHP (note that you do not need to enable MT's dynamic publishing feature). Then, when you view the admin dashboard for your blog, you will "Visitors" and "Views" tabs on the Blog Stats widget, which will display a graph of your stats (see image above). On the System Overview dashboard, you will see aggregate graphs of your stats for all blogs on the system.

Visitor Stats - Template Tags

Visitor Stats provides 4 template tags:

  • <MTVisitorStatsTracker> - Place this tag before the </head> tag in every template where you want to track stats. Only place one of these per template.
  • <MTVisitorStatsCounter> - This tag will display the total number of visitors or views for your blog, just like a web stats counter. There is one optional argument:
    • type - the type of stats that you want to count, which either be "visit" or "view". The default is "view". Example: <MTVisitorStatsCounter type="visit">
  • New! - <MTEntryStats> - Used within an entry context, this displays the total number of views for that entry.
  • New! - <MTStatsImageURL> - The URL to the small stats image ( that looks like ).There is one optional argument:
    • type - the type of stats that you want to graph, which either be "visit" or "view". The default is "view". Example: <MTStatsImageURL type="visit">

Visitor Stats Pro Features

Visitor Stats Pro includes additional stats and provides ways to view visitor and view stats in more detail, helping you understand the traffic to your sites. Where are readers coming from? What search keywords are they using in search engines to find your site? What entries are they reading? Which entries get the most views? Visitor Stats Pro helps you answer these questions and more.

Display a List of the Most Popular Entries

Visitor Stats Pro includes a widget that you can use to display a ranked list of the "Most Read Entries" in your blog sidebar, showing readers which entries are the most popular. You can also create customized most readlists by category, tag, etc. Examples include "Most Read Entries in this Category", or a "related entries" section that lists that the most read entries with the same tags as the current entry. This is a powerful feature with many possibilities.

Detailed Stats for Each Entry

In the MT4 admin interface, Visitor Stats Pro displays detailed view stats for each entry. On the entry screen, an Entry Views graph can display the traffic history for that entry:

(The graph on the edit entry screen can be hidden with a single click, or disabled in the plugin settings, for those who don't want to the graph to appear on this screen)

On the right side of the Edit Entry screen, the number of views for that entry will be displayed, and you can click the link for Detailed Stats:

The same graph also appears on the Detailed Stats screen for each entry (just click the "More Stats" link from the main entry screen), plus a list of top keywords for that entry, and a detailed list of the pages views for that entry:

As you can see from the image above, in addition to displaying the IP address for each Visitor (just to left of this image), Visitor Stats Pro will also identify visitors and views by registered users on your system. This includes both local MT authenticated users, as well as TypeKey, Vox, Livejournal, or other OpenID users. This provides valuable information about the traffic stats of your signed-in users. You can even filter the list of page views by dragging the sliders on the graph -- just choose a date range, then click the link that appears. The "From" column shows the URL that the visitor came from before arriving on your site.

More Dashboard Stats

Visitor Stats Pro provides even more stats on the MT4 admin dashboard. This includes a summary of recent visitors and views, along with detail about each. This is similar to the "Recent Entries" and "Recent Comments" displayed when you click the respective tab on the Blog Stats widget:

Top Keywords and Referrers Dashboard Widgets

Visitor Stats Pro includes two new widgets that you can optionally display on your admin dashboard. The "Top Keywords" widget will display a list of the top search engine keywords used to find your blog:

And the "Top Referrers" widget will display a list of the top referrer URLs for your visitors, so you can see where your traffic is coming from:

Many Visitor Stats Pro Template Tags

Visitor Stats Pro includes many new template tags that you can use to display your blog stats on your published pages, blog sidebar, etc. In addition to display lists of "most viewed entries" as described above, you can display lists of top keywords, top referrers, recent visitors, and recent page views. If fact there are so many new template tags, that I won't discuss them in detail here -- I will soon post a separate article that describes the tags with some example template code.

Requirements

Installation or Upgrade

Note: If you are upgrading from version 1.5x, you do not need to reinstall the templates, as they have not changed in version 1.6.

  1. Download and extract the zip file, then upload the contents of the 'plugins' directory into the 'plugins' directory of your Movable Type installation (often /cgi-bin/mt/plugins/).
  2. (Pro Version Only) Upload the contents of the 'extlib' directory into the 'extlib' directory of your Movable Type installation (often /cgi-bin/mt/extlib/).
  3. (Pro Version Only) Upload the contents of the 'mt-static' directory into the 'mt-static' directory used by your Movable Type installation.
  4. Login to MT and you should be redirected to an "Upgrade" screen that will update your database automatically.
  5. For each blog that you want to track, go to Preferences > Plugins and then click on "Visitor Stats" and then click on "Settings". Now click the link labeled "Click here to install the Visitor Stats templates". Note: Even if you are upgrading from a previous version, you should re-install the templates.
  6. Now go to Design > Templates and insert the <MTVisitorStatsTracker> tag before the </head> tag for all templates that you want to track. Note that if you are using the new MT4 default templates, then you only have to do this in one place: click on "Template Modules" from the right side of the page and open the "Header" template module and insert the <MTVisitorStatsTracker> before the </head> tag and then save the module. Note: If you are upgrading from a previous version of Visitor Stats, you can skip this step.
  7. Now Publish (rebuild) all your files.
  8. (Optional) Add the <MTVisitorStatsCounter> tag to your templates or use Widget Manger to add the "Visitor Stats Counter" widget to your sidebar. Pro users can add the "Most Read Entries" widget and start using the many new templates tags.

Get Visitor Stats Pro

Commercial License - $97

Non Commercial Use License - $33

Get Visitor Stats

Visitor Stats (Basic Version) is free to members of MT Hacks.

Download Now

Download Now
Downloads: 2119

Membership required, please sign-in or register:

Potential Future Features

Visitor Stats Pro was a much larger effort than I anticipated. As such, there are still a number of interesting features that may be added in the future. Future features will be determining largely by the requests of Visitor Stats Pro license holders. Here are some of the potential features:

  • Stats on a per author basis. If you have a blog with multiple authors, see which authors are generating the most traffic.
  • Drill-down into statistics. View the traffic history for a single visitor or registered commenter, see how they navigate through your site and which pages they viewed.
  • Geographical stats. See what country, region and city your visitors are coming from.
  • Recommended entries based on common viewing stats. For example "people who read this entry also read these entries..."
  • And more...

As always, suggestions, comments, and questions are appreciated.

A Note on the Small Stats Graphs

The small stats graphs included with this version of Visitor Stats are called Sparklines and were inspired by the SparkStats plugin for Wordpress. The sparkline graphs used by the Visitor Stats plugin are powered by the sparkline web service provided by bitworking.org. The plugin stores a copy of the image on your blog, and updates the image a maximum of once per hour (note that that stats image only updates when the page is published, either manually or automatically when someone posts a comment, etc.). Credit goes to those sites discussed above for their cool work with Sparklines.

Movable Type 4.1 has just been released. This represents first stable release of Movable Type Open Source (MTOS). In addition, the commercial version has also been released, which includes the same MTOS 4.1 + the "Professional Pack", which includes a slick commercial template set and Custom Fields functionality. MT 4.1 includes a number of new features and user interface enhancements. Highlights include system-wide template modules, a pluggable rich-text-editor, and new templates sets feature that lets you choose a template set when you create a new blog.

I have done a quick review of MT Hacks plugins on MT 4.1, and most of them that worked under 4.0x also work fine under 4.1. However, several plugins will need to be updated before they are fully functionally under 4.1. These include:

  • Visitor Stats - If you upgrade to 4.1 now, the plugin will continue to tracks stats, but the dashboard graphs won't show, and there may be a few other admin interface oddities. An upcoming version will address these.
  • User Profiles - Some user interface elements won't appear properly. Also, MT 4.1 comes with user photos as a core feature, so an upcoming version of User Profiles will migrate your profile photos to use the 4.1 system.
  • Fast Search - Fast Search may work fine under many cases in 4.1, but in some cases a "division by zero" error will occur, caused by changes made in 4.1. This will be addressed in an upcoming version. Get the Update Here.
  • Dynamic Menus - Needs to be updated to work with 4.1.
  • Breadcrumbs - On most screens, it is okay, but in some cases, a little wacky.

There may be others, I haven't tested everything yet. If you are brave enough to upgrade to 4.1 right away, please reply to this entry with any issues or strangeness that you encounter with my plugins.

Designed to be used with the Template Installer plugin, Template Exporter is a plugin for Movable Type that enables you to easily export your blog templates in a way that can be shared, distribute, or even sold to to others.

New in Version 1.1

  • Support for the new "Template Sets" feature in MT 4.1. Starting with MT 4.1, when you create a new blog, you can choose from multiple template sets to use. Template Exporter v1.1 enables you to export your current templates into sets that you can chose when creating new blogs, in a very easy way. More info on this feature below.
  • The code has been optimized to improve performance.

Note: templates exported with version 1.1 of Template Exporter cannot be install with older version of the Template Installer plugin, you will need Template Installer v1.1 (or higher).

Also note that version 1.1 can be used with both MT 4.01 and MT 4.1.

Screencasts

The easist way to describe how Template Exporter works is to show you. The first video below shows how you can export all of a blog templates:

And the the following video shows how you can export only selected templates:


Potential Uses of Template Exporter

This plugin can be put to use in several ways:

  • To create a "backup" of their templates, which can be re-installed later if desired.
  • To copy a set of template from one blog (or installation) to another (some call this "template portability").
  • To share your templates with friends, or post them for download on your blog.
  • To package and sell your customized template designs.
  • To deploy a common template design to multiple blogs in an MT installation.
  • To distribute blog Widgets.
  • To distribute blog templates with MT plugins, providing easy installation.

How it Works (if you care)

Template Exporter provides two main functions:

  • It extracts your templates and saves them in files named according to the template_identifier or template_name, such as main_index.mtml. Each template gets stored in its own file. (Technical note: if a template has an "identifier" field defined in the database, then it will be used for the file name. If not, a "dirified" version of the template name will be used, so "Main Index" will become "main_index".)
  • It automagically creates a YAML file named config.yaml, which defined the configuration information for template set. This includes things like the type and name of the template, and for index templates, the output file and "rebuild with indexes" setting. For example of a Template Exporter config.yaml file, click here.

These files are then saved in their own directory inside a "template_exporter" subdirectory of your blog. You can then use FTP or other means to download the directory and files from there, and subsequent shares the exported template or use with Template Installer to install them on another blog or installation.

Using Template Exporter with the MT 4.1 Template Sets Feature

Movable Type 4.1 includes a feature called Templatee Sets that enables you to choose a template set when you create a new blog. Template Exporter supports this template set format, so you can export your favorite template set and use it as one of the template set choices. No code or plugin creation required. Just use these easy steps:

  1. Go to the Templates area for the blog you want.
  2. Choose the "Export Templates" link from the "Actions" menu on the right side of the page.
  3. Give the new set a name and export it.
  4. Now take the exported set (including the folder that contains the set - for example, if you named it "Cool Style Templates" then the folder would be 'cool_style_templates') and move it into the 'plugins' directory.
  5. Create a new blog and your set will be among the options!

Requirements

  • MT4+

Installation

  1. Download and extract the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation.
  2. Go the blog you want, then Design > Templates then choose the "Export Templates" link from the lower right. (Or, to export only selected templates, check the boxes of the templates you want, then choose "Export Template(s)" from the "more actions" drop-down box, then click "Go".)
  3. Give the template set a name, using only letters, numbers, and spaces, and then click Continue.

Get Template Exporter

Commercial License - $97

Personal License - $33

Comments and suggestions are welcome.

Template Installer is a plugin for Movable Type that makes it easy to install new template sets for your blogs. Combined with Template Exporter plugin, this makes is very easy:

  • For bloggers to share templates / widgets with others
  • For designers to package, sell, and distribute template sets.
  • For companies to deploy template sets to company blogs

Currently, sharing templates requires a lot of cutting and pasting, a very time consuming process. Using Template Installer it takes only a few clicks to install a partial or complete template set in your blog.

New in Version 1.1

Update 1/25/08 13:15 EST:Due to an error on my part, the download link was pointing to the old version for the previous 24 hours. This is now fixed. Please use the download link below to get the new version.
  • Version 1.1 of Template Installer now includes support for MT 4.1. You can use this version with either MT 4.01 or MT 4.1.
  • The code has also been optimized to reduce CPU / memory usage, thus improving performance.
  • No new features have been added.

Note: Template Installer v1.1 can be used to install templates that have been exported using any version of Template Exporter. Templates exported by the new Template Exporter v1.1 cannot be installed with older versions of Template Installer, you'll need version 1.1 for those.

Screencast

The following screencast shows how easy it is to install new templates using Template Installer. In this example, the user chooses to install the "Default Templates", which is handy when you want to revert back to the defaults. The same process would be used to install a completly new set of templates. Click on the video below to watch:

As you can see, it is very quick and easy. As you can see from the last screen, Template Installer will back up your existing templates if they have been customized from the MT defaults.

The missing step from the above example is to upload the desired template set to the /plugins/TemplateInstaller/template_sets directory. No need to edit any files or settings. Once you have uploaded the set, it will appear as an option when you click "Install Templates" from the right side of the Manage Templates screen.

Requirements

  • MT4+
  • Template Refresh plugin (included with MT4)

Installation

  1. Download and extract the zip file, and upload the contents of 'plugins' folder to the 'plugins' directory of your Movable Type installation.
  2. Go to Design > Templates and then choose the "Install Templates" link from the lower right of the page.
  3. Choose a template set from the drop-down box, then click continue.
  4. View the results, then click "return to templates", and you are done.

Included Template Sets

The current version of Template Installer includes 3 template sets:

  • Default Templates - These are the default templates that come with MT4. While you can also use the Template Refresh plugin to re-install these, Template Installer provides easy access to do so. This set is also a good example set to see how it works.
  • Default Templates with Prefix Notation - A version of the default templates that use the new prefix notation. For example, <MTEntries> becomes <mt:Entries>, and so on. This template set will have the same output in your published blog as the default set, only the notation used is different. Note that the tags in this are not complete lowercases (it used mt:EntryTitle and not mt:entrytitle) Thank you to Marleen Zachte for creating this set and giving permission for its inclusion with this plugin!
  • Page Template Only - This set will install the MT4 default "Page" template, as well as the included "Page Detail" module. This set will be useful for those upgrading from previous version of MT, since the Page template is not automatically installed on existing blogs, during the MT4 upgrade.
  • 2 Column Layout Header - This set provides a replacement to the "Header" template module. The default MT4 templates use a 3-column layout. If you want to eaily change your blog to a 2-column layout, just install this template set.
  • Template Installer Widget - The set includes a widget template that you can use with the MT Widget Manager to show your support and spread the word about Template Installer. It is also a good example of how Template Installer can be used to distribute and install blog widgets.

Want more template sets?

Template Installer is new, so there are currently not many template sets available. If you have template sets that you would like to share, I will post a link to them here. Please contact me using the contact link in the menu above. You should also check and post your template sets to the following page on the MT wiki: Template Sets for MT4.

Get Template Installer

Template Installer is free to MT Hacks members for commercial or non-commercial use:

Download Now:

Download Now
Downloads: 4881

Membership required, please sign-in or register:

A Feature for Plugin Developers

For certain plugins, it makes sense to distribute custom template or widgets along with the plugin code. In the past, I included a special template installer routine to help users install such templates. In future, I will be use Template Installer for this purpose, and you can too. Rather than ask users to upload your template set to the Template Installer directory and ask them to install the set, I have include a "side door" feature that can be used instead. Using this approach, the templates are stored in a sub-directory of your plugin. Then you can simply present a link to your users to install the templates. The link would look something like this:

<a href="javascript:void(0)" onclick="return openDialog(false, 'install_blog_templates', 'template_path=$your_template_path&set=$your_set_name&blog_id=$blog_id &magic_token=$magic_token&return_args=$your_return_args')">Install Templates</a>

Of course, you will likely use template tags to form this url, but the key things are to make it open a dialog, to set the "template_path" parameter to the path to your template files (relative to the mt root directory), the "set" parameter to name of your set, and you can also set the "return_args" to return the user to your plugin screen after the templates have been installed. When users click this link, they will bypass the "choose a template set" screen and your templates will be installed immediately.

How do I Export Templates for use with Template Installer?

While you could do it manually, and it wouldn't be too hard, you probably want to use the sister plugin, Template Exporter, which automates the process in a single click.

As always, thoughts and suggestions appreciated.