Open .pdf in a new window

Phoca Download - download manager
martinezfdezjl
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Apr 2013, 16:54
Location: Madrid

Open .pdf in a new window

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

Re: Open .pdf in a new window

Post 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
If you find Phoca extensions useful, please support the project
martinezfdezjl
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Apr 2013, 16:54
Location: Madrid

Re: Open .pdf in a new window

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

Re: Open .pdf in a new window

Post by Jan »

Hi, I think you need to directly code the php files :idea:

Jan
If you find Phoca extensions useful, please support the project
martinezfdezjl
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Apr 2013, 16:54
Location: Madrid

Re: Open .pdf in a new window

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

Re: Open .pdf in a new window

Post by Jan »

Hi, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply