コード例 #1
0
             $shTemp = explode(' ', $contentElement->created);
             $title[] = str_replace('-', '', $shTemp[0]) . $contentElement->id;
         }
     }
 }
 // use libray function to fetch Joomla content title
 if ($task == 'article.edit') {
     if (empty($a_id)) {
         // submit new article
         $title[] = $sh_LANG[$shLangIso]['COM_SH404SEF_CREATE_NEW'];
     } else {
         $dosef = false;
     }
 } else {
     if (empty($layout) || !empty($layout) && $layout != 'edit') {
         $contentTitle = sef_404::getContentSlugsArray(isset($view) ? $view : null, isset($id) ? $id : null, isset($layout) ? $layout : null, isset($Itemid) ? $Itemid : null, $shLangName);
         if (!empty($title)) {
             $title = array_merge($title, $contentTitle);
             // V 1.2.4.q added forced language
         } else {
             $title = $contentTitle;
             // V 1.2.4.q added forced language
         }
         if (!empty($format) && $format == 'feed') {
             $title[] = $format;
             if (!empty($type) && $format != $type) {
                 $title[] = $type;
             }
         }
         if (!empty($print)) {
             $title[] = JText::_('Print');
コード例 #2
0
ファイル: com_content.php プロジェクト: alesconti/FF_2015
     $shCanonicalTag = JRoute::_($nonSef);
 }
 // use regular function to get content titles, as per out specific settings
 $customConfig = clone $sefConfig;
 $customConfig->includeContentCat = $sefConfig->contentTitleIncludeCat;
 $customConfig->UseAlias = $sefConfig->ContentTitleUseAlias;
 $customConfig->useCatAlias = $sefConfig->ContentTitleUseCatAlias;
 $customConfig->LowerCase = false;
 $customConfig->ContentTitleInsertArticleId = false;
 // V 1.2.4.t protect against sef_ext.php not being included
 if (!class_exists('sef_404')) {
     require_once sh404SEF_ABS_PATH . 'components/com_sh404sef/sef_ext.php';
 }
 $layout = isset($layout) ? $layout : null;
 $articleId = shGetArticleIdString($id, $view, $option, $shLangName);
 $title = sef_404::getContentSlugsArray($view, $id, $layout, $Itemid, $shLangName, $customConfig);
 if (!empty($articleId)) {
     $lastBit = array_pop($title);
     $lastBit .= ' [' . $articleId . ']';
     array_push($title, $lastBit);
 }
 $pageNumber = '';
 // V 1.2.4.t try better handling of multipages article (use of mospagebreak)
 if ($view == 'article' && !empty($limitstart)) {
     // this is multipage article
     $shPageTitle = '';
     try {
         $contentElement = ShlDbHelper::selectObject('#__content', array('id', 'fulltext', 'introtext'), array('id' => $id));
     } catch (Exception $e) {
         JError::raise(E_ERROR, 500, $e->getMessage());
     }