示例#1
0
 /**
  * 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)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolbarHelper::title(JText::_('JSN_EASYSLIDER_CONFIGURATION_SETTING'));
     // Add toolbar menu
     JSNEasySliderHelper::addToolbarMenu();
     // Set the submenu
     JSNEasySliderHelper::addSubmenu('maintenance');
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->msgs = $msgs;
     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);
     }
     // Add assets
     JSNEasySliderHelper::addAssets();
     $this->_addAssets();
     // Display the template
     parent::display($tpl);
 }
示例#2
0
 /**
  * Method for display page.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get config parameters
     if (class_exists('JSNConfigHelper')) {
         $config = JSNConfigHelper::get();
         // Check if JSN Mobilize is configured correctly
         if ($config->get('link_mobile') == 'm.domain.tld' or $config->get('link_tablet') == 'tablet.domain.tld') {
             // Get application object
             $app = JFactory::getApplication();
             // Set message
             $app->enqueueMessage(JText::_('JSN_MOBILIZE_CONFIG_LINKS'));
             // Mark required parameters
             JRequest::setVar('required', array('link_mobile', 'link_tablet'));
             // Set config view
             JRequest::setVar('view', 'config');
         } else {
             // Set edit view
             JRequest::setVar('view', JRequest::getCmd('view', 'profiles'));
         }
     } else {
         // Set edit view
         JRequest::setVar('view', JRequest::getCmd('view', 'profiles'));
     }
     // Call parent method
     parent::display($cachable, $urlparams);
 }
示例#3
0
 /**
  * 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);
 }
 function createFileThumbnail($fileOriginal, $fileThumbnail)
 {
     $objJSNISGD2 = new JSNISGD2();
     $crop = 0;
     $maxThubnailSize = 240;
     if (class_exists('JSNConfigHelper')) {
         $objConfig = JSNConfigHelper::get('com_imageshow');
         $maxThubnailSize = (int) $objConfig->max_thumbnail_size;
     }
     $fileResize = array("width" => $maxThubnailSize, "height" => $maxThubnailSize);
     if (JFile::exists($fileOriginal)) {
         if (!JFile::exists($fileThumbnail)) {
             list($width, $height) = getimagesize($fileOriginal);
             if ($width > $fileResize['width'] || $height > $fileResize['height']) {
                 $imageMagic = $objJSNISGD2->resizeImage($fileOriginal, $fileThumbnail, $fileResize['width'], $fileResize['height'], $crop);
             } else {
                 $imageMagic = $objJSNISGD2->resizeImage($fileOriginal, $fileThumbnail, $width, $height, $crop);
             }
             if ($imageMagic) {
                 return true;
             } else {
                 return false;
             }
         }
     } else {
         return false;
     }
     return true;
 }
示例#5
0
 /**
  * Return array of search coverage
  */
 public static function getSearchCoverages()
 {
     $config = JSNConfigHelper::get('com_poweradmin');
     $searchCoveragesOrder = json_decode($config->search_coverage);
     $coverages = array();
     if (count($searchCoveragesOrder) > 0) {
         $configCoverages = json_decode($config->search_coverage);
         $configCoveragesOrder = explode(",", $config->search_coverage_order);
         if (count($configCoveragesOrder) > 0) {
             foreach ($configCoveragesOrder as $_cov) {
                 if (in_array($_cov, $configCoverages)) {
                     array_push($coverages, $_cov);
                 }
             }
         } else {
             $coverages = $configCoverages;
         }
     } else {
         $coverages = array('articles', 'categories', 'components', 'modules', 'plugins', 'menus', 'templates', 'users');
         include_once JPATH_ROOT . '/administrator/components/com_poweradmin/helpers/extensions.php';
         $installedComponents = self::getInstalledComponents();
         $supportedList = JSNPaExtensionsHelper::getSupportedExtList();
         if (count($supportedList)) {
             foreach ($supportedList as $extName => $value) {
                 if (in_array($extName, $installedComponents)) {
                     $coverages[] = $value->coverage;
                 }
             }
         }
     }
     return $coverages;
 }
