Login form for Upload

Phoca Download - download manager
SvenZ
Phoca Member
Phoca Member
Posts: 25
Joined: 15 Dec 2012, 16:48

Login form for Upload

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login form for Upload

Post 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 :idea:

Jan
If you find Phoca extensions useful, please support the project
SvenZ
Phoca Member
Phoca Member
Posts: 25
Joined: 15 Dec 2012, 16:48

Re: Login form for Upload

Post by SvenZ »

where? in which file?
regards
Sven
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login form for Upload

Post 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
If you find Phoca extensions useful, please support the project
SvenZ
Phoca Member
Phoca Member
Posts: 25
Joined: 15 Dec 2012, 16:48

Re: Login form for Upload

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Login form for Upload

Post 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 :idea:

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