Page 1 of 1
Simple Way to Find If Module Exists? [solved]
Posted: Wed Apr 20, 2011 6:05 pm
by kendo451
I can write my own UDT to find out if a module is installed.
But, is there an already existing way?
I've scoured the forums and docs and haven't found notice of any. I just thought I would check here...
Re: Simple Way to Find If Module Exists?
Posted: Wed Apr 20, 2011 7:06 pm
by Wishbone
Code: Select all
$gCms = cmsms(); //global $gCms;
if( !isset( $gCms->modules['TheModuleIWant'] ) || !isset( $gCms->modules['TheModuleIWant']['object'] ) )
{
return;
}
$themoduleiwant = $gCms->modules['TheModuleIWant']['object'];
$themoduleiwant->DoThis($somedata);
$themoduleiwant->DoThat($somemoredata);
http://wiki.cmsmadesimple.org/index.php/Developers_FAQ
Re: Simple Way to Find If Module Exists?
Posted: Wed Apr 20, 2011 7:44 pm
by RonnyK
or use CGSimpleSmarty....
Code: Select all
{if $cgsimple->module_installed('FrontEndUsers')}Found FEU{/if}
Ronny
Re: Simple Way to Find If Module Exists?
Posted: Wed Apr 20, 2011 8:25 pm
by kendo451
Thanks both of you! Ronny, your method is what I was looking for.