/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ function display($tpl = null) { // Get config parameters $this->_document = JFactory::getDocument(); $this->_config = JSNConfigHelper::get(); // Initialize toolbar JSNMobilizeHelper::initToolbar('JSN_MOBILIZE_PAGE_CONFIGURATION_TITLE', 'mobilize-config', false); // Get messages $msgs = ''; if (!$this->_config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('CONFIGURATION'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Assign variables for rendering $this->assignRef('msgs', $msgs); // Load the submenu. $input = JFactory::getApplication()->input; JSNMobilizeHelper::addSubmenu($input->get('view', 'configuration')); if (!empty($_GET['g']) && $_GET['g'] == 'data') { echo JSNHtmlAsset::loadScript('jsn/data', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true); } // Load assets JSNMobilizeHelper::loadAssets(); // Display the template parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. * * @see fetch() * @since 11.1 */ function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Get config $config = JSNConfigHelper::get(); // Display the view parent::display($tpl); // Load assets JSNMobilizeHelper::loadAssets(); // $this->addAssets(); }
/** * Method for display page. * * @param boolean $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ public function display($tpl = null) { // Get config parameters $config = JSNConfigHelper::get(); // Set toolbar title JToolBarHelper::title(JText::_('JSN_MOBILIZE_PAGE_UPDATE_TITLE')); // Load assets JSNMobilizeHelper::loadAssets(); // Get messages $msgs = $config->get('disable_all_messages') ? '' : (count($msgs = JSNUtilsMessage::getList('EDIT')) ? JSNUtilsMessage::showMessages($msgs) : ''); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Display the template parent::display($tpl); }
/** * Display method * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { // Set toolbar title JToolBarHelper::title(JText::_('JSN_MOBILIZE_HELP_HELP_AND_SUPPORT')); // Get config $config = JSNConfigHelper::get(); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('HELP'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Load assets JSNMobilizeHelper::loadAssets(); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Display the template parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. * * @see fetch() * @since 11.1 */ function display($tpl = null) { // Get config $config = JSNConfigHelper::get(); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('PROFIELS'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Initialize toolbar $this->initToolbar(); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Set sub-menu JSNMobilizeHelper::addSubmenu('profiles'); // Display the view parent::display($tpl); // Load assets JSNMobilizeHelper::loadAssets(); $this->addAssets(); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ function display($tpl = null) { // Get config parameters $config = JSNConfigHelper::get(); // Initialize toolbar JSNMobilizeHelper::initToolbar('JSN_MOBILIZE_PAGE_ABOUT_TITLE', 'mobilize-about', false); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('ABOUT'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Load the submenu. $input = JFactory::getApplication()->input; JSNMobilizeHelper::addSubmenu($input->get('view', 'about')); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Display the template parent::display($tpl); // Load assets JSNMobilizeHelper::loadAssets(); }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ protected function addAssets() { // Initialize variables $config = JSNConfigHelper::get(); $jUri = JURI::getInstance(); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-colorpicker/css/colorpicker.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-gradientpicker/jquery.gradientPicker.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-advanced-parameters.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-select2/select2.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/codemirror/lib/codemirror.css'); $device = "mobilize"; $links = ($links = $jUri->getScheme()) . (empty($links) ? '' : '://'); if (substr($config->get("link_{$device}"), 0, 1) == '/') { $links .= $jUri->getHost() . $config->get("link_{$device}"); } else { $links .= $config->get("link_{$device}") . JURI::root(true); } // Setup text translation $arrayTranslated = array('JSN_MOBILIZE_SWITCHER_TITLE', 'JSN_MOBILIZE_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_MOBILIZE_SWITCHER_SETTINGS', 'JSN_MOBILIZE_CANCEL', 'JSN_MOBILIZE_SAVE', 'JSN_MOBILIZE_ALIGNMENT', 'JSN_MOBILIZE_SELECT_THEME', 'JSN_MOBILIZE_SELECT', 'JSN_MOBILIZE_CLEAR', 'JSN_MOBILIZE_IMAGE_ALT', 'JSN_MOBILIZE_IMAGE_URL', 'JSN_MOBILIZE_ENABLE_MOBILIZE_MENU_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SEARCH_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_LOGIN_LINK', 'JSN_MOBILIZE_CHANGE', 'JSN_MOBILIZE_CLICK_SELECT', 'JSN_MOBILIZE_TITLE_SMARTPHONE', 'JSN_MOBILIZE_TITLE_TABLET', 'JSN_MOBILIZE_TYPE_POSITION', 'JSN_MOBILIZE_TYPE_MODULE', 'JSN_MOBILIZE_SELECT_MENU', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_SELECTED_MODULE', 'JSN_MOBILIZE_CLOSE', 'JSN_MOBILIZE_SELECT_LOGO', 'JSN_MOBILIZE_SELECT_STYLE', 'JSN_MOBILIZE_SELECT_POSITION', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SWITCHER_LINK', 'JSN_MOBILIZE_ADD_ELEMENT', 'JSN_MOBILIZE_ADD_MODULE', 'JSN_MOBILIZE_ADD_POSITION', 'JSN_MOBILIZE_IMAGE_FILE', 'JSN_MOBILIZE_YES', 'JSN_MOBILIZE_NO', 'JSN_MOBILIZE_CONFIRM_LOAD_STYLE', 'JSN_MOBILIZE_SWITCH_TO_WEB_UI_FOR_MOBILIZE', 'JSN_MOBILIZE_STYLE_SETTINGS_IS_AVAILABLE_ONLY_IN_PRO_EDITION', 'JSN_MOBILIZE_UPGRADE_NOW', 'JSN_MOBILIZE_LINK_SOCIAL', 'JSN_MOBILIZE_DELETE', 'JSN_MOBILIZE_BROWSER', 'JSN_MOBILIZE_UPLOAD', 'JSN_MOBILIZE_UPGRADE_EDITION_TITLE', 'JSN_MOBILIZE_UPGRADE_EDITION', 'JSN_MOBILIZE_ADD_ELEMENT_IS_AVAILABLE_ONLY_IN_PRO_EDITION'); // Initialize Javascript $edition = defined('JSN_MOBILIZE_EDITION') ? JSN_MOBILIZE_EDITION : "free"; echo JSNHtmlAsset::loadScript('mobilize/profile', array('editions' => $edition, 'pathRoot' => JURI::root(), 'defaultTemplate' => $this->_defaultTempateSite, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'listMenu' => $this->_menuType, 'listModule' => $this->_Modules, 'mobilizeLink' => $links, 'configuration' => isset($this->_items['configuration']) ? $this->_items['configuration'] : ''), true); JSNMobilizeHelper::loadAssets(); }