Page 1 of 1

No pdf Icon in Allrounder Template under joomla 1.7

Posted: 30 Sep 2011, 09:06
by funnix
Hello

What can i do? I have no pdf Icon under Allrounder Template (joomla 1.7)
The manuel changing of source Code like written down in Doku here is not possible, because the Code is very different!

Can someone live me a Tip?

Thanx funnix :idea:

Re: No pdf Icon in Allrounder Template under joomla 1.7

Posted: 30 Sep 2011, 18:00
by Jan
Hi, check if the template does not override the content, if yes, it needs to be done in template overriden files, search more info in this forum.

Jan

Re: No pdf Icon in Allrounder Template under joomla 1.7

Posted: 01 Oct 2011, 02:14
by oussama
For those who have this problem, here is the solution.
When you install Phoca, it replaces joomla files to be able to put pdf icon on templates.
===============
Backup the following core Joomla! content files:

components/com_content/views/article/tmpl/default.php to components/com_content/views/article/tmpl/default.php.bak
components/com_content/views/category/tmpl/blog_item.php to components/com_content/views/category/tmpl/blog_item.php.bak
components/com_content/views/featured/tmpl/default_item.php to components/com_content/views/featured/tmpl/default_item.php.bak
===============
So you have just to apply the same changes made by Phoca on Allrounder template file. Which mean :

1. In the files : html/com_content/article/default.php, html/com_content/category/blog_item.php, html/com_content/featured/default_item.php :
--> Find and select the ligne :

Code: Select all

<?php if ($canEdit ||  $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
. Add replace it with :

Code: Select all

//PHOCAEDIT
$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 ($canEdit ||  $params->get('show_print_icon') || $params->get('show_email_icon') || $phocaPDF) : ?>
--> Find the ligne :

Code: Select all

<ul class="actions">
. Add this after it :

Code: Select all

<?php echo $phocaPDF; //END PHOCAEDIT ?>

Re: No pdf Icon in Allrounder Template under joomla 1.7

Posted: 03 Oct 2011, 19:28
by funnix
Hi oussama

i dit it that way you explained here, but i don`t get any pdf-icon?!
What did i wrong? or is there another Problem?
I changed this three files same way!
components/com_content/views/category/tmpl/blog_item.php
components/com_content/views/featured/tmpl/default_item.php
components/com_content/views/article/tmpl/default.php

for example:components/com_content/views/article/tmpl/default.php

here the code_------------------>
<?php
//PHOCAEDIT
$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 ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon') || $phocaPDF) : ?>
//PHOCAEDIT
<?php
$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 ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon') || $phocaPDF) : ?>
<ul class="actions">
<?php echo $phocaPDF; //END PHOCAEDIT ?>
<?php if (!$this->print) : ?>
<?php if ($params->get('show_print_icon')) : ?>
<li class="print-icon">
<?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
</li>
<?php endif; ?>

<?php if ($params->get('show_email_icon')) : ?>
<li class="email-icon">
<?php echo JHtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>


Can you help?