Page 2 of 3
Re: Problem PhocaPDF with SEO activate
Posted: 11 Mar 2009, 23:07
by Jan
Hi,
1) see:
https://www.phoca.cz/demo/phocapdf-demo , there is a SEF enabled, maybe for some non standard SEF there need to be created other hack
2) The name is here if you want to download the file. Try to enable downloading instead displaying PDF. If it will not work I will take a look at it.
3) Do you use your own header?
Jan
Re: Problem PhocaPDF with SEO activate
Posted: 12 Mar 2009, 09:02
by alex2001
thank you for quick reply, Jan!
1) I'm using standart Joomla SEF and current Joomla release. All other components and extensions are working fine, incl. your Phoca Gallery.
2) Thank you, it really works!
3) Oh.. now I realized that if header is set manully it published instead standart.. OK. I just imagine that custom header will be added to standart (my own header + standart Article Title / Author Name / Date )
So real problem is first. Standart Joomla SEF and your PDF. if it will be solved too, your component will be just excellent!
ps
thank you for your work, Jan!!!!
Re: Problem PhocaPDF with SEO activate
Posted: 12 Mar 2009, 09:05
by alex2001
by the way, Jan, which setting of standart SEF you use on your demo web-site?
my are:
SEO settings
1. SEF Urls - "Yes"
2. Use Apache mod_rewrite - "No"
3. Add suffix to URLs - "Yes"
i guess your 3rd standart SEO setting is "No".
SO I FOUND WHAT'S HAPPENED!
===========================
if I change "Add suffix to URLs" - "No" then EVERYTHING IS WORK.
(links to pdf like yours:
https://www.phoca.cz/demo/phocapdf-demo?format=phocapdf)
so your PDF is not working if 3rd standart SEO setting is "Yes".
(links to pdf like mine:
https://www.phoca.cz/demo/phocapdf-demo.pdf)
any thoughts? can you solve it? or I have to change my SEO settings?
Re: Problem PhocaPDF with SEO activate
Posted: 12 Mar 2009, 09:19
by alex2001
hmmm... everything like in your talk with zico last month.
ps
I use 3rd SEO setting "Yes" 'cos I would like my Joomla pages looks in classic way, ends with .htm, not as directories.
Re: Problem PhocaPDF with SEO activate
Posted: 13 Mar 2009, 15:21
by alex2001
hey, dear Jan or someone else, how to solve problem with standart Joomla SEF?
with standart Joomla option "Add suffix to URLs" - "Yes" PhocaPDF doesn't work...
Re: Problem PhocaPDF with SEO activate
Posted: 14 Mar 2009, 00:15
by Jan
Hi
Phoca PDF try to find the url where the PDF should be displayed, it tries to find it before it comes to SEF overwriting, if it find some url, it overwrites it for Phoca PDF url, so it changes format=pdf to format=phocapdf... Standard SEF should convert it without any problems because it doesn't convert the pdf part of url, if there is some other SEF method, then maybe some settings need to be changed in such SEF solution...
If the suffix .html will be used, then standard PDF instead of Phoca PDF will be used. I will take a look at it, but I think I will be not able to change such behaviour
The solution can be use this PDF behaviour in core Joomla! but I still didn't get any answer about such possibility
Jan
Re: Problem PhocaPDF with SEO activate
Posted: 19 Jul 2009, 12:53
by mustikka
Hi,
Here is a dirty workaround :
In your template folder, edit /html/article/com_content/default.php (or copy the one from /components/com_content/views/article/tmpl/default.php )
Find the lines :
Code: Select all
<?php if ($this->params->get('show_pdf_icon')) :
echo JHTML::_('icon.pdf', $this->article, $this->params, $this->access);
endif;
and replace them by :
Code: Select all
<?php if ($this->params->get('show_pdf_icon')) :
echo ereg_replace('\.pdf','.pdf?format=phocapdf',JHTML::_('icon.pdf', $this->article, $this->params, $this->access));
endif;
Worked for me.
Hope this helps
Re: Problem PhocaPDF with SEO activate
Posted: 19 Jul 2009, 15:42
by mustikka
Much more dirty but works in all cases (got a bug with some category display)
replace the previous post code with :
Code: Select all
<?php if ($this->params->get('show_pdf_icon')) :
$link = JHTML::_('icon.pdf', $this->article, $this->params, $this->access);
if (strstr($link,'.pdf?')) {
echo ereg_replace('\.pdf\?','.pdf?format=phocapdf&',$link);
} else {
echo ereg_replace('\.pdf','.pdf?format=phocapdf',$link);
}
endif;
Re: Problem PhocaPDF with SEO activate
Posted: 21 Jul 2009, 19:27
by Jan
Ok
Re: Problem PhocaPDF with SEO activate
Posted: 22 Aug 2009, 05:26
by BradC
Hi
Have the same problem and cannot get
mustikka's dirty workarounds to work. Like the others, if I turn off 'Add suffix to URLs' it works. But this is not the solution I need.
Not Found
The requested URL /wine-list/component.phocapdf was not found on this server.
In Joomla version 1.5.14 the code looks a little different than mustikka's
Code: Select all
<?php if ($this->params->get('show_pdf_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHTML::_('icon.pdf', $this->article, $this->params, $this->access); ?>
</td>
<?php endif; ?>