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


PHP flexicontent_html::createCatLink方法代码示例

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


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

示例1: mailbutton

 /**
  * Creates the email button
  *
  * @param string $print_link
  * @param array $params
  * @since 1.0
  */
 static function mailbutton($view, &$params, $slug = null, $itemslug = null, $item = null)
 {
     static $initialize = null;
     static $uri, $base;
     if (!$params->get('show_email_icon') || JRequest::getCmd('print')) {
         return;
     }
     if ($initialize === null) {
         if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_mailto' . DS . 'helpers' . DS . 'mailto.php')) {
             require_once JPATH_SITE . DS . 'components' . DS . 'com_mailto' . DS . 'helpers' . DS . 'mailto.php';
             $uri = JURI::getInstance();
             $base = $uri->toString(array('scheme', 'host', 'port'));
             $initialize = true;
         } else {
             $initialize = false;
         }
     }
     if ($initialize === false) {
         return;
     }
     //TODO: clean this static stuff (Probs when determining the url directly with subdomains)
     if ($view == 'category') {
         $non_sef_link = null;
         flexicontent_html::createCatLink($slug, $non_sef_link);
         $link = $base . JRoute::_($non_sef_link);
         //$link = $base . JRoute::_( 'index.php?view='.$view.'&cid='.$slug, false );
     } elseif ($view == FLEXI_ITEMVIEW) {
         $link = $base . JRoute::_(FlexicontentHelperRoute::getItemRoute($itemslug, $slug, 0, $item));
         //$link = $base . JRoute::_( 'index.php?view='.$view.'&cid='.$slug.'&id='.$itemslug, false );
     } elseif ($view == 'tags') {
         $link = $base . JRoute::_(FlexicontentHelperRoute::getTagRoute($itemslug));
         //$link = $base . JRoute::_( 'index.php?view='.$view.'&id='.$slug, false );
     } else {
         $link = $base . JRoute::_('index.php?view=' . $view, false);
     }
     $mail_to_url = JRoute::_('index.php?option=com_mailto&tmpl=component&link=' . MailToHelper::addLink($link));
     $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,left=50,width=\'+(screen.width-100)+\',top=20,height=\'+(screen.height-160)+\',directories=no,location=no';
     $status = 'left=50,width=\'+((screen.width-100) > 800 ? 800 : (screen.width-100))+\',top=20,height=\'+((screen.width-160) > 800 ? 800 : (screen.width-160))+\',menubar=yes,resizable=yes';
     $onclick = ' window.open(this.href,\'win2\',\'' . $status . '\'); return false; ';
     // This checks template image directory for image, if none found, default image is returned
     $show_icons = $params->get('show_icons');
     if ($show_icons) {
         $attribs = '';
         $image = JHTML::image(FLEXI_ICONPATH . 'emailButton.png', JText::_('FLEXI_EMAIL'), $attribs);
     } else {
         $image = '';
     }
     $overlib = JText::_('FLEXI_EMAIL_TIP');
     $text = JText::_('FLEXI_EMAIL');
     $button_classes = 'fc_mailbutton';
     if ($show_icons == 1) {
         $caption = '';
         $button_classes .= '';
     } else {
         $caption = $text;
         $button_classes .= FLEXI_J30GE ? ' btn btn-small' : ' fc_button fcsimple fcsmall';
     }
     $button_classes .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip';
     $tooltip_title = flexicontent_html::getToolTip($text, $overlib, 0);
     // emailed link was set above
     $output = '<a href="' . $mail_to_url . '" class="' . $button_classes . '" title="' . $tooltip_title . '" onclick="' . $onclick . '" >' . $image . $caption . '</a>';
     $output = JText::_('FLEXI_ICON_SEP') . $output . JText::_('FLEXI_ICON_SEP');
     return $output;
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:71,代码来源:flexicontent.helper.php

示例2: display


//.........这里部分代码省略.........
             $meta_title = $meta_params->get('page_title') ? $meta_params->get('page_title') : $category->title;
             $document->setMetaData('title', $meta_title);
         }
         if ($app->getCfg('MetaAuthor') == '1') {
             if ($meta_params->get('author')) {
                 $meta_author = $meta_params->get('author');
             } else {
                 $table = JUser::getTable();
                 $meta_author = $table->load($category->created_user_id) ? $table->name : '';
             }
             $document->setMetaData('author', $meta_author);
         }
     }
     // Overwrite with menu META data if menu matched
     if ($menu_matches) {
         if ($_mp = $menu->params->get('menu-meta_description')) {
             $document->setDescription($_mp);
         }
         if ($_mp = $menu->params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $_mp);
         }
         if ($_mp = $menu->params->get('robots')) {
             $document->setMetadata('robots', $_mp);
         }
         if ($_mp = $menu->params->get('secure')) {
             $document->setMetadata('secure', $_mp);
         }
     }
     // *********************************************************************
     // Create category link, but also consider current 'layout', and use the
     // layout specific variables so that filtering form will work properly
     // *********************************************************************
     $non_sef_link = null;
     $category_link = flexicontent_html::createCatLink($category->slug, $non_sef_link, $model);
     // ************************************
     // Add rel canonical html head link tag (TODO: improve multi-page handing)
     // ************************************
     $port = $uri->getPort();
     $base = $uri->getScheme() . '://' . $uri->getHost() . ($port ? ':' . $port : '');
     $start = JRequest::getInt('start', '');
     $start = $start ? "&start=" . $start : "";
     // ********************************************************************************************
     // Create pathway, if automatic pathways is enabled, then path will be cleared before populated
     // ********************************************************************************************
     $pathway = $app->getPathWay();
     // Clear pathway, if automatic pathways are enabled
     if ($params->get('automatic_pathways', 0)) {
         $pathway_arr = $pathway->getPathway();
         $pathway->setPathway(array());
         //$pathway->set('_count', 0);  // not needed ??
         $item_depth = 0;
         // menu item depth is now irrelevant ???, ignore it
     } else {
         $item_depth = $params->get('item_depth', 0);
     }
     // Respect menu item depth, defined in menu item
     $p = $item_depth;
     while ($p < count($parents)) {
         // Do not add the directory root category or its parents (this when coming from a directory view)
         if (!empty($root_parents) && in_array($parents[$p]->id, $root_parents)) {
             $p++;
             continue;
         }
         // Do not add to pathway unroutable categories
         if (in_array($parents[$p]->id, $globalnoroute)) {
             $p++;
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:67,代码来源:view.json.php


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