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 $version = new JVersion();
7 if ($version->RELEASE == '1.5') {
8 $component = new ArtxContent15($this, $this->params);
9 $article = $component->articleListItem($this->item);
11 $component = new ArtxContent16($this, $this->params);
12 $article = $component->articleListItem($this->item);
13 JHtml::addIncludePath(JPATH_COMPONENT . DS . 'helpers');
17 $params = $article->getArticleViewParameters();
18 if ($article->titleVisible) {
19 $params['header-text'] = $this->escape($article->title);
20 if (strlen($article->titleLink))
21 $params['header-link'] = $article->titleLink;
23 // Change the order of "if" statements to change the order of article metadata header items.
24 if ($article->showCreateDate)
25 $params['metadata-header-icons'][] = $article->createDateInfo();
26 if ($article->showModifyDate)
27 $params['metadata-header-icons'][] = $article->modifyDateInfo();
28 if ($article->showPublishDate)
29 $params['metadata-header-icons'][] = $article->publishDateInfo();
30 if ($article->showAuthor)
31 $params['metadata-header-icons'][] = $article->authorInfo();
32 if (!$article->print && $article->showPdfIcon)
33 $params['metadata-header-icons'][] = $article->pdfIcon();
34 if ($article->showPrintIcon)
35 $params['metadata-header-icons'][] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon();
36 if (!$article->print && $article->showEmailIcon)
37 $params['metadata-header-icons'][] = $article->emailIcon();
38 if (!$article->print && $article->canEdit)
39 $params['metadata-header-icons'][] = $article->editIcon();
40 if ($article->showHits && $article->hits)
41 $params['metadata-header-icons'][] = $article->hitsInfo();
42 if ($article->showUrl)
43 $params['metadata-header-icons'][] = $article->urlInfo();
44 // Build article content
46 if (!$article->isPublished)
47 $content .= $article->beginUnpublishedArticle();
48 if (!$article->showIntro)
49 $content .= $article->event('afterDisplayTitle');
50 $content .= $article->event('beforeDisplayContent');
51 $content .= $article->introText();
52 if ($article->showReadmore)
53 $content .= $article->readmore();
54 $content .= $article->event('afterDisplayContent');
55 if (!$article->isPublished)
56 $content .= $article->endUnpublishedArticle();
57 $params['content'] = $content;
58 // Change the order of "if" statements to change the order of article metadata footer items.
59 if ($article->showParentCategory || $article->showCategory)
60 $params['metadata-footer-icons'][] = $article->categories();
62 echo $article->article($params);