本文整理汇总了PHP中FSS_Helper::NeedBaseBreadcrumb方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::NeedBaseBreadcrumb方法的具体用法?PHP FSS_Helper::NeedBaseBreadcrumb怎么用?PHP FSS_Helper::NeedBaseBreadcrumb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::NeedBaseBreadcrumb方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
if (!FSS_Permission::auth("fss.view", "com_fss.glossary")) {
return FSS_Helper::NoPerm();
}
$mainframe = JFactory::getApplication();
$db = JFactory::getDBO();
$aparams = FSS_Settings::GetViewSettingsObj('glossary');
$this->use_letter_bar = $aparams->get('use_letter_bar', 0);
$this->long_desc = $aparams->get('long_desc', 0);
if ($this->use_letter_bar) {
$this->letters = array();
if (FSS_Settings::get('glossary_all_letters')) {
$letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
foreach ($letters as $letter) {
$this->letters[$letter] = 0;
}
}
$qry = "SELECT UPPER(SUBSTR(word,1,1)) as letter FROM #__fss_glossary";
$where = array();
$where[] = "published = 1";
$where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')';
$user = JFactory::getUser();
$where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
if (count($where) > 0) {
$qry .= " WHERE " . implode(" AND ", $where);
}
$qry .= " GROUP BY letter ORDER BY letter";
$db->setQuery($qry);
$letters = $db->loadObjectList();
foreach ($letters as $letter) {
$this->letters[$letter->letter] = 1;
}
if (count($this->letters) == 0) {
return parent::display("empty");
}
}
$this->curletter = "";
// if we are showing on a per letter basis only
if ($this->use_letter_bar == 2) {
reset($this->letters);
$this->curletter = FSS_Input::getString('letter', key($this->letters));
}
if (FSS_Input::getCmd('layout') == "word") {
return $this->showWord();
}
$where = array();
$where[] = "published = 1";
$query = "SELECT * FROM #__fss_glossary";
if ($this->curletter) {
$where[] = "SUBSTR(word,1,1) = '" . FSSJ3Helper::getEscaped($db, $this->curletter) . "'";
}
$where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')';
$user = JFactory::getUser();
$where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
if (count($where) > 0) {
$query .= " WHERE " . implode(" AND ", $where);
}
$query .= " ORDER BY word";
$db->setQuery($query);
$this->rows = $db->loadObjectList();
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'glossary'))) {
$pathway->addItem("Glossary");
}
if (FSS_Settings::get('glossary_use_content_plugins')) {
// apply plugins to article body
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$art = new stdClass();
$this->params = $mainframe->getParams('com_fss');
foreach ($this->rows as &$row) {
if ($row->description) {
$art->text = $row->description;
$art->noglossary = 1;
$results = $dispatcher->trigger('onContentPrepare', array('com_fss.glossary', &$art, &$this->params, 0));
$row->description = $art->text;
}
if ($row->longdesc) {
$art->text = $row->longdesc;
$art->noglossary = 1;
$results = $dispatcher->trigger('onContentPrepare', array('com_fss.glossary.long', &$art, &$this->params, 0));
$row->longdesc = $art->text;
}
}
}
FSS_Helper::IncludeModal();
parent::display($tpl);
}
示例2: searchArticles
function searchArticles()
{
$mainframe = JFactory::getApplication();
$aparams = FSS_Settings::GetViewSettingsObj('kb');
$search = FSS_Input::getString('kbsearch', '');
$prodid = FSS_Input::getInt('prodid');
$catid = FSS_Input::getInt('catid');
$this->assign('cat_art_pages', $aparams->get('cat_art_pages', 0));
$search = FSS_Input::getString('kbsearch');
$this->assign('view_mode', $aparams->get('cat_cat_arts'));
$document = JFactory::getDocument();
$document->setTitle(JText::_("KNOWLEDGE_BASE") . ' - ' . JText::_("SEARCH_RESULTS"));
$pagination = $this->get('ArtPaginationSearch');
$this->pagination = $pagination;
$this->assign('limit', $this->get("ArtLimit"));
$this->product = $this->get("Product");
$this->cat = $this->get("Cat");
$this->results = $this->get("ArtsWhat");
$this->search = $search;
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'kb'))) {
$pathway->addItem(JText::_('KNOWLEDGE_BASE'), FSSRoute::_('index.php?option=com_fss&view=kb'));
}
$pathway->addItem(JText::_("SEARCH_RESULTS"));
FSS_Helper::AllowCache();
parent::display("kbsearch");
}
示例3: displayAllProducts
function displayAllProducts()
{
$this->products = $this->get('Products');
if (!is_array($this->products)) {
$this->products = array();
}
FSS_Translate_Helper::Tr($this->products);
$this->showresult = 1;
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'test'))) {
$pathway->addItem(JText::_('TESTIMONIALS'), FSSRoute::_('index.php?option=com_fss&view=test'));
}
if (FSS_Settings::get('test_allow_no_product')) {
$noproduct = array();
$noproduct['id'] = 0;
$noproduct['title'] = JText::_('GENERAL_TESTIMONIALS');
$noproduct['description'] = '';
$noproduct['image'] = '/components/com_fss/assets/images/generaltests.png';
$this->products = array_merge(array($noproduct), $this->products);
}
if ($this->test_show_prod_mode != "list") {
$idlist = array();
if (count($this->products) > 0) {
foreach ($this->products as &$prod) {
$prod['comments'] = array();
$idlist[] = $prod['id'];
}
}
// not in normal list mode, get comments for each product
$this->comments->itemid = $idlist;
$this->comments->GetComments();
foreach ($this->comments->_data as &$data) {
if ($data['itemid'] > 0) {
$this->products[$data['itemid']]['comments'][] = $data;
}
}
}
parent::display();
}
示例4: DisplayGroupList
function DisplayGroupList()
{
$this->groups = $this->get('Groups');
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'groups'))) {
$pathway->addItem(JText::_('TICKET_GROUPS'), FSSRoute::_('index.php?option=com_fss&view=admin_groups'));
}
FSS_Helper::IncludeModal();
parent::display();
}