Re: the PDF icon is not visible
Posted: 26 Mar 2012, 22:52
I'm hoping you can help me too.
I also have an artisteer template, and your code fixed the problem for the most part. Except that the PDF icon isn't showing in line with the print icon (http://www.pcguyswebsites.nl/sites/kann ... x.php/menu).
thanks in advance
Here is the code for my default.php:
<?php
defined('_JEXEC') or die;
require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
// Create component view for Joomla! 1.5 or 1.6.
// The classes are defined in ../../../functions.php file and encapsulate
// version-specific queries and formatting.
$version = new JVersion();
if ($version->RELEASE == '1.5') {
$component = new ArtxContent15($this, $this->params);
$article = $component->article($this->article, $this->print);
} else {
$component = new ArtxContent16($this, $this->params);
$article = $component->article($this->item, $this->print);
JHtml::addIncludePath(JPATH_COMPONENT . DS . 'helpers');
}
$phocaPDF = false;
if (JPluginHelper::isEnabled('phocapdf', 'content')) {
include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocapdf'.DS.'helpers'.DS.'phocapdf.php');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($this->item, $this->item->params);
}
echo $component->beginPageContainer('item-page');
if ($component->showPageHeading && $article->title != $component->pageHeading)
echo $component->pageHeading();
$params = $article->getArticleViewParameters();
if ($article->titleVisible) {
$params['header-text'] = $this->escape($article->title);
if (strlen($article->titleLink))
$params['header-link'] = $article->titleLink;
}
// Change the order of "if" statements to change the order of article metadata header items.
if (!$article->print && $article->showPdfIcon)
$params['metadata-header-icons'][] = $article->pdfIcon();
if ($article->showPrintIcon)
$params['metadata-header-icons'][] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon();
if (!$article->print && $article->showEmailIcon)
$params['metadata-header-icons'][] = $article->emailIcon();
if (!$article->print && $article->canEdit)
$params['metadata-header-icons'][] = $article->editIcon();
if ($article->showHits && $article->hits)
$params['metadata-header-icons'][] = $article->hitsInfo();
if ($article->showUrl)
$params['metadata-header-icons'][] = $article->urlInfo();
if ($phocaPDF)
$params['metadata-header-icons'][] = $phocaPDF;
// Build article content
$content = '';
if (!$article->showIntro)
$content .= $article->event('afterDisplayTitle');
$content .= $article->event('beforeDisplayContent');
$content .= $article->toc();
if ($article->showText)
$content .= $article->content();
else if ($article->showTeaser) {
$content .= $article->introText();
if ($this->showReadmore)
$content .= $article->readmore();
}
$content .= $article->event('afterDisplayContent');
$params['content'] = $content;
// Render article
echo $article->article($params);
echo $component->endPageContainer();
I also have an artisteer template, and your code fixed the problem for the most part. Except that the PDF icon isn't showing in line with the print icon (http://www.pcguyswebsites.nl/sites/kann ... x.php/menu).
thanks in advance
Here is the code for my default.php:
<?php
defined('_JEXEC') or die;
require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
// Create component view for Joomla! 1.5 or 1.6.
// The classes are defined in ../../../functions.php file and encapsulate
// version-specific queries and formatting.
$version = new JVersion();
if ($version->RELEASE == '1.5') {
$component = new ArtxContent15($this, $this->params);
$article = $component->article($this->article, $this->print);
} else {
$component = new ArtxContent16($this, $this->params);
$article = $component->article($this->item, $this->print);
JHtml::addIncludePath(JPATH_COMPONENT . DS . 'helpers');
}
$phocaPDF = false;
if (JPluginHelper::isEnabled('phocapdf', 'content')) {
include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocapdf'.DS.'helpers'.DS.'phocapdf.php');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($this->item, $this->item->params);
}
echo $component->beginPageContainer('item-page');
if ($component->showPageHeading && $article->title != $component->pageHeading)
echo $component->pageHeading();
$params = $article->getArticleViewParameters();
if ($article->titleVisible) {
$params['header-text'] = $this->escape($article->title);
if (strlen($article->titleLink))
$params['header-link'] = $article->titleLink;
}
// Change the order of "if" statements to change the order of article metadata header items.
if (!$article->print && $article->showPdfIcon)
$params['metadata-header-icons'][] = $article->pdfIcon();
if ($article->showPrintIcon)
$params['metadata-header-icons'][] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon();
if (!$article->print && $article->showEmailIcon)
$params['metadata-header-icons'][] = $article->emailIcon();
if (!$article->print && $article->canEdit)
$params['metadata-header-icons'][] = $article->editIcon();
if ($article->showHits && $article->hits)
$params['metadata-header-icons'][] = $article->hitsInfo();
if ($article->showUrl)
$params['metadata-header-icons'][] = $article->urlInfo();
if ($phocaPDF)
$params['metadata-header-icons'][] = $phocaPDF;
// Build article content
$content = '';
if (!$article->showIntro)
$content .= $article->event('afterDisplayTitle');
$content .= $article->event('beforeDisplayContent');
$content .= $article->toc();
if ($article->showText)
$content .= $article->content();
else if ($article->showTeaser) {
$content .= $article->introText();
if ($this->showReadmore)
$content .= $article->readmore();
}
$content .= $article->event('afterDisplayContent');
$params['content'] = $content;
// Render article
echo $article->article($params);
echo $component->endPageContainer();