public function __construct($config = array()) { $document = JFactory::getDocument(); //load dialog stylesheet in backend KomentoDocumentHelper::loadHeaders(); $config = Komento::getConfig(); $konfig = Komento::getKonfig(); $toolbar = JToolbar::getInstance('toolbar'); $toolbar->addButtonPath(KOMENTO_ADMIN_ROOT . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'images'); if ($document->getType() == 'html') { require_once KOMENTO_CLASSES . DIRECTORY_SEPARATOR . 'configuration.php'; $configuration = KomentoConfiguration::getInstance(); $configuration->attach(); } $version = str_ireplace('.', '', Komento::komentoVersion()); $document->addScript(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/js/admin.js?' . $version); $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/reset.css?' . $version); $document->addStyleSheet(rtrim(JURI::root(), '/') . '/components/com_komento/assets/css/common.css?' . $version); $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/style.css?' . $version); // For the sake of loading the core.js in Joomla 1.6 (1.6.2 onwards) if (Komento::joomlaVersion() >= '1.6') { JHTML::_('behavior.framework'); } parent::__construct($config); }
/** * Constructor * * @since 0.1 */ function __construct($config = array()) { // Load necessary css and javascript files. KomentoDocumentHelper::loadHeaders(); // By default, we use the tables specified at the back end. JTable::addIncludePath( JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'tables'); //load the content plugins so that the content trigger will work. JPluginHelper::importPlugin('content'); parent::__construct($config); }