How to directly download the file when pressing the Download button in the File List?

Directly download through List Files menu item

In order to skip the Details pages of the files and to start the download directly, when pressing the name of the file or the "Download" button in the List Files menu, some source code modifications will have to be made to RSFiles!. The file that you will have to modify is components/com_rsfiles/views/rsfiles/tmpl/default.php. Here, you will have to go around lines 168, 179, search for:

view=files&layout=download&path=

and replace it with:

task=download&path=

Now the file will be downloaded directly from the name or the "Download" button.

You can also achieve this functionality by using template overwrites(this way the source code modifications will not be lost when an update is performed).In order to create a template overwrite please try:

  1. going to templates/your_template_name/html and created a new folder named com_rsfiles;
  2. inside this folder you will need to create a second folder named files;
  3. you will then need to go to components/com_rsfiles/views/rsfiles/tmpl and copy the default.php file in your newly created files folder;

You can now change the appearance of this view by editing the code of the default.php file from templates/your_template_name/html/com_rsfiles/rsfiles.


Directly download RSFiles! items in articles

If you are using the "System - RSFiles!" plugin to add files within your articles and want to directly download them too, you will have to modify the plugin's PHP file.

The file you need to modify is located under this path:

\plugins\system\rsfiles\rsfiles.php

Open it and search for:

&view=files&layout=download&

This peace of code is found two times. Replace it with:

&task=download&

Note:

Any modifications to the system plugin source code will be lost upon further updates of the component.


2 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Filenames are not being displayed in the frontend