File : plugin_dependencies_check.php
<?php
if (!defined('JOMRES_INSTALLER')) exit;
// This file is an example of a dependencies check to ensure that the plugin cannot be installed without another plugin being installed first. In this example, this plugin would be dependant on the plugin "dummy_third_party_plugin_handler"
// The test result is set to true because although we want to demonstrate how the dependencies check works, it's likely that a developer will install this plugin to see what it does, and returning false will stop it from installing.
// If you genuinely want to check for a dependancy, then comment out the below lines and uncomment the two that set "$this->test_result = false;"
class plugin_check_dependencies
{
function plugin_check_dependencies()
{
$this->test_result = true;
$this->dependencies = array ( "dummy_third_party_plugin_handler" );
foreach ($this->dependencies as $p)
{
if (!file_exists(JOMRESPATH_BASE."/remote_plugins/".$p."/plugin_info.php") )
$this->test_result = true;
//if (!file_exists(JOMRESPATH_BASE."/remote_plugins/".$p."/plugin_info.php") )
// $this->test_result = false;
}
}
}
?>