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:
Arguments
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.
License
- GPL v2
Download Now


Comments (11)
I have downloded the plugin, very useful for template developers. I'm developping a website template for the company's affiliates located in different countries. I used certain plugins/modules in my Php Code and I don't want to create mupltiple versions of the template or to have only one version and recieve a lot of bug's reports.
Thank u for the pluging, u saved my time.
Posted by Flüge New York | February 27, 2009 6:47 AM
Posted on February 27, 2009 06:47
Hi im install MTForum but how i can change to blue templates?
Run perfect ;) im very funny with forum static, the others scripts of forum the server is very load
Posted by دردشة صوتية | March 30, 2009 8:45 PM
Posted on March 30, 2009 20:45
Hi im install MTForum but how i can change to blue templates?
Run perfect ;) im very funny with forum static, the others scripts of forum the server is very load
Posted by شات صوتي | March 30, 2009 8:45 PM
Posted on March 30, 2009 20:45
Hi there,
I found great ideas and discussing on your Web site.
Well done ! Thanks for that and keep on doing
Greetings from germany , Thomas
Posted by Thomas , Zauberer Zauberkünstler | May 31, 2009 6:07 AM
Posted on May 31, 2009 06:07
However, I appreciate your efforts in providing us with a CPAN module to make it easier
for us non-developers to cling to the plug-in developer's guidelines.
Nevertheless, I find it a bit awkward that you advise the Perl plug-in authors to first pull in that FindBin module (which I have never used so far) just to grope around in the vicinity of the plug-in's location for possible non-standard Perl module locations.
Having configured my CPAN/Config.pm and being root on my hosts
I naturally prefer the perl -MCPAN 'install Nagios::Plugin way of installing Perl modules, no matter what various Linux distro's or Unices' package managers deem appropriate as installation target for various Perl modules.
Thus I would suggest to first try to load Nagios::Plugin and only if this fails
doing the poking with FindBin.
Of course one then cannot use the modules as this is already happening at compile time.
Posted by Gummistiefel | June 4, 2009 7:57 PM
Posted on June 4, 2009 19:57
Zauberkünstler:
Hi there,
I found great ideas and discussing on your Web site.
Well done ! Thanks for that and keep on doing
Greetings from germany
http://www.t7b.com/dlil
Posted by دردشة | August 3, 2009 7:01 PM
Posted on August 3, 2009 19:01
found great ideas and discussing on your Web site.
Well done ! Thanks for that and keep on doing
Greetings from germany , Thomas
http://www.t7b.com/dlil/show80156.html
Posted by دردشة الشلة | August 3, 2009 7:02 PM
Posted on August 3, 2009 19:02
Can this one detect also other plugins than perl-scripts ?
Posted by xtcommerce templates | August 23, 2009 2:48 PM
Posted on August 23, 2009 14:48
I´m not sure, but I think it´s only able to detect PERL based plugins!
Posted by Werbegeschenke | August 25, 2009 12:04 PM
Posted on August 25, 2009 12:04
Hi, I used it for my website and would recommend it to every website developer. Best regards
Posted by Etikettendrucker | November 13, 2009 3:46 PM
Posted on November 13, 2009 15:46
i agree with etikettendrucker.
its a really nice development.
greetings from germany and thank you for sharing.
Posted by Alleinunterhalter Köln | November 30, 2009 6:37 AM
Posted on November 30, 2009 06:37