Page 1 of 1
Phoca download plugin : open a file directly into a new browser tab
Posted: 13 Apr 2020, 23:41
by fabio42
Hello !
Once again, a thousand congrats for all the tools you are working on and which clearly make our lives easier !!
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
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 14 Apr 2020, 19:38
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
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 14 Apr 2020, 19:50
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
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 16 Apr 2020, 00:18
by Jan
Hi, in Phoca Download, the preview function opens the PDF in Popup window or in modal box:
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
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 16 Apr 2020, 09:21
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 !
Fabio
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 16 Apr 2020, 13:32
by Jan
Hi, great to hear it.
Jan
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 14 Dec 2023, 13:16
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.
Re: Phoca download plugin : open a file directly into a new browser tab
Posted: 14 Dec 2023, 18:45
by Jan
Hi, this is setting for the files only.
Jan