Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 30, 20222 yr I store my files with an external file host. And when i "Add files by URL" the page opens i the same window. I want it to open in a new window. I've gone through everything in the control panel but can't find anything that can do this. Anybody who can help me with this ???? Eivind
October 31, 20222 yr There is no built in facility to do this unfortunately. This is intentional as the system was designed
October 31, 20222 yr Are you just pointing to files on that external host or is it like a download page that comes up? Normally, there should be no need to worry about the windows with direct file links. If everything is set up properly, the external file would just be downloaded and the user would stay on your website.
October 31, 20222 yr I think he's talking about submit files from URLs, like: In that case, when you click to download, you're redirected to that site. /* Download */ if ( $data['record_type'] === 'link' ) { \IPS\Output::i()->redirect( $data['record_location'] ); } else { $file = \IPS\File::get( 'downloads_Files', $data['record_location'], $data['record_size'] ); $file->originalFilename = $data['record_realname'] ?: $file->originalFilename; $this->_download( $file ); } Location: This can be done via plugin.
October 31, 20222 yr 2 minutes ago, Adriano Faria said: think he's talking about submit files from URLs, Yes, that’s what I mean as well. If you add a file URL (not a page), it should directly download that file. That’s why I am asking what type of URL we are talking about.
October 31, 20222 yr 2 minutes ago, opentype said: If you add a file URL (not a page), it should directly download that file Just tested and that's it. Tried with a .zip and it downloads; it doesn't redirect.
November 1, 20222 yr Author I just add a file URL and it taking me away from my site. Take a look here and try the link: https://esimensen.tech/cms/index.php?/files/file/4-avast-security-for-mac/
November 1, 20222 yr Solution Themes > Edit HTML/CSS (Enter advanced mode if you are on simple) > Templates > downloads > view > downloadButton Add a "target="_blank"" on line 11, the code will look like this: {{else}} <a target="_blank" href='{{if settings.idm_antileech AND !$file->requiresDownloadConfirmation()}}{$file->url('download')->csrf()}{{else}}{$file->url('download')}{{endif}}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important' {{if $file->requiresDownloadConfirmation()}}data-ipsDialog{{endif}} data-datalayer-postfetch >{lang="download_now"}</a> {{endif}} </li> Some observations... You will no longer receive auto-update in this edited template. I only recommend it if your downloads are based on external links, I don't know how that might behave for uploaded files.
November 1, 20222 yr 4 hours ago, dogbone said: I just add a file URL and it taking me away from my site. Take a look here and try the link: https://esimensen.tech/cms/index.php?/files/file/4-avast-security-for-mac/ This is a link to page, not a file itself (.zip, .tar, etc), that’s why you’re redirected.