Download restricted files - Redirected to a custom page

Phoca Download - download manager
User avatar
wolter
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 Jan 2018, 17:25

Download restricted files - Redirected to a custom page

Post by wolter »

When unregistered users want to download restricted files, it will direct them to a login page. What i am looking for is to change the redirection to a custom page, which file do i need to edit to accomplish this ?

Note:
I am aware the message when being redirected to the login page can be changed in the language string in language file - in language file - in ini, but this is not what i am looking for.


Cheers and thanks for a great extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download restricted files - Redirected to a custom page

Post by Jan »

Hi, in the code, you should search for redirect code.

Just search on your filesystem the string: "index.php?option=com_users&view=login" in phoca download folder to get info where the redirection is applied.

Jan
If you find Phoca extensions useful, please support the project
User avatar
wolter
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 Jan 2018, 17:25

Re: Download restricted files - Redirected to a custom page

Post by wolter »

Thanks for reply!
User avatar
wolter
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 Jan 2018, 17:25

Re: Download restricted files - Redirected to a custom page

Post by wolter »

com_phocadownload/controllers/user.php
com_phocadownload/models/file.php
com_phocadownload/models/play.php
com_phocadownload/views/user/view.html.php


Changing the redirection where the sentence "index.php?option=com_users&view=login" can be found in any of theses 4 files does not make any difference. Any other suggestions ?

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

Re: Download restricted files - Redirected to a custom page

Post by Jan »

Hi,
files does not make any difference.
Any difference to what?

Try to search all the "redirect" strings, to see if there is no redirect set with variable (not a string)

Jan
If you find Phoca extensions useful, please support the project
User avatar
wolter
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 24 Jan 2018, 17:25

Re: Download restricted files - Redirected to a custom page

Post by wolter »

Sorry for not being clear. What i mean is that changing redirect into any custom url in those files does not make any difference, still redirects to same location and not to the custom url i entered.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download restricted files - Redirected to a custom page

Post by Jan »

Hi, are you sure, your template or another system plugin does no override the output of the component (I mean you change the code in component, but it is overriden by template, so it is inactive) :ide:

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