Topic-icon Completely replace Joomla Login

Active Subscriptions:

None
10 years 4 months ago #39804 by SteelMan
Hello. Using iJoomla Ad Agency. Have a banner ad. Non-logged in user clicks on add, resulting link is "must be registered" type, so system takes user to Joomla login screen automatically, Smooth, nice. But, I would like the login to be consistent and would like these same steps to take them to the sclogin screen.

How do I make that happen?

Thanks!
The topic has been locked.
Support Specialist
10 years 4 months ago #39816 by alzander
SCLogin is a module, it doesn't have a full component view that you can display to your visitors.

If you want to display the SCLogin on that page, the best suggestion I'd have is:
* 'override' the standard Joomla login view by copying /components/com_users/views/login/tmpl/default_login.php to /templates/<YOUR_TEMPLATE>/html/com_users/default_login.php (creating any of those directories that don't already exist).
* Remove any content from that file that you don't want... possibly all of it.
* Create an instance of the SCLogin module, and have it appear in a template position that would show up on the Login page.

That should hopefully get you started, but if not, let me know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 3 months ago - 10 years 3 months ago #40564 by SteelMan
Thanks for the suggestion. Just came back to this.

Seems like a bit of a hole in the system to not have the JFBC used in all cases.

When I copy the default_login.php to /templates/mytemplate/html/com_users folder and delete everything in it, the actual default_login.php still shows up when a menu option is chosen that requires login prior to access.

I got it to work like this which is very close to what you suggested:

copy /components/com_users/views/login/tmpl/default_login.php to /templates/mytemplate/html/com_users/login/default_login.php
strip out code and add: < script >window.location = "/login";< /script >

Thanks for the starting place!


*** UPDATE ***
The solution of forwarding in that way had two problems: it added the possibility of being seo penalized, and it did not continue on to the destination after login.

Your suggestion of removing the contents of the joomla component default page and putting the JFBC module on that selection is smoother and it does continue on to the destination after login.

The problem is, this "www.lipsapp.com/component/users/?view=login" does not show up as a menu selection to check to add the module to the page, even if I create a menu selection pointed to it. So I had to use "On All Pages Except Those Selected" and check almost everything.

The problem with that is that the JFBC module shows up on other non-menu, component directed pages, like forgot username. Which I can not have.

Your advice?
Last edit: 10 years 3 months ago by SteelMan.
The topic has been locked.
Support Specialist
10 years 3 months ago #40802 by alzander
Randy,
First off, I'm very sorry for the delayed response.

As to the above, good catch on figuring out the correct path to copy the file to. When you do a template override of a component, you need to include the view name as well (com_users/login/default_login.php in the case above).

I'm not sure exactly what your /login page is, so I can't guess everything about how it should work. For saving and redirecting properly after login, the proper way would probably be to also pass along whatever return variable is set in your redirect, like:
[code]<script>window.location = "/login" + location.search;</script>
That should properly append the return variable (and any other query string parameters) to the redirected URL.

One final note, it is possible to disable normal user registration in the Joomla User manager. There's a setting for that in the "Options" area. With that disabled, JFBConnect will still create users. When a user tries to go to the registration page, they will automatically be redirected to the login page. With your change, that login page will automatically direct to whatever your /login URL is, and I *think* that is what you're looking for.

I hope that helps, but if you need anything else, have any comments or suggestions for improvement just let me know. Again, sorry for the delay.

Thanks,
Alex
The topic has been locked.