The Phoca PDF button don't show up

Phoca PDF - creating PDF documents in Joomla! CMS
henryth
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Mar 2018, 18:32

Re: The Phoca PDF button don't show up

Post by henryth »

Hi,

I know what I have to do to get the button displayed. I have to change the php code in "icons"...

But as you give the old code (layouts/joomla/...) before your new one, I compared your old joomla code (v?) with the actual one (v3.8.5) and it is not the same. I am not a codemaster. May I ask what's the point?

Actual Joomla v3.8.5 :

Code: Select all

<?php
/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

JHtml::_('bootstrap.framework');

$canEdit = $displayData['params']->get('access-edit');
$articleId = $displayData['item']->id;

?>

<div class="icons">
	<?php if (empty($displayData['print'])) : ?>

		<?php if ($canEdit || $displayData['params']->get('show_print_icon') || $displayData['params']->get('show_email_icon')) : ?>
			<div class="btn-group pull-right">
				<button class="btn dropdown-toggle" type="button" id="dropdownMenuButton-<?php echo $articleId; ?>" aria-label="<?php echo JText::_('JUSER_TOOLS'); ?>"
				data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<span class="icon-cog" aria-hidden="true"></span>
					<span class="caret" aria-hidden="true"></span>
				</button>
				<?php // Note the actions class is deprecated. Use dropdown-menu instead. ?>
				<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton-<?php echo $articleId; ?>">
					<?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; ?>
				</ul>
			</div>
		<?php endif; ?>

	<?php else : ?>

		<div class="pull-right">
			<?php echo JHtml::_('icon.print_screen', $displayData['item'], $displayData['params']); ?>
		</div>

	<?php endif; ?>
</div>
Joomla v? from your documentation :

Code: Select all

<?php 
defined('JPATH_BASE') or die;
 
$canEdit = $displayData['params']->get('access-edit');
 
?>
 
<div class="icons">
	<?php if (empty($displayData['print'])) : ?>
 
		<?php if ($canEdit || $displayData['params']->get('show_print_icon') || $displayData['params']->get('show_email_icon')) : ?>
			<div class="btn-group pull-right">
				<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span class="icon-cog"></span> <span class="caret"></span> </a>
				<?php // Note the actions class is deprecated. Use dropdown-menu instead. ?>
				<ul class="dropdown-menu">
					<?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; ?>
				</ul>
			</div>
		<?php endif; ?>
 
	<?php else : ?>
 
		<div class="pull-right">
			<?php echo JHtml::_('icon.print_screen', $displayData['item'], $displayData['params']); ?>
		</div>
 
	<?php endif; ?>
</div>

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: The Phoca PDF button don't show up

Post by Jan »

Hi, the documentation (codes) is not up-to-date (because Joomla! changes often). Did you try to use the system plugin which tries to display icons without need to modify the output?

Jan
If you find Phoca extensions useful, please support the project
henryth
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Mar 2018, 18:32

Re: The Phoca PDF button don't show up

Post by henryth »

Hi,

I did. I've tried to install/reinstall several times. :-(

Now, I just have reinstall a functional backup of my Joomla because of some bug with mySQL.
So, I will try again the system plugin. Maybe better with this clean backup... but I'm not really confident.

And I'm a bit afraid of modifying the core files of Joomla...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: The Phoca PDF button don't show up

Post by Jan »

And I'm a bit afraid of modifying the core files of Joomla...
Yes, unfortunately there are only two ways: system plugin or code modification.

Jan
If you find Phoca extensions useful, please support the project
henryth
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Mar 2018, 18:32

Re: The Phoca PDF button don't show up

Post by henryth »

Thanks for your response.

I've tried again with the system plugin. No result.
So I've change the code in the core files as I don't have any icons.php for my templates. It doesn't work.

I'm pretty sure it is due to the template. 'Cause with Protostar, it is available to use Phoca PDF.
My template is JoomSpirit 99 (http://www.template-joomspirit.com/joom ... pathway-12). What do you think?

An other option: Is that possible to put a insert like {phocapdf} directly into the article?

Regards,
henryth
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: The Phoca PDF button don't show up

Post by Jan »

Hi, if you template overrides the content output, it needs to be customized directly in template:
https://www.phoca.cz/documents/47-phoca ... er-version

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