IfAvailable is a plugin for Movable Type, designed primary for use by plugin or template developers. It provides a single template tag, <MTIfAvailable>, that can be use to check for the availability of other plugins or for specific Perl modules:
Only one of the following arguments must be used:
- perl_module - A perl module name. Example: <MTIfAvailable perl_module="XML::Parser">
- plugin_id - The registered "id" of a specific plugin. Example: <MTIfAvailable plugin_id="userprofiles">
- plugin_sig - The plugin "sig" of a specific plugin. Example: <MTIfAvailable plugin_sig="CommentTitles/CommentTitles.pl">. Useful when a plugin does not have a registered "id".
This plugin is especially useful for template developers who want to design template sets that contain template tags from one or more plugins, but the templates sets do not require those plugins. By using IfAvailable conditional blocks you can provide a template set that provides different output (read: extra features) to sites that have certain plugins/modules, and a more limited output if they do not. In other words, you don't have to create multiple versions of the template set. My MT Forum plugin uses this approach to provide a set of forum templates -- if sites have plugins such as Visitor Stats, User Profiles Pro, and Comment Titles, the forum templates will include things like topic views, post signatures, and user post counts.
- GPL v2
Downloads: <$MTAjaxRatingVoteCount id="1" type="ifavailabledownloads"$>