Website goes blank!

Phoca PDF - creating PDF documents in Joomla! CMS
ocular
Phoca Member
Phoca Member
Posts: 16
Joined: 13 Oct 2010, 14:14

Re: Website goes blank!

Post 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.
bcordis
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Aug 2010, 03:45
Location: Nashville, TN USA
Contact:

Re: Website goes blank!

Post 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.
ocular
Phoca Member
Phoca Member
Posts: 16
Joined: 13 Oct 2010, 14:14

Re: Website goes blank!

Post 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"?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Website goes blank!

Post 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
If you find Phoca extensions useful, please support the project
ocular
Phoca Member
Phoca Member
Posts: 16
Joined: 13 Oct 2010, 14:14

Re: Website goes blank!

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Website goes blank!

Post 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
If you find Phoca extensions useful, please support the project
Post Reply