Phoca download plugin : open a file directly into a new browser tab

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
User avatar
fabio42
Phoca Enthusiast
Phoca Enthusiast
Posts: 81
Joined: 09 Oct 2018, 16:39

Phoca download plugin : open a file directly into a new browser tab

Post by fabio42 »

Hello !
Once again, a thousand congrats for all the tools you are working on and which clearly make our lives easier !! :twisted:
Here's what I would like to achieve with Phoca download plugin , into an article : I want to create a link to one of the files which belongs to one of my Phocadownload categories.
A typical link would be :

Code: Select all

{phocadownload view=file|id=370|target=b}
Now,whatever I choose for the "target" (b/p/s/t), I constantly have the same thing happening in Firefox : when users click on the link in the front end, they get a window asking them to choose between "saving" or "opening" the file. I would like to squeeze this step and what I would like is when they click on the link, the file (typically, a pdf for example) would open in a new browser tab without having this window).
How can I do that ?
Thanks for helping !
Fabio

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca download plugin : open a file directly into a new browser tab

Post by Jan »

Hi, it depends on user's browser settings, how PDFs will be displayed.

In Phoca Download you can force downloading PDFs when "Download" is used or force displaying when "Preview" is used, but the last word has always the browser.

So, there are a lot of different combinations, like e.g. the link has target blank, but it should be downloaded - so the target is useless, or the link should be a preview link, but browser does not have extension to display the document, etc. etc.

And it of course depends on if the link is direct link (in fact no rules can be set by Phoca Download) or standard link.

Jan
If you find Phoca extensions useful, please support the project
User avatar
fabio42
Phoca Enthusiast
Phoca Enthusiast
Posts: 81
Joined: 09 Oct 2018, 16:39

Re: Phoca download plugin : open a file directly into a new browser tab

Post by fabio42 »

Hello Jan,
Thanks for your detailed answer. I get that the browser is the key to that, but generally (I even have an attachment plugin in my joomla website which does this systematically - i.e. open the pdf [on the front end in an article ] in a new tab directly -), whenever I click on a pdf link, it opens directly into a new tab in Firefox on my computer (probably because it is set like this, and I know some people do not choose this option). If I want it like that for a file with the phoca download plugin, what do you advise me to do ? A preview link then ? This is what I don't quite get.
Thanks in advance !
Fabio
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca download plugin : open a file directly into a new browser tab

Post by Jan »

Hi, in Phoca Download, the preview function opens the PDF in Popup window or in modal box:

Image

The download function just forces downloading of the file instead of previewing it - because it is just download function.

The download function with direct link just opens the PDF in browser but it depends on browser settings - if it will be displayed directly or box with option with "how to open the file" will be displayed.

Did you try to enable direct link for the file and test how the PDF will be displayed?

Jan
If you find Phoca extensions useful, please support the project
User avatar
fabio42
Phoca Enthusiast
Phoca Enthusiast
Posts: 81
Joined: 09 Oct 2018, 16:39

Re: Phoca download plugin : open a file directly into a new browser tab

Post by fabio42 »

Bam ! That was it ! Direct link of course !!! Thanks a million times ! Problem solved ! And thanks for reminding me of the preview functionalities too !
Great job you do ! :twisted:
Fabio
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca download plugin : open a file directly into a new browser tab

Post by Jan »

Hi, great to hear it.

Jan
If you find Phoca extensions useful, please support the project
jeffb
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 14 Dec 2023, 13:07

Re: Phoca download plugin : open a file directly into a new browser tab

Post by jeffb »

Direct Link fixed it for me too, thanks. Do I have to do that for every file or is there a default I can change? Can't find it in the settings.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca download plugin : open a file directly into a new browser tab

Post by Jan »

Hi, this is setting for the files only.

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