Page 1 of 1
Login form for Upload
Posted: 27 Nov 2017, 19:22
by SvenZ
If someone wants to upload a file (UserUpload) without loggin in, then the standard Joomla login page will appear.
But I use for all my login/logout not the standard page but the SCLogin module.
How can I change the behaviour of Phoca Download to show the SCLogin instead of the standard Joomla login?
regards
Sven
Re: Login form for Upload
Posted: 27 Nov 2017, 20:18
by Jan
Hi, hmm, I think, the code directly needs to be customized. If some page can be accessed only after login, then there is a redirect:
Code: Select all
JRoute::_('index.php?option=com_users&view=login', false);
So this code needs to be found and replaced by your own
Jan
Re: Login form for Upload
Posted: 28 Nov 2017, 16:51
by SvenZ
where? in which file?
regards
Sven
Re: Login form for Upload
Posted: 30 Nov 2017, 20:26
by Jan
Hi, it is not stored only in one file, you need to find this string in all the frontend files:
components/com_phocadownload/ ... (just use some standard search function - e.g. search in files in Notepad++
Code: Select all
Search "JRoute::_('index.php?option=com_users&view=login'" (2 hits in 2 files)
components\com_phocadownload\controllers\user.php (1 hit)
Line 25: $this->loginUrl = JRoute::_('index.php?option=com_users&view=login', false);
components\com_phocadownload\models\play.php (1 hit)
Line 44: $app->redirect(JRoute::_('index.php?option=com_users&view=login', false), JText::_("Please login to download the file"));
Jan
Re: Login form for Upload
Posted: 01 Dec 2017, 16:04
by SvenZ
OK, thanks.
I got the phrases as well.
And what ist the part I have to replace by what ?
I think it's the ..."com_users&view=login"
But replace by what?
regards
Sven
Re: Login form for Upload
Posted: 03 Dec 2017, 20:06
by Jan
Hi, unfortunately I don't know the SCLogin module so I cannot give any clue advice which pare of your site cares about the login instead of standard login
Jan