示例#6
0
 /**
  * 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
  */
 public function display($tpl = null)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     $this->isPrint = $input->getString('print', 'false');
     $this->_form = $this->get('Form');
     $this->_item = $this->get('Item');
     $this->_infoForm = $this->get('InfoForm');
     $dataContentForm = $this->get('FormPages');
     $this->nextAndPreviousForm = $this->get('NextAndPreviousForm');
     $this->_formPages = $dataContentForm;
     $this->_document = JFactory::getDocument();
     $this->_document->addScriptDeclaration("var dataId = {$this->_item->submission_id}");
     $this->_dataSubmission = $this->get('DataSubmission');
     $this->_dataFields = $this->get('DataFields');
     $config = JSNConfigHelper::get();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('SUBMISSION');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Hide main menu
     $input->set('hidemainmenu', true);
     // Initialize toolbar
     $this->initToolbar();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the template
     parent::display($tpl);
     // Load assets
     JSNUniformHelper::addAssets();
     $this->addAssets();
 }
示例#7
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_app = JFactory::getApplication();
     $this->_input = $this->_app->input;
     $this->_config = JSNConfigHelper::get();
 }
示例#8
0
 public function changeExtStatus()
 {
     include_once JPATH_ROOT . '/administrator/components/com_pagebuilder/helpers/extensions.php';
     $status = (int) JRequest::getInt('status');
     $idName = str_ireplace(JSN_PAGEBUILDER_EXT_IDENTIFIED_NAME_PREFIX, "", JRequest::getVar('identified_name'));
     $config = JSNConfigHelper::get('pagebuilder');
     if (isset($config->extension_support) && (string) $config->extension_support != '') {
         $extension_support = @json_decode($config->extension_support);
     } else {
         $extension_support = array();
     }
     // When disable status, update to configuration page
     if ($status == 0) {
         $extensionName = 'com_' . $idName;
         if (($valueRemove = array_search($extensionName, $extension_support)) !== false) {
             unset($extension_support[$valueRemove]);
         }
         $db = JFactory::getDbo();
         $query = $db->getQuery();
         $query->clear();
         $query->update('#__jsn_pagebuilder_config');
         $query->set('value =' . $db->quote(json_encode($extension_support)));
         $query->where('name =' . $db->quote('extension_support'));
         $db->setQuery($query);
         $db->query();
     }
     if (JSNPagebuilderHelpersExtensions::enableExt($idName, 'jsnpagebuilder', $status)) {
         exit('success');
     }
 }
