farang
Well-known member
Hi!
What would be a good way to check for the existance of add-on "a" when installing add-on "b"?
I started with the following code but I'm sure it will not work ...
What would be a good way to check for the existance of add-on "a" when installing add-on "b"?
I started with the following code but I'm sure it will not work ...
Code:
<?php
class myAddOn_Installer
{
public static function install($installedAddon)
{
if (class_exists('SomeOtherAddOn_Forum'))
{
throw new XenForo_Exception('You need to uninstall the plugin named "Someother Add-on" before installing this add-on.', true);
}
}
}