I’ve started writing my own addons, and the very first thing I did was install this… except for me a Equipment didn’t correctly display it’s MojoBar (the icon showed up, but no content would appear). I found out that the problem was because Equipment was reloading the equipment.php library file. So, here’s a minor edit you might want to consider to put in Equipment.
Change the foreach in the index function of equipment/libraries/equipment.php to:
foreach ($addons as $addon)
{
if ($addon == 'equipment')
{
$data['addons'][$addon] = array (
'name' => $addon,
'display_name' => '<span>' . $this->display_name . '</span>',
'version' => $this->addon_version
);
}
elseif (strpos($addon, '.') === FALSE)
{
$this->mojo->load->add_package_path(APPPATH.'/third_party/'.$addon.'/');
include_once APPPATH.'third_party/'.$addon.'/libraries/'.$addon.'.php';
$temp_obj = new $addon();
$data['addons'][$addon] = array (
'name' => $addon,
'display_name' => isset($temp_obj->display_name) ? $temp_obj->display_name : ucfirst($addon),
'version' => isset($temp_obj->addon_version) ? $temp_obj->addon_version : 'Unknown',
);
$data['addons'][$addon]['admin_method'] = isset($temp_obj->admin_method) ? $temp_obj->admin_method : NULL;
$data['addons'][$addon]['has_admin'] = method_exists($temp_obj, $data['addons'][$addon]['admin_method']);
unset($temp_obj);
$this->mojo->load->remove_package_path();
}
}