示例#9
0
 /**
  * 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)
 {
     $objJSNUtils = JSNISFactory::getObj('classes.jsn_is_utils');
     $objJSNXML = JSNISFactory::getObj('classes.jsn_is_readxmldetails');
     $objJSNMsg = JSNISFactory::getObj('classes.jsn_is_message');
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('HELP_HELP_AND_SUPPORT'), 'help');
     $shortEdition = '';
     $xml = array();
     // Get messages
     $msgs = '';
     $msgs = $objJSNMsg->getList('HELP_AND_SUPPORT');
     $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     $xml = $objJSNXML->parserXMLDetails();
     $shortEdition = $objJSNUtils->getShortEdition();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->assignRef('xml', $xml);
     $this->assignRef('shortEdition', $shortEdition);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
示例#10
0
 /**
  * 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 an Exception object.
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $session = JFactory::getSession();
     $objJSNEasySliderSliders = new JSNEasySliderSliders();
     $totalSliders = $objJSNEasySliderSliders->countSilderItems();
     $layout = $this->getLayout();
     $this->totalSliders = $totalSliders;
     /*Check if it is FREE edition then show warning message to alert that FREE edition only allows create maximum of 3 sliders*/
     $this->edition = defined('JSN_EASYSLIDER_EDITION') ? JSN_EASYSLIDER_EDITION : "free";
     if (strtolower($this->edition) == 'free') {
         if ($totalSliders !== false && $totalSliders >= 3) {
             if ($layout == 'default') {
                 JFactory::getApplication()->enqueueMessage(JText::_('JSN_EASYSLIDER_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_SLIDERS_IN_FREE_EDITION'), 'warning');
             }
         }
     }
     if ($session->has('JSN_EASYSLIDER_BACKUP_OLD_DATA_PATH') && (string) $session->get('JSN_EASYSLIDER_BACKUP_OLD_DATA_PATH') != '') {
         JFactory::getApplication()->enqueueMessage('The data backup file of version 1.x.x has been created from the update process. You can download it <a href="' . JUri::root() . str_replace(JPATH_ROOT . '/', '', (string) $session->get('JSN_EASYSLIDER_BACKUP_OLD_DATA_PATH')) . '"><strong>here<strong></a>', 'notice');
     }
     // Set the toolbar
     JToolbarHelper::title(JText::_('JSN_EASYSLIDER_SLIDERS'));
     // Add toolbar menu
     JToolbarHelper::addNew('slider.add', 'JSN_EASYSLIDER_CREATE_NEW');
     JToolbarHelper::editList('slider.edit', 'JTOOLBAR_EDIT');
     JToolbarHelper::custom('sliders.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     JToolbarHelper::divider();
     JToolbarHelper::publish('sliders.publish');
     JToolbarHelper::unpublish('sliders.unpublish');
     JToolbarHelper::divider();
     JToolbarHelper::deleteList('JSN_EASYSLIDER_CONFIRM_DELETE', 'sliders.delete', 'JTOOLBAR_DELETE');
     //        JToolbarHelper::preferences();
     //        JToolbarHelper::help();
     JToolbarHelper::custom('', ' jsnes-import fa fa-download', ' jsnes-import fa fa-download', 'JSN_EASYSLIDER_IMPORT');
     JToolbarHelper::custom('', ' jsnes-export fa fa-upload', ' jsnes-export fa fa-upload', 'JSN_EASYSLIDER_EXPORT');
     JToolbarHelper::divider();
     JSNEasySliderHelper::addToolbarMenu();
     // Set the submenu
     //        JSNEasySliderHelper::addSubmenu('sliders');
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('SLIDERS');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     $this->sliders = $objJSNEasySliderSliders->getSlidersWithoutState();
     // Assign variables for rendering
     $this->msgs = $msgs;
     $this->objJSNEasySliderSliders = $objJSNEasySliderSliders;
     // Add assets
     JSNEasySliderHelper::addAssets();
     $this->_addAssets();
     // Display the template
     parent::display($tpl);
 }
