Page 1 of 1

Open .pdf in a new window

Posted: 25 Apr 2013, 14:26
by martinezfdezjl
Hi,

Sorry if the question is in the forum yet, but i dont see. :?

Someone can know yet that i try to construct a biblo page with phoca download. The documents are .pdf that have more than 3MB usually, and i put this documents in a directory and put a link to them in article of phoca component.

But the download open the pdf in the same window of my portal.. but i need that pdf open in a new window and i dont know how to put this in configuration of phoca article.

its possible to do this? :!:

Re: Open .pdf in a new window

Posted: 25 Apr 2013, 20:06
by Jan
Hi, I think, in such case you need to modify the plugin and set e.g. target="_blank" for the links, etc. :idea:

Jan

Re: Open .pdf in a new window

Posted: 26 Apr 2013, 10:03
by martinezfdezjl
Jan wrote:Hi, I think, in such case you need to modify the plugin and set e.g. target="_blank" for the links, etc. :idea:

Jan
But... this action is in .php files, not in options of phoca... really?

Re: Open .pdf in a new window

Posted: 27 Apr 2013, 16:57
by Jan
Hi, I think you need to directly code the php files :idea:

Jan

Re: Open .pdf in a new window

Posted: 29 Apr 2013, 14:02
by martinezfdezjl
Jan wrote:Hi, I think you need to directly code the php files :idea:

Jan
Ok, perhaps this can be util for somebody.

I have the pdf in another server, not in joomla directory, and i put in phoca download like external link. To get the pdf in a new window, y modify the file default_files.php (components\com_phocadownload\views\category\tmpl\default_files.php) in line 37:

Original line:
$linkDownloadB = '<a href="'. JRoute::_(PhocaDownloadHelperRoute::getFileRoute($v->id,$this->category[0]->id,$v->alias, $this->category[0]->alias, $v->sectionid, 'download').$this->tmpl['limitstarturl']).'" >';


My line:
$linkDownloadB = '<a href="'. JRoute::_(PhocaDownloadHelperRoute::getFileRoute($v->id,$this->category[0]->id,$v->alias, $this->category[0]->alias, $v->sectionid, 'download').$this->tmpl['limitstarturl']).'" target="_blank">';

Re: Open .pdf in a new window

Posted: 07 May 2013, 19:21
by Jan
Hi, thank you for the guide.

Jan