public static function loadAddon($obj, $type = null) { $path = null; if (empty($type)) { $type = $obj->type; } $path = oseMscMethods::getAddonPath("{$obj->name}.js", $type); if (JFile::exists(JPATH_SITE . DS . $path)) { if (!empty($obj->addon_name)) { oseHTML::script($path, '1.5'); } } }
function getAddon() { $result = array(); $addon_name = JRequest::getCmd('addon_name', null); $type = JRequest::getCmd('addon_type', null); echo '<script type="text/javascript">' . "\r\n"; require_once JPATH_SITE . DS . oseMscMethods::getAddonPath($addon_name . '.js', 'member'); echo "\r\n" . '</script>'; oseExit(); }
private function loadAddon($obj, $type) { $path = null; $path = oseMscMethods::getAddonPath("{$obj->name}.js", $type); if (!empty($obj->addon_name)) { oseHTML::matchScript($path, 'msc'); } }