Custom layout problem

Phoca PDF - creating PDF documents in Joomla! CMS
simpleshop
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jan 2017, 23:56

Custom layout problem

Post by simpleshop »

I have web page https://www.simple-shop.si/

I would like, that PDF button will be shown where print button is.

But I have final problem.
I did everything what is in instructions:
https://www.phoca.cz/documents/47-phoca- ... joomla-3-3

The only final 3b step is problem.

The file where I need to change is not as shown in instructions.

So I found file on:
\components\com_content\views\article\tmpl

Can you help me to add or in other words to edit this file that Phoca PDF will be show in article.

I also prepeared one article on which "Print" is enabled, and I tried everything but with no success.

Thank you!
simpleshop
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jan 2017, 23:56

Re: Custom layout problem

Post by simpleshop »

<?php

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user = JFactory::getUser();
$info = $params->get('info_block_position', 0);
JHtml::_('behavior.caption');
?>
<div class="item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<meta itemprop="inLanguage" content="<?php echo ($this->item->language === '*') ? JFactory::getConfig()->get('language') : $this->item->language; ?>" />
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
</div>
<?php endif;
if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative)
{
echo $this->item->pagination;
}
?>

<?php // Todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') ); ?>

<?php if (!$useDefList && $this->print) : ?>
<div id="pop-print" class="btn hidden-print">
<?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
</div>
<div class="clearfix"> </div>
<?php endif; ?>
<?php if ($params->get('show_title') || $params->get('show_author')) : ?>
<div class="page-header">
<?php if ($params->get('show_title')) : ?>
<h2 itemprop="headline">
<?php echo $this->escape($this->item->title); ?>
</h2>
<?php endif; ?>
<?php if ($this->item->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate()) : ?>
<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (!$this->print) : ?>
<?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
<?php endif; ?>
<?php else : ?>
<?php if ($useDefList) : ?>
<div id="pop-print" class="btn hidden-print">
<?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
</div>
<?php endif; ?>
<?php endif; ?>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom layout problem

Post by Jan »

Hi, first of all:

1) which version of Joomla! and Phoca PDF do you run? Did the system plugin not work?

2) you need to find out, which file really outputs the code - if directly components\com_content\views\article\tmpl or in template override :idea:

Jan
If you find Phoca extensions useful, please support the project
simpleshop
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jan 2017, 23:56

Re: Custom layout problem

Post by simpleshop »

Joomla: 3.6 - the latest stable version
Phoca PDF: 3.0.3 - for Joomla version 3

I know that file which I need to edit is on path:
/components/com_content/views/article/tmpl/default.php

Phoca PDF component and plugin are enabled.
simpleshop
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jan 2017, 23:56

Re: Custom layout problem

Post by simpleshop »

ohh. it's working!

Great...

Where I can pay for PhocaPDF copyright removal?

Also I need to edit - that there is no PDF icon shown and that text "PDF" will be show..

Look at article:
https://www.simple-shop.si/pos-terminal
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom layout problem

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply