예제 #1
0
     $nonSef = str_replace(array('format=pdf', 'print=1'), '', $nonSef);
     $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());
예제 #2
0
     $q = 'SELECT id, title FROM #__magazine_categories WHERE id = ' . $database->Quote($ed);
     $database->setQuery($q);
     if (shTranslateUrl($option, $shLangName)) {
         // V 1.2.4.m
         $issueName = $database->loadObject(false);
     } else {
         $issueName = $database->loadObject();
     }
     if ($issueName) {
         $title[] = ($sefConfig->shInsertIJoomlaMagIssueId ? $ed . $sefConfig->replacement : '') . $issueName->title;
     }
     shRemoveFromGETVarsList('ed');
 }
 // end of edition id insertion
 // V 1.5.7 : article id, on some categories only
 $articleId = empty($id) ? '' : shGetArticleIdString($id, $view, $option, $shLangName);
 if (empty($layout) || !empty($layout) && $layout != 'form') {
     $contentTitle = sef_404::getContentTitles(isset($view) ? @$view : null, isset($id) ? @$id : null, isset($layout) ? @$layout : null, isset($Itemid) ? @$Itemid : null, $shLangName);
     if (!empty($articleId)) {
         $lastBit = array_pop($contentTitle);
         $lastBit .= $sefConfig->replacement . $articleId;
         array_push($contentTitle, $lastBit);
     }
     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') {