• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JHelperContent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addToolbar

 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_finder');
     JToolbarHelper::title(JText::_('COM_FINDER_MAPS_TOOLBAR_TITLE'), 'zoom-in finder');
     $toolbar = JToolbar::getInstance('toolbar');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('maps.publish');
         JToolbarHelper::unpublishList('maps.unpublish');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_finder');
     }
     JToolbarHelper::divider();
     $toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_CONTENT_MAPS');
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'maps.delete');
         JToolbarHelper::divider();
     }
     JHtmlSidebar::setAction('index.php?option=com_finder&view=maps');
     JHtmlSidebar::addFilter('', 'filter_branch', JHtml::_('select.options', JHtml::_('finder.mapslist'), 'value', 'text', $this->state->get('filter.branch')), true);
     JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
 }
开发者ID:educakanchay,项目名称:educared,代码行数:32,代码来源:view.html.php


示例2: getActions

 /**
  * Gets a list of the actions that can be performed.
  *
  * @param   string   $extension   The extension.
  * @param   integer  $categoryId  The category ID.
  *
  * @return  JObject
  *
  * @since   1.6
  * @deprecated  3.2  Use JHelperContent::getActions() instead
  */
 public static function getActions($extension, $categoryId = 0)
 {
     // Log usage of deprecated function
     JLog::add(__METHOD__ . '() is deprecated, use JHelperContent::getActions() with new arguments order instead.', JLog::WARNING, 'deprecated');
     // Get list of actions
     return JHelperContent::getActions($extension, 'category', $categoryId);
 }
开发者ID:ITPrism,项目名称:GamificationDistribution,代码行数:18,代码来源:categories.php


示例3: addToolbar

 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_finder');
     JToolbarHelper::title(JText::_('COM_FINDER_FILTERS_TOOLBAR_TITLE'), 'zoom-in finder');
     $toolbar = JToolbar::getInstance('toolbar');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('filter.add');
         JToolbarHelper::editList('filter.edit');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('filters.publish');
         JToolbarHelper::unpublishList('filters.unpublish');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_finder');
     }
     JToolbarHelper::divider();
     $toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'filters.delete');
         JToolbarHelper::divider();
     }
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:34,代码来源:view.html.php


示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_templates');
     JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'eye thememanager');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('style.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'styles.delete');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_templates');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES');
     JHtmlSidebar::setAction('index.php?option=com_templates&view=styles');
 }
开发者ID:SysBind,项目名称:joomla-cms,代码行数:33,代码来源:view.html.php


示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_digicom', 'category', $this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'stack product');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_digicom', 'core.create')) > 0) {
         //JToolbarHelper::addNew('product.add');
         $layout = new JLayoutFile('toolbar.products');
         $bar->appendButton('Custom', $layout->render(array()), 'products');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('products.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('products.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         //JToolbarHelper::custom('products.featured', 'featured.png', 'featured_f2.png', 'JFEATURE', true);
         //JToolbarHelper::custom('products.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true);
         //JToolbarHelper::archiveList('products.archive');
         //JToolbarHelper::checkin('products.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'products.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('products.trash');
     }
     // Instantiate a new JLayoutFile instance and render the layout
     $layout = new JLayoutFile('toolbar.title');
     $title = array('title' => JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'class' => 'product');
     $bar->appendButton('Custom', $layout->render($title), 'title');
     $layout = new JLayoutFile('toolbar.settings');
     $bar->appendButton('Custom', $layout->render(array()), 'settings');
 }
开发者ID:Shtier,项目名称:digicom,代码行数:37,代码来源:view.html.php


示例6: display

 /**
  * 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 Error object.
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $input = JFactory::getApplication()->input;
         $eName = $input->getCmd('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         $document = JFactory::getDocument();
         $document->setTitle(JText::_('COM_KNVBAPI_PAGEBREAK_DOC_TITLE'));
         $this->eName =& $eName;
         parent::display($tpl);
         return;
     }
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->can_do = JHelperContent::getActions('com_knvbapi', 'team', $this->item->id);
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     if ($this->getLayout() == 'modal') {
         $this->form->setFieldAttribute('language', 'readonly', 'true');
     }
     $this->addToolbar();
     $this->prepareDocument();
     parent::display($tpl);
 }
开发者ID:esorone,项目名称:efcpw,代码行数:36,代码来源:view.html.php


示例7: addToolbar

 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_jvisualcontent');
     $user = JFactory::getUser();
     JToolbarHelper::title(JText::_('COM_JVISUALCONTENT_EXTRAFIELDS_MANAGER'));
     // Create new button
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('extrafield.add');
         JToolbarHelper::divider();
     }
     // Create edit button
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolbarHelper::editList('type.edit');
     }
     // Create publish, unpublish buttons
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('extrafields.publish');
         JToolbarHelper::unpublish('extrafields.unpublish');
         JToolbarHelper::divider();
     }
     if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete')) {
         JToolbarHelper::deleteList('', 'extrafields.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('extrafields.trash');
     }
     // Create options button
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_jvisualcontent');
     }
     if (version_compare(JVERSION, '3.0', '>=')) {
         $fieldsType = array('textfield' => JText::_('COM_JVISUALCONTENT_TEXT_FIELD'), 'textarea' => JText::_('COM_JVISUALCONTENT_TEXTAREA'), 'select' => JText::_('COM_JVISUALCONTENT_DROPDOWN_SELECT'), 'multiselect' => JText::_('COM_JVISUALCONTENT_DROPDOWN_LIST'), 'radio' => JText::_('COM_JVISUALCONTENT_RADIO'), 'checkbox' => JText::_('COM_JVISUALCONTENT_CHECKBOX'), 'editor' => JText::_('COM_JVISUALCONTENT_EDITOR'), 'calendar' => JText::_('COM_JVISUALCONTENT_CALENDAR'), 'file' => JText::_('COM_JVISUALCONTENT_FILE'));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('archived' => false)), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_JVISUALCONTENT_OPTION_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', $fieldsType, 'value', 'text', $this->state->get('filter.type')));
     }
 }
开发者ID:Glonum,项目名称:tz_portfolio,代码行数:35,代码来源:view.html.php


示例8: getList

 public static function getList(&$params)
 {
     $db = JFactory::getDbo();
     $user = JFactory::getUser();
     $groups = implode(',', $user->getAuthorisedViewLevels());
     $timeframe = $params->get('timeframe', 'alltime');
     $maximum = $params->get('maximum', 5);
     $order_value = $params->get('order_value', 'count');
     if ($order_value == 'rand()') {
         $order_direction = '';
     } else {
         $order_value = $db->quoteName($order_value);
         $order_direction = $params->get('order_direction', 1) ? 'DESC' : 'ASC';
     }
     $query = $db->getQuery(true)->select(array('MAX(' . $db->quoteName('tag_id') . ') AS tag_id', ' COUNT(*) AS count', 'MAX(t.title) AS title', 'MAX(' . $db->quoteName('t.access') . ') AS access', 'MAX(' . $db->quoteName('t.alias') . ') AS alias'))->group($db->quoteName(array('tag_id', 'title', 'access', 'alias')))->from($db->quoteName('#__contentitem_tag_map'))->where($db->quoteName('t.access') . ' IN (' . $groups . ')');
     // Only return published tags
     $query->where($db->quoteName('t.published') . ' = 1 ');
     // Optionally filter on language
     $language = JComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all');
     if ($language != 'all') {
         if ($language == 'current_language') {
             $language = JHelperContent::getCurrentLanguage();
         }
         $query->where($db->quoteName('t.language') . ' IN (' . $db->quote($language) . ', ' . $db->quote('*') . ')');
     }
     if ($timeframe != 'alltime') {
         $now = new JDate();
         $query->where($db->quoteName('tag_date') . ' > ' . $query->dateAdd($now->toSql('date'), '-1', strtoupper($timeframe)));
     }
     $query->join('INNER', $db->quoteName('#__tags', 't') . ' ON ' . $db->quoteName('tag_id') . ' = t.id')->order($order_value . ' ' . $order_direction);
     $db->setQuery($query, 0, $maximum);
     $results = $db->loadObjectList();
     return $results;
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:34,代码来源:helper.php


示例9: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $eName = JRequest::getVar('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         $document = JFactory::getDocument();
         $document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
         $this->eName =& $eName;
         parent::display($tpl);
         return;
     }
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->canDo = JHelperContent::getActions($this->state->get('filter.category_id'), 0, 'com_content');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     if ($this->getLayout() == 'modal') {
         $this->form->setFieldAttribute('language', 'readonly', 'true');
         $this->form->setFieldAttribute('catid', 'readonly', 'true');
     }
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:31,代码来源:view.html.php


示例10: addToolbar

 /**
  * Display the toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $input = JFactory::getApplication()->input;
     $input->set('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     // Since we don't track these assets at the item level, use the category id.
     $canDo = JHelperContent::getActions('com_users', 'category', $this->item->catid);
     JToolbarHelper::title(JText::_('COM_USERS_NOTES'), 'users user');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_users', 'core.create')))) {
         JToolbarHelper::apply('note.apply');
         JToolbarHelper::save('note.save');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_users', 'core.create'))) {
         JToolbarHelper::save2new('note.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && count($user->getAuthorisedCategories('com_users', 'core.create')) > 0) {
         JToolbarHelper::save2copy('note.save2copy');
     }
     if (empty($this->item->id)) {
         JToolbarHelper::cancel('note.cancel');
     } else {
         if ($this->state->params->get('save_history', 0) && $canDo->get('core.edit')) {
             JToolbarHelper::versions('com_users.note', $this->item->id);
         }
         JToolbarHelper::cancel('note.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_USERS_USER_NOTES_EDIT');
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:40,代码来源:view.html.php


示例11: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_PROFILES'), 'users profiles');
     if (in_array('profiles', $this->permissions)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('profile.add');
         }
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('profile.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('profiles.checkin');
             }
             if ($canDo->get('core.delete')) {
                 JToolbarHelper::deleteList('', 'profiles.delete');
             }
             // Add a batch button for Merge Files
             if (JFactory::getUser()->get('isRoot')) {
                 JToolbarHelper::modal('collapseModal', 'icon-users', JText::_('COM_SIBDIET_TOOLBAR_MERGE_FILES'));
             }
         }
     }
     JToolBarHelper::help('screen.profiles', true);
 }
开发者ID:smhnaji,项目名称:sdnet,代码行数:35,代码来源:view.html.php


示例12: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     // Since we don't track these assets at the item level, use the category id.
     $canDo = JHelperContent::getActions('com_edashboard', 'category', $this->item->catid);
     JToolbarHelper::title(JText::_('COM_EDASHBOARD_MANAGER_POST'), 'post edashboard');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_edashboard', 'core.create')) > 0)) {
         JToolbarHelper::apply('post.apply');
         JToolbarHelper::save('post.save');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_edashboard', 'core.create')) > 0) {
         JToolbarHelper::save2new('post.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('post.save2copy');
     }
     if (empty($this->item->id)) {
         JToolbarHelper::cancel('post.cancel');
     } else {
         JToolbarHelper::cancel('post.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_ACT_EDIT');
 }
开发者ID:site4com,项目名称:acts,代码行数:34,代码来源:view.html.php


示例13: addToolbar

 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $doc = JFactory::getDocument();
     $bar = JToolBar::getInstance();
     $user = JFactory::getUser();
     $canDo = JHelperContent::getActions('com_tz_portfolio_plus');
     $isNew = $this->item->id == 0;
     JToolBarHelper::title(JText::sprintf('COM_TZ_PORTFOLIO_PLUS_TEMPLATES_MANAGER_TASK', JText::_($isNew ? 'COM_TZ_PORTFOLIO_PLUS_PAGE_ADD_TEMPLATE' : 'COM_TZ_PORTFOLIO_PLUS_PAGE_EDIT_TEMPLATE')), 'palette');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('template_style.apply');
         JToolBarHelper::save('template_style.save');
     }
     // If checked out, we can still save
     if (!$isNew && $user->authorise('core.edit.state', 'com_tz_portfolio_plus')) {
         JToolBarHelper::save2copy('template_style.save2copy');
     }
     JToolBarHelper::cancel('template_style.cancel', JText::_('JTOOLBAR_CLOSE'));
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER', false, 'http://wiki.templaza.com/TZ_Portfolio_Plus_v3:Administration#How_to_Add_or_Edit_3');
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/fonts/font-awesome-4.5.0/css/font-awesome.min.css');
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/css/style.min.css');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_WIKIPEDIA_TUTORIALS');
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
 }
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:33,代码来源:view.html.php


示例14: installPaExtension

 public function installPaExtension()
 {
     $this->model = $this->getModel('installer');
     $canDo = JHelperContent::getActions('com_installer');
     if ($canDo->get('core.manage')) {
         try {
             $rs = $this->model->download();
             $this->input->set('package', $rs);
             // Set extension parameters
             $_GET['package'] = $rs;
             $_GET['type'] = 'plugin';
             $_GET['folder'] = 'jsnpoweradmin';
             $_GET['publish'] = 1;
             $_GET['client'] = 'site';
             $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
             if ($this->model->install($rs)) {
                 require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/extensions.php';
                 // Enable extension suport
                 $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
                 try {
                     JSNPaExtensionsHelper::enableExt($identifiedName);
                 } catch (Exception $ex) {
                     exit('notenabled');
                 }
             }
         } catch (Exception $ex) {
             exit($ex->getMessage());
         }
         exit('success');
     }
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:31,代码来源:installer.php


示例15: addToolbar

 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions($this->option, $this->edit_view, $this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolbarHelper::title(ucfirst($this->view), 'address contact');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories($this->option, 'core.create')) > 0) {
         JToolbarHelper::addNew($this->edit_view . '.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolbarHelper::editList($this->edit_view . '.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish($this->view . '.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish($this->view . '.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($user->authorise('core.create', $this->option) && $user->authorise('core.edit', $this->option) && $user->authorise('core.edit.state', $this->option)) {
         $title = JText::_('JTOOLBAR_BATCH');
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', $this->view . '.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::deleteList($this->option, $this->view . '.delete', 'Delete');
     }
     if ($user->authorise('core.admin', $this->option) || $user->authorise('core.options', $this->option)) {
         JToolbarHelper::preferences($this->option);
     }
     JHtmlSidebar::setAction('index.php?option=' . $this->option);
 }
开发者ID:baxri,项目名称:presents,代码行数:30,代码来源:view.html.php


示例16: addToolbar

 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_finder');
     JToolbarHelper::title(JText::_('COM_FINDER_INDEX_TOOLBAR_TITLE'), 'zoom-in finder');
     $toolbar = JToolbar::getInstance('toolbar');
     $toolbar->appendButton('Popup', 'archive', 'COM_FINDER_INDEX', 'index.php?option=com_finder&view=indexer&tmpl=component', 500, 210, 0, 0, 'window.parent.location.reload()', 'COM_FINDER_HEADING_INDEXER');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('index.publish');
         JToolbarHelper::unpublishList('index.unpublish');
     }
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'index.delete');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('index.purge', 'COM_FINDER_INDEX_TOOLBAR_PURGE', false);
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_finder');
     }
     $toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_INDEXED_CONTENT');
     JHtmlSidebar::setAction('index.php?option=com_finder&view=index');
     JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_TYPE_FILTER'), 'filter_type', JHtml::_('select.options', JHtml::_('finder.typeslist'), 'value', 'text', $this->state->get('filter.type')));
 }
开发者ID:01J,项目名称:skazkipronebo,代码行数:32,代码来源:view.html.php


示例17: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_messages');
     JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'envelope inbox');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ', true);
         JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD', true);
     }
     JToolbarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Popup', 'cog', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&amp;view=config&amp;tmpl=component', 500, 250, 0, 0, '', '', '<button class="btn" type="button" data-dismiss="modal" aria-hidden="true">' . JText::_('JCANCEL') . '</button>' . '<button class="btn btn-success" type="button" data-dismiss="modal" aria-hidden="true"' . ' onclick="jQuery(\'#modal-cog iframe\').contents().find(\'#saveBtn\').click();">' . JText::_('JSAVE') . '</button>');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::divider();
         JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::trash('messages.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_messages');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
开发者ID:SysBind,项目名称:joomla-cms,代码行数:36,代码来源:view.html.php


示例18: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     // Since we don't track these assets at the item level, use the category id.
     $canDo = JHelperContent::getActions('com_banners', 'category', $this->item->catid);
     JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'bookmark banners');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) {
         JToolbarHelper::apply('banner.apply');
         JToolbarHelper::save('banner.save');
         if ($canDo->get('core.create')) {
             JToolbarHelper::save2new('banner.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('banner.save2copy');
     }
     if (empty($this->item->id)) {
         JToolbarHelper::cancel('banner.cancel');
     } else {
         if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) {
             JToolbarHelper::versions('com_banners.banner', $this->item->id);
         }
         JToolbarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT');
 }
开发者ID:n3t,项目名称:joomla-cms,代码行数:40,代码来源:view.html.php


示例19: addToolbar

 /**
  * Adds the page title and toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     // Get the results for each action
     $canDo = JHelperContent::getActions('com_languages');
     JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'comments-2 langmanager');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('override.add');
     }
     if ($canDo->get('core.edit') && $this->pagination->total) {
         JToolbarHelper::editList('override.edit');
     }
     if ($canDo->get('core.delete') && $this->pagination->total) {
         JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'overrides.delete', 'JTOOLBAR_DELETE');
     }
     if (JFactory::getUser()->authorise('core.admin')) {
         JToolbarHelper::custom('overrides.purge', 'refresh.png', 'refresh_f2.png', 'COM_LANGUAGES_VIEW_OVERRIDES_PURGE', false);
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_languages');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES');
     JHtmlSidebar::setAction('index.php?option=com_languages&view=overrides');
     JHtmlSidebar::addFilter('', 'filter_language_client', JHtml::_('select.options', $this->languages, null, 'text', $this->state->get('filter.language_client')), true);
     $this->sidebar = JHtmlSidebar::render();
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:33,代码来源:view.html.php


示例20: addToolbar

 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_localise', 'component');
     JToolBarHelper::title(JText::sprintf('COM_LOCALISE_HEADER_MANAGER', JText::_('COM_LOCALISE_HEADER_PACKAGES')), 'install');
     if ($canDo->get('localise.create')) {
         JToolbarHelper::addNew('package.add');
     }
     if ($canDo->get('localise.edit')) {
         JToolbarHelper::editList('package.edit');
     }
     if ($canDo->get('localise.create') || $canDo->get('localise.edit')) {
         JToolbarHelper::divider();
     }
     if ($canDo->get('localise.delete')) {
         JToolbarHelper::deleteList('COM_LOCALISE_MSG_PACKAGES_VALID_DELETE', 'packages.delete');
         JToolBarHelper::divider();
     }
     JToolBarHelper::custom('package.download', 'out.png', 'out.png', 'JTOOLBAR_EXPORT', true);
     JToolBarHelper::divider();
     JToolBarHelper::custom('package.language', 'archive.png', 'archive.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_LANGUAGE', true);
     JToolbarHelper::divider();
     if ($canDo->get('package.batch')) {
         JToolBarHelper::custom('package.batch', 'refresh.png', 'refresh.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_BATCH', true);
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_localise');
         JToolbarHelper::divider();
     }
     JToolBarHelper::help('screen.packages', true);
 }
开发者ID:svenbluege,项目名称:com_localise,代码行数:31,代码来源:view.html.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JHelperTags类代码示例发布时间:2022-05-23
下一篇:
PHP JHelp类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap