GetSimple Support Forum
How to verify if a plugin is installed ? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: How to verify if a plugin is installed ? (/showthread.php?tid=2913)



How to verify if a plugin is installed ? - didou038 - 2012-03-12

Hi all !

i'm working on a template, and I wish to verify if a plugin is installed to activate or not a template option.

For example, if the plugin "I18N_Search" is installed then the search module can be activate, otherwise, it's indicated that the plugin "I18N_Search" must be installed to activate this option.

Is it possible ? If yes, can you tell me the way to follow ?

I know, I have really weird questions ^^

Thanks for your help Wink


How to verify if a plugin is installed ? - mvlcek - 2012-03-12

didou038 Wrote:Hi all !

i'm working on a template, and I wish to verify if a plugin is installed to activate or not a template option.

For example, if the plugin "I18N_Search" is installed then the search module can be activate, otherwise, it's indicated that the plugin "I18N_Search" must be installed to activate this option.

Is it possible ? If yes, can you tell me the way to follow ?

I know, I have really weird questions ^^

Thanks for your help Wink

The easiest way is to check for the existance of a function of that plugin, e.g.
Code:
if (function_exists('get_i18n_search_results')) {
  // do something that needs I18N Search
}



How to verify if a plugin is installed ? - didou038 - 2012-03-12

PERFECT !!!

Thank you mvlcek ! Exactly my need !!!