Login box instead of blank page in case of "just for registred users" category ?

Phoca Download - download manager
User avatar
fabio42
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 09 Oct 2018, 16:39

Login box instead of blank page in case of "just for registred users" category ?

Post by fabio42 »

Hello !
I am trying to find a solution to this issue.
I have a main menu on my website with a "downloads" link containing sublinks all leading to phocadownload cateogries (List of Files (Category View) ). Public users have the possibility to see the links leading to the categories (sort of a teaser for them to register if they want to have access to richer private contents ...), and when they click on the links, they get a blank page. The links have a "public" access whereas the categories have a "registered" access. What I would like to obtain is that : when a public user clicks on the link in the main menu, they are redirected to a login page asking them to login. Instead, what they have is a blank page, which is kind of telling them that there is nothing in the category they wish to access.
How can I achieve this please ?
Thanks for your help !
Fabio
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47813
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by Jan »

Hi, this way Phoca Download works - when there is some file which is not accessible, then you are redirected to login and then back... Blank page mostly means a PHP error. Did you try to discover what is behind the blank page?
https://www.phoca.cz/component/content/ ... rs-on-site
Jan
If you find Phoca extensions useful, please support the project
User avatar
fabio42
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 09 Oct 2018, 16:39

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by fabio42 »

Hi !
Thanks for answering. I have consulted the link which explains how to show php errors. Yet, I cannot find the way to do it :
* I have no way to access php.ini
* When I insert the code in my .htaccess file, I get a 500 internal server error message so I cannot view my website anymore

Next, I realize that my explanation was not clear. What I meant by "blank page" was that in fact, when users click on the link (in the menu) which leads to a registered access category of phocadownload, this redirects them to a page where they see :
* the box "powered by phocadownload" but this category shows no file in it , it is empty, it is "blank" (sorry for the wrong name, it's not the page which is blank but the box where the files should appear !!!! :oops: )
What I would like to have is a redirect to the login page to make public users understand they have to login to have access to this category ...
Thanks in advance
Fabio
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47813
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by Jan »

Hi, now I understand.

In File edit, you can define that not accessible file will be displayed for all users, even for them, who have no access to it. When they will try to download it, the site will be redirected to login and after login back to download of the file.

Image

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

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by fabio42 »

alright ! I knew that as I use it sometimes. But I use it when I want people to show files and entice them to login whenever they want to download them. What I asked for in my post was if it was possible to have the login box appear directly when people click on the link in my menu, but apparently this does not seem possible, except if I show the files and they click on it, right ?
Fabio
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47813
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by Jan »

Hi, yes, there is no such option to display login box inside Phoca Download view, so this needs to be customized directly in the code :-(

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

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by fabio42 »

No worries ! Thanks for your answer anyway !
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47813
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login box instead of blank page in case of "just for registred users" category ?

Post by Jan »

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