Phoca PDF & Gantry NOT working

Phoca PDF - creating PDF documents in Joomla! CMS
sandmanm
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 21 Nov 2014, 21:12

Phoca PDF & Gantry NOT working

Post by sandmanm »

Looking for a solution to get Phoca PDF 3.0.2 working with Gantry 4.1.26 on the latest Joomla 3.3.

I have followed the following:

https://www.phoca.cz/documents/47-phoca- ... joomla-3-3

And didn't work for me WITH Gantry, without Gantry it seems to work fine and generate PDF's no problem. If you anyone has found a way to get it to work WITH Gantry please reply with the steps. :x

Many thanks in advance. :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47898
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF & Gantry NOT working

Post by Jan »

Hi, unfortunately I don't know the Gantry, so cannot give any clue advice :-( :idea:

Do you get problems with rendering the PDF icon in article or with rendering PDF output?

Jan
If you find Phoca extensions useful, please support the project
sandmanm
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 21 Nov 2014, 21:12

Re: Phoca PDF & Gantry NOT working

Post by sandmanm »

Hi,

My problem is with rendering the PDF icon in article.

Gantry is my front end Template -> gantry-framework.org

I will continue to work on it, but still taking any advice anyone may have! :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47898
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF & Gantry NOT working

Post by Jan »

Hi, then ask the gantry developer where the output for the article is, so you can customize the icon there:
https://www.phoca.cz/documents/47-phoca- ... joomla-3-3
Jan
If you find Phoca extensions useful, please support the project
21stcc
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 26 Nov 2014, 23:49

Re: Phoca PDF & Gantry NOT working

Post by 21stcc »

I've got it working with a RocketTheme template that requires gantry.

Steps as follows:
Within the template, update the following files:
/joomla/3.2/com_content/featured/default_item.php
/joomla/3.2/com_content/article/default.php
/joomla/3.2/com_content/category/blog_item.php

update them following instructions for updating earlier versions of joomla as follows:
$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,
$params);
}

<?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $canEdit || $phocaPDF) : ?>
<dd class="rt-article-<?php echo ($params->get('show_icons')) ? 'icons' : 'no-icon'; ?>">
<ul class="actions">
<?php echo $phocaPDF; ?>
<?php if ($params->get('show_print_icon')) : ?>
<li class="print-icon">
<?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
</li>

You will then need to make changes to /administrator/components/com_phocapdf/helpers/phocapdf.php as follows:
Change
if ($params->get('show_icons')) {
$text = JHTML::_('image','components/com_phocapdf/assets/images/pdf_button.png', JText::_('PLG_PHOCAPDF_CONTENT_PDF'));
to
if ($params->get('show_icons')) {
$text = JText::_('PLG_PHOCAPDF_CONTENT_PDF');

and change
$output = '<li class="print-icon">'
. JHTML::_('link',JRoute::_($url), '<span class="icon-file"></span>&#160;' .$text. '&#160;', $attribs)
.'</li>';
to
$output = '<li class="print-icon">'
. JHTML::_('link',JRoute::_($url), '<span class="icon-print"></span>&#160;' .$text. '&#160;', $attribs)
.'</li>';

I've also changed my language override for PLG_PHOCAPDF_CONTENT_PDF to Print so that it displays as the print button and link but launches the PDF.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47898
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF & Gantry NOT working

Post by Jan »

Hi, thank you very much for the info

Jan
If you find Phoca extensions useful, please support the project
sandmanm
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 21 Nov 2014, 21:12

Re: Phoca PDF & Gantry NOT working

Post by sandmanm »

Thank you! Going to give it a try! :D

-Zach
sandmanm
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 21 Nov 2014, 21:12

Re: Phoca PDF & Gantry NOT working

Post by sandmanm »

I am unable to locate these items.

/joomla/3.2/com_content/featured/default_item.php
/joomla/3.2/com_content/article/default.php
/joomla/3.2/com_content/category/blog_item.php

I was able to find com_content in the following location:

/templates/gantry/html/com_content

which displayed featured, article and category folders but the php scripts in each above had minimal info (none that resembles what you said)

Double checking that this is for gantry 4.1.26

PS. This is a fresh install of Joomla with only Gantry and Phoca installed, so I do not believe there are any issues conflicting with other modules/components.

Thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47898
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF & Gantry NOT working

Post by Jan »

Hi, this means, you have the files in template part which then override the standard output - but even in this case the files in com_content should not be missed there :idea:

Did you search the views folder:

components/com_content/views/ ...


Jan
If you find Phoca extensions useful, please support the project
sandmanm
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 21 Nov 2014, 21:12

Re: Phoca PDF & Gantry NOT working

Post by sandmanm »

1. Install
a. Phoca PDF Component.
b. Phoca PDF Content Plug-in.

2. Joomla core files to edit.
a. ../layouts/joomla/content/icons.php

<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
$canEdit = $displayData['params']->get('access-edit');
$phocaPDF = false;
if (JPluginHelper::isEnabled('phocapdf', 'content')) {
include_once(JPATH_ADMINISTRATOR.'/components/com_phocapdf/helpers/phocapdf.php');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($displayData['item'], $displayData['params']);
}
?>
<div class="icons">
<?php if (empty($displayData['print'])) : ?>
<?php if ($canEdit || $displayData['params']->get('show_print_icon') || $displayData['params']->get('show_email_icon') || $phocaPDF) : ?>
<div class="btn-group pull-right">
<?php // Note the actions class is deprecated. Use dropdown-menu instead. ?>
<ul class="actions">
<?php if ($displayData['params']->get('show_print_icon')) : ?>
<li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $displayData['item'], $displayData['params']); ?> </li>
<?php endif; ?>
<?php if ($displayData['params']->get('show_email_icon')) : ?>
<li class="email-icon"> <?php echo JHtml::_('icon.email', $displayData['item'], $displayData['params']); ?> </li>
<?php endif; ?>
<?php if ($canEdit) : ?>
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $displayData['item'], $displayData['params']); ?> </li>
<?php endif; ?>
<?php echo $phocaPDF; ?>
</ul>
</div>
<?php endif; ?>
<?php else : ?>
<div class="pull-right">
<?php echo JHtml::_('icon.print_screen', $displayData['item'], $displayData['params']); ?>
</div>
<?php endif; ?>
</div>
Post Reply