当前位置: 首页>>代码示例>>PHP>>正文


PHP Sh404sefHelperGeneral::getJoomlaVersionPrefix方法代码示例

本文整理汇总了PHP中Sh404sefHelperGeneral::getJoomlaVersionPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP Sh404sefHelperGeneral::getJoomlaVersionPrefix方法的具体用法?PHP Sh404sefHelperGeneral::getJoomlaVersionPrefix怎么用?PHP Sh404sefHelperGeneral::getJoomlaVersionPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sh404sefHelperGeneral的用法示例。


在下文中一共展示了Sh404sefHelperGeneral::getJoomlaVersionPrefix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 public function display($tpl = null)
 {
     // version prefix
     $this->joomlaVersionPrefix = Sh404sefHelperGeneral::getJoomlaVersionPrefix();
     // get model and update context with current
     $model = ShlMvcModel_Base::getInstance('urls', 'Sh404sefModel');
     $context = $model->setContext($this->_context . '.' . $this->getLayout());
     // display type: simple for very large sites/slow slq servers
     $sefConfig = Sh404sefFactory::getConfig();
     // store it
     $model = $this->setModel($model, true);
     // read data from model
     $list = $model->getList((object) array('layout' => $this->getLayout(), 'getMetaData' => true, 'simpleUrlList' => true, 'slowServer' => $sefConfig->slowServer));
     // and push it into the view for display
     $this->assign('items', $list);
     $this->assign('itemCount', count($this->items));
     $this->assign('contentcs', Sh404sefHelperGeneral::getDataMD5($this->items, array('metatitle', 'metadesc')));
     $this->assign('pagination', $model->getPagination((object) array('layout' => $this->getLayout(), 'simpleUrlList' => true, 'slowServer' => $sefConfig->slowServer)));
     $options = $model->getDisplayOptions();
     $this->assign('options', $options);
     $this->assign('helpMessage', JText::_('COM_SH404SEF_META_HELP'));
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $document = JFactory::getDocument();
         // add our own css and js
         JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/' . $this->joomlaVersionPrefix . '_list.css');
         JHtml::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/shajax.js');
         JHtml::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/j3.js');
         // add modal css and js
         ShlHtmlBs_helper::addBootstrapCss(JFactory::getDocument());
         ShlHtmlBs_helper::addBootstrapJs(JFactory::getDocument());
         // variable for modal, not used in 3..x+
         $params = array();
         $this->_addFilters();
         // render submenu sidebar
         $this->sidebar = Sh404sefHelperHtml::renderSubmenu();
     } else {
         // add our own css
         JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/' . $this->joomlaVersionPrefix . '_urls.css');
         // link to  custom javascript
         JHtml::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/list.js');
         JHtml::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/metas.js');
         // add behaviors and styles as needed
         $modalSelector = 'a.modalediturl';
         $js = '\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) {parent.window.location=\'' . $this->defaultRedirectUrl . '\';window.parent.shReloadModal=true}}';
         $params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js);
         Sh404sefHelperHtml::modal($modalSelector, $params);
         $this->assign('optionsSelect', $this->_makeOptionsSelect($options));
         // add our own css
         JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');
     }
     // build the toolbar
     $toolbarMethod = '_makeToolbar' . ucfirst($this->getLayout() . ucfirst($this->joomlaVersionPrefix));
     if (is_callable(array($this, $toolbarMethod))) {
         $this->{$toolbarMethod}($params);
     }
     // now display normally
     parent::display($this->joomlaVersionPrefix);
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:58,代码来源:view.html.php

示例2: display

 public function display($tpl = null)
 {
     // version prefix
     $this->joomlaVersionPrefix = Sh404sefHelperGeneral::getJoomlaVersionPrefix();
     $layout = $this->getLayout();
     switch ($layout) {
         case 'qcontrol':
             $this->_doQuickControl($this->joomlaVersionPrefix);
             break;
         default:
             $this->_doDefault($tpl);
             break;
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:14,代码来源:view.raw.php

示例3: getForm

 public function getForm()
 {
     // import com_config model
     $comConfigModel = Sh404sefHelperGeneral::getComConfigComponentModel('com_sh404sef', JPATH_ADMINISTRATOR . '/components/com_sh404sef/configuration');
     $form = $comConfigModel->getForm();
     $component = $comConfigModel->getComponent();
     // version prefix
     $this->joomlaVersionPrefix = Sh404sefHelperGeneral::getJoomlaVersionPrefix();
     $method = '_getByComponentField' . $this->joomlaVersionPrefix;
     // inject the by components part in the form
     $field = $this->{$method}();
     $form->setField($field);
     // inject the languages part in the form
     $method = '_getLanguagesField' . $this->joomlaVersionPrefix;
     $field = $this->{$method}();
     $form->setField($field);
     // inject the current content of the 404 error page as default value in the txt404 form field
     $currentErrorPageContent = $this->_getErrorPageContent();
     $form->setFieldAttribute('txt404', 'default', $currentErrorPageContent);
     // inject analytics group field in form
     $field = $this->_getAnalyticsGroupsField();
     $form->setField($field);
     // merge categories in jooomla tab
     $field = $this->_getCategoriesField();
     $form->setField($field);
     // Bind the form to the data.
     if ($form && $component->params) {
         $form->bind($component->params);
     }
     // make sure Analytics password is not visible in the source code of the page
     $form->setValue('analyticsPassword', null, '********');
     // special processing for various parameters: turn string into an array
     // security
     $form->setValue('shSecOnlyNumVars', null, implode("\n", $form->getValue('shSecOnlyNumVars', null, array())));
     $form->setValue('shSecAlphaNumVars', null, implode("\n", $form->getValue('shSecAlphaNumVars', null, array())));
     $form->setValue('shSecNoProtocolVars', null, implode("\n", $form->getValue('shSecNoProtocolVars', null, array())));
     $form->setValue('ipWhiteList', null, implode("\n", $form->getValue('ipWhiteList', null, array())));
     $form->setValue('ipBlackList', null, implode("\n", $form->getValue('ipBlackList', null, array())));
     $form->setValue('uAgentWhiteList', null, implode("\n", $form->getValue('uAgentWhiteList', null, array())));
     $form->setValue('uAgentBlackList', null, implode("\n", $form->getValue('uAgentBlackList', null, array())));
     // analytics
     $form->setValue('analyticsExcludeIP', null, implode("\n", $form->getValue('analyticsExcludeIP', null, array())));
     // read mobile params from the mobile plugin, not from the component config, which only has a copy
     $plugin = JPluginHelper::getPlugin('system', 'shmobile');
     $params = new JRegistry();
     $params->loadString($plugin->params);
     $form->setValue('mobile_switch_enabled', null, $params->get('mobile_switch_enabled', 0));
     $form->setValue('mobile_template', null, $params->get('mobile_template', ''));
     // inject a link to shLib plugin params for cache settings
     $form->setFieldAttribute('UrlCacheHandlerLink', 'additionaltext', '<span class = "btn sh404sef-textinput"><a href="' . Sh404sefHelperGeneral::getShLibPluginLink() . '" target="_blank">' . JText::_('COM_SH404SEF_CONFIGURE_SHLIB_PLUGIN') . '</a></span>');
     return $form;
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:52,代码来源:configuration.php


注:本文中的Sh404sefHelperGeneral::getJoomlaVersionPrefix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。