« Navigation Breadcrumbs v1.1 - Fix for MT 4.1 | Main | User Profiles 1.6 - Support for MT 4.1 »

IfAvailable - Test Availabiity of Plugins and Perl Modules

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

Download Now
Downloads: 43

Rate this entry:

  • Currently 3.5/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 3.5/5 (15 votes cast). Powered by the Ajax Rating plugin.

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.

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

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

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

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.

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

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

Can this one detect also other plugins than perl-scripts ?

I´m not sure, but I think it´s only able to detect PERL based plugins!

Hi, I used it for my website and would recommend it to every website developer. Best regards

i agree with etikettendrucker.
its a really nice development.
greetings from germany and thank you for sharing.

Post a comment