Page 6 of 6
Re: Website goes blank!
Posted: 28 Oct 2010, 09:49
by ocular
Jan wrote:Hi, the solution can be hardcoding phocapdf url links to the article, there are three places where it should be changed, then the plugin does not need to search and replace the code in your site so the site is loading faster and there should not be any problem with blank site.
So steps they should be done:
- search the links to pdf in article views and replace the format=pdf to format=phocapdf
- comment the search and replace function in Phoca PDF plugin.
Jan
Thanks for suggestion
Am trying to hardcode format=pdf to format=phocapdf in links to pdf when click on pdf icon in article so that search and replace can be turned off. Am using fresh install of Joomla 1.5.20 + sample data
PDF icon shows in article,however when I view article in editor and look at code, the pdf icon stuff isn't there. It does show up when viewed in a browser/source. Is the placement of the pdf icon and code link template driven? Can you please help and suggest where i might find the code to change format=pdf to format=phocapdf.
Re: Website goes blank!
Posted: 28 Oct 2010, 22:40
by bcordis
kloppo wrote:Hi All,
I had exactly the same problem as the title is saying...
My solution is:
in the file "plugins/system/phocapdfcontent.php" replace all "preg_replace" with "str_replace"
thats all...
I'm not a php programmer but this working fine on my sites. Maybe this will help someone.
Have a nice day!
Pawel
this fixed my problem with a template. This should probably a fix made for this.
Re: Website goes blank!
Posted: 30 Oct 2010, 00:20
by ocular
Jan wrote:Hi, the solution can be hardcoding phocapdf url links to the article, there are three places where it should be changed, then the plugin does not need to search and replace the code in your site so the site is loading faster and there should not be any problem with blank site.
Jan
Could only find one place to change pdf icon url link "format=pdf" to "format=phacopdf"
in the file "components/com_content/helpers/icon.php" replaced "format=pdf" with "format=phocapdf"
with the search and replace disabled this seems to work, details -
viewtopic.php?f=37&t=11155
is there anywhere else that I should change to 'format=phocapdf"?
Re: Website goes blank!
Posted: 31 Oct 2010, 18:49
by Jan
Hi, if this work the is it Ok, it can be in 3 different articles views but if they are calling one and the same function then only one edit is Ok.
Jan
Re: Website goes blank!
Posted: 31 Oct 2010, 22:02
by ocular
The trouble with changing icon.php is that this is a change to a core joomla file. I believe that it is not possible to use a template overide for icon.php. If hard coding of format=phacopdf can be done via article views then a template overide should work and core files would remain intact. Will have to leave this for someone else.
Re: Website goes blank!
Posted: 01 Nov 2010, 15:35
by Jan
Hi, yes changing the article view is a second option (not tried in 1.5 yet), here is something similar for 1.6:
https://www.phoca.cz/documents/47-phoca- ... -and-usage
(Custom Install)
Jan