示例#11
0
 /**
  * Display method
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get('com_poweradmin');
     $this->_document = JFactory::getDocument();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_POWERADMIN_CONFIGURATION_TITLE'), 'maintenance');
     $this->_addAssets();
     // Display the template
     parent::display($tpl);
 }
示例#12
0
 /**
  * Display method
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JToolBarHelper::title(JText::_('JSN_PAGEBUILDER_ABOUT'), 'about');
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the template
     parent::display($tpl);
 }
示例#13
0
 /**
  * Display method
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JToolBarHelper::title(JText::_('JSN_POWERADMIN_ABOUT_TITLE'), 'about');
     //PoweradminHelper::addSubmenu(JRequest::getCmd('view'));
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the template
     parent::display($tpl);
 }
示例#14
0
 public function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_PAGEBUILDER_BUILDER_UPDATE_TITLE'));
     // Add assets
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-gui.css');
     $redirAfterFinish = 'index.php?option=com_pagebuilder&view=about';
     $this->assign('redirAfterFinish', $redirAfterFinish);
     // Display the template
     parent::display($tpl);
 }
示例#15
0
 /**
  * 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();
 }
示例#16
0
 /**
  * Method for display page.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Check if JSN Mobilize is configured correctly
     if ($config->get('link_mobile') == 'm.domain.tld' or $config->get('link_tablet') == 'tablet.domain.tld') {
         // Redirect to configuration page
         return JFactory::getApplication()->redirect(JRoute::_('index.php?option=' . JFactory::getApplication()->input->getCmd('option')));
     } else {
         // Call parent method
         parent::display($cachable, $urlparams);
     }
 }
示例#17
0
 public function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_POWERADMIN_UPDATE_TITLE'));
     // Add assets
     $document = JFactory::getDocument();
     JSNHtmlAsset::addStyle(PoweradminHelper::makeUrlWithSuffix(JSN_URL_ASSETS . '/joomlashine/css/jsn-gui.css'));
     $redirAfterFinish = 'index.php?option=com_poweradmin&view=about';
     $this->assign('redirAfterFinish', $redirAfterFinish);
     // Display the template
     parent::display($tpl);
 }
示例#18
0
 /**
  * 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);
 }
示例#19
0
 protected function getInput()
 {
     jimport('administrator.components.com_pagebuilder.helpers.pagebuilder');
     $config = JSNConfigHelper::get('com_pagebuilder');
     $extSupports = JSNPagebuilderHelpersPagebuilder::getExtensionSupports();
     if (count(@$config->extension_support_order)) {
         $extSupportOrder = explode(",", $config->extension_support_order);
         // Add new if it not exist in database
         if (count($extSupports)) {
             foreach ($extSupports as $support) {
                 if (!in_array($support, $extSupportOrder)) {
                     array_push($extSupportOrder, $support);
                 }
             }
         }
     } else {
         $extSupportOrder = $extSupports;
     }
     if ((string) $this->value != '') {
         $selectedExtension = json_decode($this->value);
     } else {
         $selectedExtension = JSNPagebuilderHelpersPagebuilder::getExtensionSupports(false);
     }
     $html[] = '<ul class="sortable">';
     foreach ($extSupportOrder as $support) {
         if ($support) {
             if (strpos($support, JSN_PAGEBUILDER_3RD_EXTENSION_STRING) != false && !count(JPluginHelper::getPlugin('pagebuilder', str_replace(JSN_PAGEBUILDER_3RD_EXTENSION_STRING . '-', '', $support)))) {
                 continue;
             } else {
                 $checked = in_array($support, $selectedExtension) ? 'checked' : '';
                 /*if($config->extension_support == null){
                       $checked = '';
                   }*/
                 $html[] = '<li class="item" id="' . $support . '">
                 <ins class="sortable-handle"></ins>
                 <label class="checkbox">
                 <input type="checkbox" name="' . $this->name . '" value="' . $support . '" ' . $checked . '/>
                 ' . JText::_('JSN_PAGEBUILDER_SUPPORT_' . str_ireplace(JSN_PAGEBUILDER_3RD_EXTENSION_STRING . '-', '', strtoupper($support))) . '
                 </label>
                 <div class="clearbreak"></div>
                 </li>';
             }
         }
     }
     $html[] = '</ul>';
     $html[] = '<input type="hidden" value="' . implode(',', $extSupportOrder) . '" id="params_extension_support_order" name="jsnconfig[extension_support_order]" />';
     return implode($html);
 }
 protected function getInput()
 {
     JSNFactory::localimport('helpers.poweradmin');
     $config = JSNConfigHelper::get('com_poweradmin');
     $searchCoverages = PoweradminHelper::getSearchCoverages();
     if (isset($config->search_coverage_order)) {
         $searchCoveragesOrder = explode(",", $config->search_coverage_order);
         // Add new coverage if it did not
         // exist in database
         if (count($searchCoverages)) {
             foreach ($searchCoverages as $coverage) {
                 if (!in_array($coverage, $searchCoveragesOrder)) {
                     array_push($searchCoveragesOrder, $coverage);
                 }
             }
         }
     } else {
         $searchCoveragesOrder = $searchCoverages;
     }
     // $selectedCoverages = $this->item->get('search_coverage', $searchCoverages);
     if ($this->value) {
         $selectedCoverages = json_decode($this->value);
     } else {
         $selectedCoverages = PoweradminHelper::getSearchCoverages(false);
     }
     $html[] = '<ul class="sortable">';
     foreach ($searchCoveragesOrder as $coverage) {
         if ($coverage) {
             if (strpos($coverage, JSN_3RD_EXTENSION_STRING) !== false && !count(JPluginHelper::getPlugin('jsnpoweradmin', str_replace(JSN_3RD_EXTENSION_STRING . '-', '', $coverage)))) {
                 continue;
             } else {
                 $checked = in_array($coverage, $selectedCoverages) ? 'checked' : '';
                 $html[] = '<li class="item" id="' . $coverage . '">
     			<ins class="sortable-handle"></ins>
     			<label class="checkbox">
     			<input type="checkbox" name="' . $this->name . '" value="' . $coverage . '" ' . $checked . ' />
     			' . JText::_('JSN_POWERADMIN_COVERAGE_' . str_ireplace(JSN_3RD_EXTENSION_STRING . '-', '', strtoupper($coverage))) . '
     			</label>
     			<div class="clearbreak"></div>
     			</li>';
             }
         }
     }
     $html[] = '</ul>';
     $html[] = '<input type="hidden" value="' . implode(',', $searchCoveragesOrder) . '" id="params_search_coverage_order" name="jsnconfig[search_coverage_order]" />';
     return implode($html);
 }
示例#21
0
 /**
  * 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)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('MAINTENANCE_CONFIGURATION_AND_MAINTENANCE'), 'maintenance');
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION_AND_MAINTENANCE');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Type of screen
     $type = JRequest::getWord('type', 'backup');
     $themeName = JRequest::getWord('theme_name');
     $sourceType = JRequest::getString('source_type');
     switch ($type) {
         case 'themeparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $themeName . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('theme_config');
             break;
         case 'profileparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('source_config');
             break;
         case 'editprofile':
             $sourceID = JRequest::getInt('external_source_id');
             $countShowlist = JRequest::getInt('count_showlist');
             $imageSource = JSNISFactory::getSource($sourceType, 'external');
             $imageSource->_source['sourceTable']->load($sourceID);
             $this->assignRef('sourceInfo', $imageSource->_source['sourceTable']);
             $this->assignRef('countShowlist', $countShowlist);
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . 'source' . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('edit_source_profile');
             break;
         default:
             // Display the template
             parent::display($tpl);
             break;
     }
 }
 /**
  * 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)
 {
     $config = JSNConfigHelper::get();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('LAUNCHPAD');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     $presentationMethods = array('0' => array('value' => '', 'text' => '- ' . JText::_('JSN_UNIFORM_LAUNCHPAD_SELECT_PRESENTATION_METHOD') . ' -'), '1' => array('value' => 'menu', 'text' => JText::_('JSN_UNIFORM_LAUNCHPAD_VIA_MENU_ITEM_COMPONENT')), '2' => array('value' => 'module', 'text' => JText::_('JSN_UNIFORM_LAUNCHPAD_IN_MODULE_POSITION_MODULE')), '3' => array('value' => 'plugin', 'text' => JText::_('JSN_UNIFORM_LAUNCHPAD_INSIDE_ARTICLE_CONTENT_PLUGIN')));
     $this->presentationMethods = JHTML::_('select.genericList', $presentationMethods, 'presentation_method', 'disabled="disabled"' . '', 'value', 'text', "");
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->addToolbar();
     parent::display($tpl);
     $this->_addAssets();
 }
示例#23
0
 /**
  * Display method
  *
  * @param   string $tpl The name of the template file to parse; automatically searches through the template paths.
  *
  * @return    void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolbarHelper::title(JText::_('JSN_PAGEBUILDER_BUILDER_SETTING_TITLE'));
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     JSNHtmlAsset::addStyle(JSNPB_PLG_SYSTEM_ASSETS_URL . '/css/pagebuilder.css');
     JSNHtmlAsset::addStyle(JSNPB_ADMIN_URL . '/assets/css/configurations.css');
     JSNHtmlAsset::addScript(JSNPB_FRAMEWORK_ASSETS . '/3rd-party/jquery/jquery.min.js');
     JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-ui/js/jquery-ui-1.10.3.custom.js');
     JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-livequery/jquery.livequery.min.js');
     JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . 'js/joomlashine.noconflict.js');
     JSNHtmlAsset::addScript(JSNPB_ASSETS_URL . 'js/config.js');
     // Display the template
     parent::display($tpl);
 }
示例#24
0
 /**
  * Display method
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Add assets
     $this->_document = JFactory::getDocument();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
示例#25
0
 /**
  * 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_UNIFORM_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
     JSNUniformHelper::addAssets();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the template
     parent::display($tpl);
 }
示例#26
0
 /**
  * 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 parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_UNIFORM_UPGRADE_PRODUCT'));
     // Load assets
     JSNUniformHelper::addAssets();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the template
     parent::display($tpl);
 }
示例#27
0
 public static function getExtensionSupports($includeExtPlgs = true)
 {
     $config = JSNConfigHelper::get('com_pagebuilder');
     $extSupportOrder = json_decode($config->extension_support);
     $com_advancedmodules = JSNPagebuilderHelpersPagebuilder::checkComponentEnabled('com_advancedmodules') ? array('com_advancedmodules') : '';
     $flexiContent = JSNPagebuilderHelpersPagebuilder::checkComponentEnabled('com_flexicontent') ? array('com_flexicontent') : '';
     $extensions = array();
     if (count($extSupportOrder) > 0) {
         $configExtensions = json_decode($config->extension_support);
         $configExtensionsOrder = explode(",", $config->extension_support_order);
         if (count($configExtensionsOrder) > 0) {
             foreach ($configExtensionsOrder as $_exts) {
                 if (in_array($_exts, $configExtensions)) {
                     array_push($extensions, $_exts);
                 }
             }
         } else {
             $extensions = $configExtensions;
         }
     } else {
         $extensions = array('com_content', 'com_modules');
         if ($com_advancedmodules != '') {
             $extensions = array_merge($extensions, $com_advancedmodules);
         }
         if ($flexiContent != '') {
             $extensions = array_merge($extensions, $flexiContent);
         }
         if ($includeExtPlgs) {
             include_once JPATH_ROOT . '/administrator/components/com_pagebuilder/helpers/extensions.php';
             $installedComponents = self::getInstalledComponents();
             $supportList = JSNPagebuilderHelpersExtensions::getSupportedExtList();
             if (count($supportList)) {
                 foreach ($supportList as $extName => $value) {
                     if (in_array($extName, $installedComponents)) {
                         $extensions[] = $value->extension;
                     }
                 }
             }
         }
     }
     return $extensions;
 }
 /**
  * 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 an Exception object.
  */
 function display($tpl = null)
 {
     try {
         $this->state = $this->get('State');
         $this->slider = $this->get('Item');
         $this->form = $this->get('Form');
     } catch (Exception $e) {
         throw $e;
     }
     $config = JSNConfigHelper::get();
     // Get input object
     $input = JFactory::getApplication()->input;
     if (empty($this->slider->slider_id)) {
         $objJSNEasySliderSliders = new JSNEasySliderSliders();
         $totalSliders = $objJSNEasySliderSliders->countSilderItems();
         /*Check if it is FREE edition then show warning message to alert that FREE edition only allows create maximum of 3 sliders*/
         $edition = defined('JSN_EASYSLIDER_EDITION') ? JSN_EASYSLIDER_EDITION : "free";
         if (strtolower($edition) == 'free') {
             if ($totalSliders !== false && $totalSliders >= 3) {
                 JFactory::getApplication()->redirect('index.php?option=com_easyslider&view=sliders');
                 return false;
             }
         }
     }
     // Setup toolbar
     $input->set('hidemainmenu', true);
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('SLIDER');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_EASYSLIDER_EDIT_PRODUCT'));
     // Add assets
     JSNEasySliderHelper::addAssets();
     $this->objUtils = new JSNEasySliderUtils();
     // Display the template
     parent::display($tpl);
 }
示例#29
0
 /**
  * Display method
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_SAMPLE_UPDATE_PRODUCT'));
     // Add assets
     $this->_document = JFactory::getDocument();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
示例#30
0
 /**
  * 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)
 {
     $objJSNMsg = JSNISFactory::getObj('classes.jsn_is_message');
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     //JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('ABOUT_ABOUT'), 'about');
     // Get messages
     $msgs = '';
     $msgs = $objJSNMsg->getList('ABOUT');
     $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }