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


PHP flexicontent_html::buildauthorsselect方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     global $globalcats;
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $option = JRequest::getVar('option');
     $view = JRequest::getVar('view');
     $document = JFactory::getDocument();
     // Get model
     $model = $this->getModel();
     //JHTML::_('behavior.tooltip');
     JHTML::_('behavior.modal');
     $assocs_id = JRequest::getInt('assocs_id', 0);
     $language = !$assocs_id ? JRequest::getCmd('language') : $app->getUserStateFromRequest($option . '.' . $view . '.language', 'language', '', 'string');
     $created_by = !$assocs_id ? JRequest::getCmd('created_by') : $app->getUserStateFromRequest($option . '.' . $view . '.created_by', 'created_by', 0, 'int');
     if ($assocs_id) {
         $assocanytrans = $user->authorise('flexicontent.assocanytrans', 'com_flexicontent');
         if (!$assocanytrans && !$created_by) {
             $created_by = $user->id;
         }
     }
     // get filter values
     $filter_order = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order', 'filter_order', 'c.lft', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order_Dir', 'filter_order_Dir', '', 'cmd');
     $filter_state = $app->getUserStateFromRequest($option . '.' . $view . '.filter_state', 'filter_state', '', 'cmd');
     $filter_cats = $app->getUserStateFromRequest($option . '.' . $view . '.filter_cats', 'filter_cats', 0, 'int');
     $filter_level = $app->getUserStateFromRequest($option . '.' . $view . '.filter_level', 'filter_level', 0, 'int');
     $filter_access = $app->getUserStateFromRequest($option . '.' . $view . '.filter_access', 'filter_access', '', 'string');
     $filter_lang = $app->getUserStateFromRequest($option . '.' . $view . '.filter_lang', 'filter_lang', '', 'cmd');
     $filter_author = $app->getUserStateFromRequest($option . '.' . $view . '.filter_author', 'filter_author', '', 'cmd');
     $search = $app->getUserStateFromRequest($option . '.' . $view . '.search', 'search', '', 'string');
     $search = $db->escape(trim(JString::strtolower($search)));
     // Prepare the document: set title, add css files, etc
     $document->setTitle(JText::_('FLEXI_SELECTITEM'));
     if ($app->isSite()) {
         $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontent.css', FLEXI_VHASH);
     } else {
         $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css', FLEXI_VHASH);
     }
     flexicontent_html::loadFramework('select2');
     $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css', FLEXI_VHASH);
     // Include backend CSS template CSS file , access to backend folder may not be allowed but ...
     //$template = $app->isSite() ? (!FLEXI_J16GE ? 'khepri' : (FLEXI_J30GE ? 'hathor' : 'bluestork')) : $app->getTemplate();
     //$document->addStyleSheet(JURI::base(true).'/templates/'.$template.(FLEXI_J16GE ? '/css/template.css': '/css/general.css'));
     //Get data from the model
     $rows = $this->get('Items');
     $authors = $this->get('Authorslist');
     $pagination = $this->get('Pagination');
     // Ordering active FLAG
     $ordering = $filter_order == 'c.lft';
     // Parse configuration for every category
     foreach ($rows as $cat) {
         $cat->config = new JRegistry($cat->config);
     }
     // *******************
     // Create Form Filters
     // *******************
     // filter search word
     $lists['search'] = $search;
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // build the categories select list
     $categories = $globalcats;
     $lists['filter_cats'] = '<label class="label">' . JText::_('FLEXI_CATEGORY') . '</label>' . flexicontent_cats::buildcatselect($categories, 'filter_cats', $filter_cats, '-', 'class="use_select2_lib fcfilter_be" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $check_published = true, $check_perms = false);
     // filter depth level
     $depths = array();
     $depths[] = JHtml::_('select.option', '', '-');
     for ($i = 1; $i <= 10; $i++) {
         $depths[] = JHtml::_('select.option', $i, $i);
     }
     $fieldname = $elementid = 'filter_level';
     $attribs = ' class="use_select2_lib fcfilter_be" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" ';
     $lists['filter_level'] = '<label class="label">' . JText::_('FLEXI_MAX_DEPTH') . '</label>' . JHTML::_('select.genericlist', $depths, $fieldname, $attribs, 'value', 'text', $filter_level, $elementid, $translate = true);
     // build author select list
     $lists['filter_author'] = '<label class="label">' . JText::_('FLEXI_AUTHOR') . '</label>' . ($assocs_id && $created_by ? '<span class="badge badge-info">' . JFactory::getUser($created_by)->name . '</span>' : flexicontent_html::buildauthorsselect($authors, 'filter_author', $filter_author, '-', 'class="use_select2_lib fcfilter_be" size="3" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"'));
     // build publication state filter
     $states = JHtml::_('jgrid.publishedOptions');
     array_unshift($states, JHtml::_('select.option', '', '-'));
     $fieldname = $elementid = 'filter_state';
     $attribs = ' class="use_select2_lib fcfilter_be" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" ';
     $lists['filter_state'] = '<label class="label">' . JText::_('FLEXI_STATE') . '</label>' . JHTML::_('select.genericlist', $states, $fieldname, $attribs, 'value', 'text', $filter_state, $elementid, $translate = true);
     // build access level filter
     $levels = JHtml::_('access.assetgroups');
     array_unshift($levels, JHtml::_('select.option', '', '-'));
     $fieldname = $elementid = 'filter_access';
     $attribs = ' class="use_select2_lib fcfilter_be" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" ';
     $lists['filter_access'] = '<label class="label">' . JText::_('FLEXI_ACCESS') . '</label>' . JHTML::_('select.genericlist', $levels, $fieldname, $attribs, 'value', 'text', $filter_access, $elementid, $translate = true);
     // build language filter
     $lists['filter_lang'] = '<label class="label">' . JText::_('FLEXI_LANGUAGE') . '</label>' . ($assocs_id && $language ? '<span class="badge badge-info">' . $language . '</span>' : flexicontent_html::buildlanguageslist('filter_lang', 'class="use_select2_lib fcfilter_be" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $filter_lang, '-'));
     // assign data to template
     $this->assignRef('assocs_id', $assocs_id);
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('ordering', $ordering);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:99,代码来源:view.html.php

示例2: display


//.........这里部分代码省略.........
            $subcats[] = JHTML::_('select.option', 1, JText::_('FLEXI_YES'));
            $lists['filter_subcats'] = JHTML::_('select.genericlist', $subcats, 'filter_subcats', 'size="1" class="use_select2_lib ' . ($filter_subcats != 1 ? '' : ' fc_skip_highlight') . '" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_subcats, 'filter_subcats');
        }
        $lists['filter_subcats'] = ($filter_subcats || 1 ? '<label class="label">' . JText::_('FLEXI_SUBCATEGORIES') . '</label>' : '') . $lists['filter_subcats'];
        // build the include non-published cats boolean list
        $catsinstate[1] = JText::_('FLEXI_PUBLISHED');
        $catsinstate[0] = JText::_('FLEXI_UNPUBLISHED');
        $catsinstate[99] = JText::_('FLEXI_ANY');
        $catsinstate[2] = JText::_('FLEXI_ARCHIVED_STATE');
        $catsinstate[-2] = JText::_('FLEXI_TRASHED_STATE');
        $_catsinstate = array();
        foreach ($catsinstate as $i => $v) {
            $_catsinstate[] = JHTML::_('select.option', $i, $v);
        }
        $lists['filter_catsinstate'] = ($filter_catsinstate || 1 ? '<label class="label">' . JText::_('FLEXI_LIST_ITEMS_IN_CATS') . '</label>' : '') . JHTML::_('select.genericlist', $_catsinstate, 'filter_catsinstate', 'size="1" class="use_select2_lib' . ($filter_catsinstate != 1 ? '' : ' fc_skip_highlight') . '" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_catsinstate, 'filter_catsinstate');
        //$lists['filter_catsinstate'] = JHTML::_('select.radiolist', $_catsinstate, 'filter_catsinstate', 'size="1" class="inputbox" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_catsinstate );
        /*$lists['filter_catsinstate']  = '';
        		foreach ($catsinstate as $i => $v) {
        			$checked = $filter_catsinstate == $i ? ' checked="checked" ' : '';
        			$lists['filter_catsinstate'] .= '<input type="radio" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" class="inputbox" '.$checked.' value="'.$i.'" id="filter_catsinstate'.$i.'" name="filter_catsinstate" />';
        			$lists['filter_catsinstate'] .= '<label class="" id="filter_catsinstate'.$i.'-lbl" for="filter_catsinstate'.$i.'">'.$v.'</label>';
        		}*/
        // build the order type boolean list
        $order_types = array();
        $order_types[] = JHTML::_('select.option', '0', 'FLEXI_ORDER_JOOMLA');
        $order_types[] = JHTML::_('select.option', '1', 'FLEXI_ORDER_FLEXICONTENT');
        //$lists['filter_order_type'] = JHTML::_('select.radiolist', $order_types, 'filter_order_type', 'size="1" class="inputbox" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_order_type );
        $lists['filter_order_type'] = JHTML::_('select.genericlist', $order_types, 'filter_order_type', 'size="1" class="use_select2_lib fc_skip_highlight" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_order_type, 'filter_order_type', $translate = true);
        // build the categories select list for filter
        $lists['filter_cats'] = ($filter_cats || 1 ? '<label class="label">' . JText::_('FLEXI_CATEGORY') . '</label>' : '') . flexicontent_cats::buildcatselect($categories, 'filter_cats', $filter_cats, '-', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $check_published = false, $check_perms = false);
        //build type select list
        $lists['filter_type'] = ($filter_type || 1 ? '<label class="label">' . JText::_('FLEXI_TYPE') . '</label>' : '') . flexicontent_html::buildtypesselect($types, 'filter_type[]', $filter_type, 0, 'class="use_select2_lib fcfilter_be" multiple="multiple" size="3" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'filter_type');
        //build authors select list
        $lists['filter_author'] = ($filter_author || 1 ? '<label class="label">' . JText::_('FLEXI_AUTHOR') . '</label>' : '') . flexicontent_html::buildauthorsselect($authors, 'filter_author[]', $filter_author, 0, 'class="use_select2_lib fcfilter_be" multiple="multiple" size="3" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"');
        if ($badcatitems) {
            $lists['default_cat'] = flexicontent_cats::buildcatselect($categories, 'default_cat', '', 2, 'class="use_select2_lib"', false, false);
        }
        //search filter
        $scopes = array();
        $scopes[1] = JText::_('FLEXI_TITLE');
        $scopes[2] = JText::_('FLEXI_INTROTEXT');
        $scopes[4] = JText::_('FLEXI_INDEXED_CONTENT');
        $_scopes = array();
        foreach ($scopes as $i => $v) {
            $_scopes[] = JHTML::_('select.option', $i, $v);
        }
        //$lists['scope'] = JHTML::_('select.radiolist', $_scopes, 'scope', 'size="1" class="inputbox"', 'value', 'text', $scope );
        $lists['scope'] = JHTML::_('select.genericlist', $_scopes, 'scope', 'size="1" class="use_select2_lib fc_skip_highlight" onchange="jQuery(\'#search\').attr(\'placeholder\', jQuery(this).find(\'option:selected\').text());" title="' . JText::_('FLEXI_SEARCH_TEXT_INSIDE') . '"', 'value', 'text', $scope, 'scope');
        /*$lists['scope']  = '';
        		foreach ($scopes as $i => $v) {
        			$checked = $scope == $i ? ' checked="checked" ' : '';
        			$lists['scope'] .= '<input type="radio" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" class="inputbox" '.$checked.' value="'.$i.'" id="scope'.$i.'" name="scope" />';
        			$lists['scope'] .= '<label class="" id="scope'.$i.'-lbl" for="scope'.$i.'">'.$v.'</label>';
        		}*/
        // build item dates option list
        $dates[1] = JText::_('FLEXI_CREATED');
        $dates[2] = JText::_('FLEXI_REVISED');
        $_dates = array();
        foreach ($dates as $i => $v) {
            $_dates[] = JHTML::_('select.option', $i, $v);
        }
        //$lists['date'] = JHTML::_('select.radiolist', $_dates, 'date', 'size="1" class="inputbox"', 'value', 'text', $date );
        $lists['date'] = '<label class="label">' . JText::_('FLEXI_DATE') . '</label>' . JHTML::_('select.genericlist', $_dates, 'date', 'size="1" class="use_select2_lib fc_skip_highlight"', 'value', 'text', $date, 'date');
        /*$lists['date']  = '';
        		foreach ($dates as $i => $v) {
        			$checked = $date == $i ? ' checked="checked" ' : '';
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:67,代码来源:view.html.php

示例3: display


//.........这里部分代码省略.........
         $lists['filter_subcats'] = '<span class="fc-mssg-inline fc-note">' . JText::_('Sub-categories not included during specific category ordering: ') . $ordering_tip . '</span>';
     } else {
         $lists['filter_subcats'] = JHTML::_('select.booleanlist', 'filter_subcats', 'class="inputbox" onchange="submitform();"', $filter_subcats);
     }
     // build the include non-published cats boolean list
     $catsinstate[1] = JText::_('FLEXI_PUBLISHED');
     $catsinstate[0] = JText::_('FLEXI_UNPUBLISHED');
     $catsinstate[99] = JText::_('FLEXI_ANY');
     if (FLEXI_J16GE) {
         $catsinstate[2] = JText::_('FLEXI_ARCHIVED_STATE');
         $catsinstate[-2] = JText::_('FLEXI_TRASHED_STATE');
     }
     /*$_catsinstate = array();
     		foreach ($catsinstate as $i => $v) {
     			$_catsinstate[] = JHTML::_('select.option', $i, $v);
     		}
     		$lists['filter_catsinstate'] = JHTML::_('select.radiolist', $_catsinstate, 'filter_catsinstate', 'size="1" class="inputbox" onchange="submitform();"', 'value', 'text', $filter_catsinstate );*/
     $lists['filter_catsinstate'] = '';
     foreach ($catsinstate as $i => $v) {
         $checked = $filter_catsinstate == $i ? ' checked="checked" ' : '';
         $lists['filter_catsinstate'] .= '<input type="radio" onchange="submitform();" class="inputbox" ' . $checked . ' value="' . $i . '" id="filter_catsinstate' . $i . '" name="filter_catsinstate" />';
         $lists['filter_catsinstate'] .= '<label class="" id="filter_catsinstate' . $i . '-lbl" for="filter_catsinstate' . $i . '">' . $v . '</label>';
     }
     // build the order type boolean list
     $order_types = array();
     $order_types[] = JHTML::_('select.option', '0', JText::_('FLEXI_ORDER_JOOMLA') . '<br/>');
     $order_types[] = JHTML::_('select.option', '1', JText::_('FLEXI_ORDER_FLEXICONTENT'));
     $lists['filter_order_type'] = JHTML::_('select.radiolist', $order_types, 'filter_order_type', 'size="1" class="inputbox" onchange="submitform();"', 'value', 'text', $filter_order_type);
     // build the categories select list for filter
     $lists['filter_cats'] = flexicontent_cats::buildcatselect($categories, 'filter_cats', $filter_cats, 2, 'class="use_select2_lib" size="1" onchange="submitform( );"', $check_published = false, $check_perms = false);
     //build type select list
     $lists['filter_type'] = flexicontent_html::buildtypesselect($types, 'filter_type', $filter_type, true, 'class="use_select2_lib" size="1" onchange="submitform( );"', 'filter_type');
     //build authors select list
     $lists['filter_authors'] = flexicontent_html::buildauthorsselect($authors, 'filter_authors', $filter_authors, true, 'class="use_select2_lib" size="1" onchange="submitform( );"');
     if ($badcatitems) {
         $lists['default_cat'] = flexicontent_cats::buildcatselect($categories, 'default_cat', '', 2, 'class="use_select2_lib"', false, false);
     }
     //search filter
     $scopes = array();
     $scopes[1] = JText::_('FLEXI_TITLE');
     $scopes[2] = JText::_('FLEXI_INTROTEXT');
     $scopes[4] = JText::_('FLEXI_INDEXED_CONTENT');
     /*$_scopes = array();
     		foreach ($scopes as $i => $v) {
     			$_scopes[] = JHTML::_('select.option', $i, $v);
     		}
     		$lists['scope'] = JHTML::_('select.radiolist', $_scopes, 'scope', 'size="1" class="inputbox"', 'value', 'text', $scope );*/
     $lists['scope'] = '';
     foreach ($scopes as $i => $v) {
         $checked = $scope == $i ? ' checked="checked" ' : '';
         $lists['scope'] .= '<input type="radio" onchange="submitform();" class="inputbox" ' . $checked . ' value="' . $i . '" id="scope' . $i . '" name="scope" />';
         $lists['scope'] .= '<label class="" id="scope' . $i . '-lbl" for="scope' . $i . '">' . $v . '</label>';
     }
     // build item dates option list
     $dates[1] = JText::_('FLEXI_CREATED');
     $dates[2] = JText::_('FLEXI_REVISED');
     /*$_dates = array();
     		foreach ($dates as $i => $v) {
     			$_dates[] = JHTML::_('select.option', $i, $v);
     		}
     		$lists['date'] = JHTML::_('select.radiolist', $_dates, 'date', 'size="1" class="inputbox"', 'value', 'text', $date );*/
     $lists['date'] = '';
     foreach ($dates as $i => $v) {
         $checked = $date == $i ? ' checked="checked" ' : '';
         $lists['date'] .= '<input type="radio" onchange="submitform();" class="inputbox" ' . $checked . ' value="' . $i . '" id="date' . $i . '" name="date" />';
         $lists['date'] .= '<label class="" id="date' . $i . '-lbl" for="date' . $i . '">' . $v . '</label>';
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:67,代码来源:view.html.php


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