OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / art26_test1 / html / com_content / featured / default_item.php
1 <?php
2 defined('_JEXEC') or die;
3 // Create component view for Joomla! 1.5 or 1.6.
4 // The classes are defined in ../../../functions.php file and encapsulate 
5 // version-specific queries and formatting.
6 if ($GLOBALS['version']->RELEASE == '1.6') {
7     $component = new ArtxContent16($this, $this->params);
8     $article = $component->articleListItem($this->item);
9     JHtml::addIncludePath(JPATH_COMPONENT . DS . 'helpers');
10 } else {
11     $component = new ArtxContent15($this, $this->params);
12     $article = $component->articleListItem($this->item);
13 }
14
15
16 $params = $article->getArticleViewParameters();
17 if ($article->titleVisible) {
18     $params['header-text'] = $this->escape($article->title);
19     if (strlen($article->titleLink))
20         $params['header-link'] = $article->titleLink;
21 }
22 // Change the order of "if" statements to change the order of article metadata header items.
23 if ($article->showCreateDate)
24     $params['metadata-header-icons'][] = $article->createDateInfo();
25 if ($article->showModifyDate)
26     $params['metadata-header-icons'][] = $article->modifyDateInfo();
27 if ($article->showPublishDate)
28     $params['metadata-header-icons'][] = $article->publishDateInfo();
29 if ($article->showAuthor)
30     $params['metadata-header-icons'][] = $article->authorInfo();
31 if (!$article->print && $article->showPdfIcon)
32     $params['metadata-header-icons'][] = $article->pdfIcon();
33 if ($article->showPrintIcon)
34     $params['metadata-header-icons'][] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon();
35 if ($article->showEmailIcon)
36     $params['metadata-header-icons'][] = $article->emailIcon();
37 if (!$article->print && $article->canEdit)
38     $params['metadata-header-icons'][] = $article->editIcon();
39 if ($article->showHits && $article->hits)
40     $params['metadata-header-icons'][] = $article->hitsInfo();
41 if ($article->showUrl)
42     $params['metadata-header-icons'][] = $article->urlInfo();
43 // Build article content
44 $content = '';
45 if (!$article->isPublished)
46     $content .= $article->beginUnpublishedArticle();
47 if (!$article->showIntro)
48     $content .= $article->event('afterDisplayTitle');
49 $content .= $article->event('beforeDisplayContent');
50 $content .= $article->introText();
51 if ($article->showReadmore)
52     $content .= $article->readmore();
53 $content .= $article->event('afterDisplayContent');
54 if (!$article->isPublished)
55     $content .= $article->endUnpublishedArticle();
56 $params['content'] = $content;
57 // Change the order of "if" statements to change the order of article metadata footer items.
58 if ($article->showParentCategory || $article->showCategory)
59   $params['metadata-footer-icons'][] = $article->categories();
60 // Render article
61 echo $article->article($params);
62