I'm using Joomla 1.6.3 and installed (FULL install) com_phocapdf_v2.0.0_rc2.zip
After that I installed and plg_phocapdf_content_v2.0.2.zip and activated it.
But there's no PDF icon shown when I'm using a yootheme template.
With the standard template Atomic of Joomla 1.6 the icon is shown.
I read about the modification I probably should make in the following files
components/com_content/views/article/tmpl/default.php
components/com_content/views/category/tmpl/blog_item.php
components/com_content/views/featured/tmpl/default_item.php
But I'm not a PHP-expert and therefore a bit confused because my template files are different from the examples on your site.
1. default.php is like this so where do I have to make the modification
Code: Select all
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$user = JFactory::getUser();
?>
<div id="system" class="<?php $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1 class="title"><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
<?php endif; ?>
<div class="item">
<?php if (!$this->print) : ?>
<?php if ($params->get('show_email_icon')) : ?>
<div class="icon email"><?php echo JHtml::_('icon.email', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_print_icon')) : ?>
<div class="icon print"><?php echo JHtml::_('icon.print_popup', $this->item, $params); ?></div>
<?php endif; ?>
<?php else : ?>
<div class="icon printscreen"><?php echo JHtml::_('icon.print_screen', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<h1 class="title">
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>"><?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<?php if ($params->get('show_create_date') || ($params->get('show_author') && !empty($this->item->author)) || $params->get('show_category')) : ?>
<p class="meta">
<?php
if ($params->get('show_author') && !empty($this->item->author )) {
$author = $this->item->author;
$author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);
if (!empty($this->item->contactid ) && $params->get('link_author') == true) {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY' , JHtml::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author));
} else {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author);
}
}
if ($params->get('show_create_date')) {
echo ' '.JText::_('TPL_WARP_ON').' '.JHtml::_('date',$this->item->created, JText::_('DATE_FORMAT_LC3'));
}
echo '. ';
if ($params->get('show_category')) {
echo JText::_('TPL_WARP_POSTED_IN').' ';
$title = $this->escape($this->item->category_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';
if ($params->get('link_category') AND $this->item->catslug) {
echo $url;
} else {
echo $title;
}
}
?>
</p>
<?php endif; ?>
<?php
if (!$params->get('show_intro')) {
echo $this->item->event->afterDisplayTitle;
}
echo $this->item->event->beforeDisplayContent;
if (isset ($this->item->toc)) {
echo $this->item->toc;
}
?>
<div class="content">
<?php
if ($params->get('access-view')) {
echo $this->item->text;
// optional teaser intro text for guests
} elseif ($params->get('show_noauth') == true AND $user->get('guest')) {
echo $this->item->introtext;
// optional link to let them register to see the whole article.
if ($params->get('show_readmore') && $this->item->fulltext != null) {
$link1 = JRoute::_('index.php?option=com_users&view=login');
$link = new JURI($link1);
echo '<p class="links">';
echo '<a href="'.$link.'">';
$attribs = json_decode($this->item->attribs);
if ($attribs->alternative_readmore == null) {
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
} elseif ($readmore = $this->item->alternative_readmore) {
echo $readmore;
if ($params->get('show_readmore_title', 0) != 0) {
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
}
} elseif ($params->get('show_readmore_title', 0) == 0) {
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
} else {
echo JText::_('COM_CONTENT_READ_MORE');
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
}
echo '</a></p>';
}
}
?>
</div>
<?php if ($canEdit) : ?>
<p class="edit"><?php echo JHtml::_('icon.edit', $this->item, $params); ?> <?php echo JText::_('TPL_WARP_EDIT_ARTICLE'); ?></p>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</div>
Code: Select all
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::core();
?>
<div class="item">
<?php if ($params->get('show_email_icon')) : ?>
<div class="icon email"><?php echo JHtml::_('icon.email', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_print_icon')) : ?>
<div class="icon print"><?php echo JHtml::_('icon.print_popup', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<h1 class="title">
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>" title="<?php echo $this->escape($this->item->title); ?>"><?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<?php if ($params->get('show_create_date') || ($params->get('show_author') && !empty($this->item->author)) || $params->get('show_category')) : ?>
<p class="meta">
<?php
if ($params->get('show_author') && !empty($this->item->author )) {
$author = $this->item->author;
$author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);
if (!empty($this->item->contactid ) && $params->get('link_author') == true) {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author));
} else {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author);
}
}
if ($params->get('show_create_date')) {
echo ' '.JText::_('TPL_WARP_ON').' '.JHtml::_('date',$this->item->created, JText::_('DATE_FORMAT_LC2'));
}
echo '. ';
if ($params->get('show_category')) {
echo JText::_('TPL_WARP_POSTED_IN').' ';
$title = $this->escape($this->item->category_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catid)).'">'.$title.'</a>';
if ($params->get('link_category')) {
echo $url;
} else {
echo $title;
}
}
?>
</p>
<?php endif; ?>
<?php
if (!$params->get('show_intro')) {
echo $this->item->event->afterDisplayTitle;
}
echo $this->item->event->beforeDisplayContent;
?>
<div class="content"><?php echo $this->item->introtext; ?></div>
<?php if ($params->get('show_readmore') && $this->item->readmore) : ?>
<p class="links">
<?php
if ($params->get('access-view')) {
$link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
} else {
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug));
$link = new JURI($link1);
$link->setVar('return', base64_encode($returnURL));
}
?>
<a href="<?php echo $link; ?>" title="<?php echo $this->escape($this->item->title); ?>">
<?php
if (!$params->get('access-view')) {
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
} elseif ($readmore = $this->item->alternative_readmore) {
echo $readmore;
} else {
echo JText::_('TPL_WARP_CONTINUE_READING');
}
?>
</a>
</p>
<?php endif; ?>
<?php if ($canEdit) : ?>
<p class="edit"><?php echo JHtml::_('icon.edit', $this->item, $params); ?> <?php echo JText::_('TPL_WARP_EDIT_ARTICLE'); ?></p>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
Code: Select all
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
?>
<div class="item">
<?php if ($params->get('show_email_icon')) : ?>
<div class="icon email"><?php echo JHtml::_('icon.email', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_print_icon')) : ?>
<div class="icon print"><?php echo JHtml::_('icon.print_popup', $this->item, $params); ?></div>
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<h1 class="title">
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>" title="<?php echo $this->escape($this->item->title); ?>"><?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<?php if ($params->get('show_create_date') || ($params->get('show_author') && !empty($this->item->author)) || $params->get('show_category')) : ?>
<p class="meta">
<?php
if ($params->get('show_author') && !empty($this->item->author )) {
$author = $this->item->author;
$author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);
if (!empty($this->item->contactid ) && $params->get('link_author') == true) {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author));
} else {
echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author);
}
}
if ($params->get('show_create_date')) {
echo ' '.JText::_('TPL_WARP_ON').' '.JHtml::_('date',$this->item->created, JText::_('DATE_FORMAT_LC2'));
}
echo '. ';
if ($params->get('show_category')) {
echo JText::_('TPL_WARP_POSTED_IN').' ';
$title = $this->escape($this->item->category_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';
if ($params->get('link_category')) {
echo $url;
} else {
echo $title;
}
}
?>
</p>
<?php endif; ?>
<?php
if (!$params->get('show_intro')) {
echo $this->item->event->afterDisplayTitle;
}
echo $this->item->event->beforeDisplayContent;
?>
<div class="content"><?php echo $this->item->introtext; ?></div>
<?php if ($params->get('show_readmore') && $this->item->readmore) : ?>
<p class="links">
<?php
if ($params->get('access-view')) {
$link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
} else {
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug));
$link = new JURI($link1);
$link->setVar('return', base64_encode($returnURL));
}
?>
<a href="<?php echo $link; ?>" title="<?php echo $this->escape($this->item->title); ?>">
<?php
if (!$params->get('access-view')) {
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
} elseif ($readmore = $this->item->alternative_readmore) {
echo $readmore;
} else {
echo JText::_('TPL_WARP_CONTINUE_READING');
}
?>
</a>
</p>
<?php endif; ?>
<?php if ($canEdit) : ?>
<p class="edit"><?php echo JHtml::_('icon.edit', $this->item, $params); ?> <?php echo JText::_('TPL_WARP_EDIT_ARTICLE'); ?></p>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>