Where can I find equivalent to /layouts/joomla/content/icons.php in Flexicontent folders ?

More
2 years 9 months ago #81916 by bendeb
Hello,
I use latest release of Flexicontent.

I want to use a third party extension, "Phoca pdf", that requires core Joomla icons.
Flexicontent use differents files to display icons (icons such as edit, print, email...) so Phoca pdf doesn't work because the pdf icon not displaying at all.

The file in question, with Joomla core icons, is the following :
[ROOT]/layouts/joomla/content/icons.php

Phoca recommand to modify this file by replacing :
Code:
<?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 btn-default dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#"> <span class="glyphicon glyphicon-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>

to :
Code:
<?php 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"> <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#"> <span class="glyphicon glyphicon-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; ?> <?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>

So where can I apply these modifications in Flexicontent equivalent files ?
And could you give me the correct script please ?

Thank for your answer. :)

Regards.

Flexicontent 4.1.0b1
Joomla 3.9.18

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago - 2 years 9 months ago #81917 by micker
hello
i am not sure that can work with flexicontent maybe only with title and description no custom field
but in fact you can create your own custom item template by duplicate dfault template and edit item.php field
and put
Code:
<?php $phocaPDF = false; if (JPluginHelper::isEnabled('phocapdf', 'content')) { include_once(JPATH_ADMINISTRATOR.'/components/com_phocapdf/helpers/phocapdf.php'); $phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($displayData['item'], $displayData['params']); } ?>

and add button
Code:
<?php echo $phocaPDF; ?>

but we can't provide more support for phoca component you need to ask him

 

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]
Last edit: 2 years 9 months ago by micker.

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #81918 by bendeb
Thank Micker for your answer.
I tried it but it doesn't work.

I put this in my template :
Code:
<?php $phocaPDF = false; if (JPluginHelper::isEnabled('phocapdf', 'content')) { include_once(JPATH_ADMINISTRATOR.'/components/com_phocapdf/helpers/phocapdf.php'); $phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($displayData['item'], $displayData['params']); } ?> <?php echo $phocaPDF; ?>

And I get an error : 0 - Call to a member function get() on null

I put the code in category_items.php of my template, because I want to have the Pdf button at this place (on category view with items listing).
If you have any idea to fix it, it will be nice.
Thank for your help.

Flexicontent 4.1.0b1
Joomla 3.9.18

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #81919 by micker
Hello a first i think your previous code IS for item view not for category
Second ... WE Cant provide support for 3th extension you need to Ask on phoca
Third i didnt think it cant works with custom field...
When i do it its custom works (paid for each project)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #81920 by micker

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #81924 by bendeb
Thank Micker,
I'll try to do the job with tcpdf.

Regards.

Flexicontent 4.1.0b1
Joomla 3.9.18

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.842 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline