• Welcome to Simple Machines Community Forum. Please login or sign up.

other areas to change login/register/logout links

Started by chadness, December 31, 2004, 10:47:20 AM

Previous topic - Next topic

chadness

In the readme for the mambo login form, it mentions changing the login2 to mambo_login (as well as the logout and registration links) in the link in themedirectory/languages/index.english.php but I found there were a few other files in the default template I had to change as well.  One change was in BoardIndex.template.php - there is a link to login2 there that needs to be changed to mambo_login.  This shows up at the bottom of the forum if you aren't logged in in the default template.  Another was Login.template.php, which you are routed to if you put in the incorrect password.  There were a couple of places to change it in there, plus a change for the register link.

Hope this makes sense to everyone, and I hope I didn't miss any :)

PaulEarley

I am using the default theme/template for SMF (1.0, but says 1.0rc) The bridge instructions for the mod_smf_login.php instruct you to change in your template:
1) ?action=register to ?option=com_smf_registration&task register
2) action=login2 to action=mambo_login
3) action=logout to action=mambo_logout

So I grepped the SMF files for the default SMF installation and found the following occurrences of each:
1) Register change = 6 Files, 7 occurrences
2) login change = 10 files, 14 occurrences
3) logout = 5 files, 6 occurrences

Here is my question:
Should the changes noted in the login module be made in ALL of these files?

Thanks
Paul Earley

[Unknown]

IMHO, why not hit the source and just add a redirect to login/logout/register?  I know the point is to change SMF and Mambo as little as possible, and I'm working to make this more of a possibility with 1.1... but, really now, won't it be simpler to make the change to SMF?

Example:
redirecexit('action=mambo_login');

-[Unknown]

Janner

I must admit to being a little confused by these changes:

If I do everything strictly as per the instructions I end up with two possible registration processes. If I follow the link from the login module I am routed through the Mambo registration form (./index.php?option=com_smf_registration&task=register). However, if I follow one of the links from the forum area of the site I go through the SMF registration (./index.php?option=com_smf&Itemid=92&?action=register).

So, what are the implications? Will each and every registration be handled the same, regardless of which route it takes? Will they all be added to both the Mambo and SMF user tables?

Looking at some of the other sites that are running this bridge, there doesn't appear to be a clear convention. Some have it with the two distinct options. Others have changed all the registration links to point to the Mambo option, whilst others have changed all the links to the SMF option.

Apart from cionsistency on your site, does it actually make any difference?

Orstio

QuoteLooking at some of the other sites that are running this bridge, there doesn't appear to be a clear convention. Some have it with the two distinct options. Others have changed all the registration links to point to the Mambo option, whilst others have changed all the links to the SMF option.

Apart from cionsistency on your site, does it actually make any difference?

There is no clear convention, because different people want different things.

Some want for there to be a single registration, but separate logins.  Some want their forum to show wrapped in Mambo, others do not.  Some want their forum to show wrapped in Mambo, but have separate logins and registrations.

It all depends upon what you want.

QuoteSo, what are the implications? Will each and every registration be handled the same, regardless of which route it takes? Will they all be added to both the Mambo and SMF user tables?

Not necessarily.  It all depends on what you want.  If you want every registration to be handled the same, then you need to change all the registration links to be the same.

PaulEarley

Ok, so assuming I want one login/logout/registration for mambo/SMF I should make changes throughout SMF (all occurences) or make changes as directed by [Unknown], to wit:

redirecexit('action=mambo_login');

[Unknown], being somewhat new to php, where should this mod occur?
Paul Earley

Janner

Quote from: Orstio on January 12, 2005, 06:34:14 AM
Some want their forum to show wrapped in Mambo, others do not.  Some want their forum to show wrapped in Mambo, but have separate logins and registrations.
From the readme in the bridge file, I was under the impression that using the Mambo wrapper was a definite no-no:

QuoteDon't try to open your SMF in your wrapper component:  It will
not function correctly (logging in and out will not work properly, despite the fact that it LOOKS like everything is working
fine EXCEPT logging in and out.)

chadness

I think when he says wrapped in Mambo, he means running it inside of Mambo as a component, not using the wrapper component.  As in, putting a Component menu item that you use to run it, instead of using a Wrapper menu item that points to the external SMF URL.  The terminology is just a little confused.

chadness

Quote from: [Unknown] on January 12, 2005, 01:55:18 AM
IMHO, why not hit the source and just add a redirect to login/logout/register?  I know the point is to change SMF and Mambo as little as possible, and I'm working to make this more of a possibility with 1.1... but, really now, won't it be simpler to make the change to SMF?

Example:
redirecexit('action=mambo_login');

-[Unknown]
Oh, sure, if you want to be all fancy like that :)
Honestly, I didn't think of it, and wouldn't have known how to do it easily, but that makes a lot more sense for those like me who want everything to be run inside of Mambo.

jorgen

I'll try, but what file (and where in that file) would I modify in SMF?

Orstio

QuoteFrom the readme in the bridge file, I was under the impression that using the Mambo wrapper was a definite no-no:

QuoteI think when he says wrapped in Mambo, he means running it inside of Mambo as a component, not using the wrapper component.  As in, putting a Component menu item that you use to run it, instead of using a Wrapper menu item that points to the external SMF URL.  The terminology is just a little confused.

Chadness is correct.  Please do not confuse "wrapped in Mambo" with "using the wrapper component".

[Unknown]

Sorry, you'd put that in LogInOut.php, after:

// Perform the actual logging-in.
function Login2()
{
global $txt, $db_prefix, $scripturl, $user_info;
global $cookiename, $maintenance, $ID_MEMBER;
global $modSettings, $scripturl, $context, $sc, $sourcedir;


And then find:
// Log the user out.
function Logout()
{
global $db_prefix, $sourcedir, $ID_MEMBER, $context;


And add after:
redirectexit('action=mambo_logout');

How do I modify files?

-[Unknown]

PaulEarley

The two changes, in login2 and SMF Logout seem like a better way to go for my integrated mambo/SMF login/out/registration. If I make these changes, I assume I revert my SMF code changes (in about 20 places) and then only have these two (if, as Orsito points put, I desire a totally integrated mambo/SMF site).

I have noticed one other item that puzzles me. On my site, despite diverting to mambo login/logout, when I ask for a new password, I must make profile changes in the SMF profile page. This means when I display "Your Profile" on the Mambo site, I must use the SMF "Your Profile" page. This works, but is counter-intuitive. (Divert login process to mambo but use SMF profile update process). Is this because of the one way SMF --> mambo user info copy?

Janner

Quote from: [Unknown] on January 13, 2005, 04:07:19 AM
Sorry, you'd put that in LogInOut.php, after:

// Perform the actual logging-in.
function Login2()
{
global $txt, $db_prefix, $scripturl, $user_info;
global $cookiename, $maintenance, $ID_MEMBER;
global $modSettings, $scripturl, $context, $sc, $sourcedir;


And then find:
// Log the user out.
function Logout()
{
global $db_prefix, $sourcedir, $ID_MEMBER, $context;


And add after:
redirectexit('action=mambo_logout');

How do I modify files?

-[Unknown]

Gives me the following error when trying to login:

Fatal error: Call to undefined function: redirecexit() in /usr/.[removed some stuff./Sources/LogInOut.php on line 90

Kindred

Janner,

it's a mistype...

redirecexit('action=mambo_login');


should read

redirectexit('action=mambo_login');


([unknown] missed a "T" in tyuping redirect)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Orstio

QuoteI have noticed one other item that puzzles me. On my site, despite diverting to mambo login/logout, when I ask for a new password, I must make profile changes in the SMF profile page. This means when I display "Your Profile" on the Mambo site, I must use the SMF "Your Profile" page. This works, but is counter-intuitive. (Divert login process to mambo but use SMF profile update process). Is this because of the one way SMF --> mambo user info copy?

The login process is not really diverted to Mambo.  It is diverted to the script MOS_SMF.php instead of to Loginout.php.  MOS_SMF.php has the most important parts of both the SMF login and the Mambo login, with some more code to make them play nice together.  The login, even though it is named "mambo_login", is basically done through SMF but still sets the Mambo cookie.

Without writing a completely new integrated profile mananger (which would most likely turn out to be 99% the SMF profile anyway), the SMF profile is the best solution.  It already has everything you need:  It's just a matter of making a link to it.

Kindred

However, to truly bridge, we need to add a couple more connections.
Specifically, we need

1) to have the user edit his password in the SMF profile and have it changed on the mambo side as well...

2) A user deleted in SMF gets removed form mambo as well...


there's probably a few other features, but I think those are key to making a true integration.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

[Unknown]

Password changes are going to be more centralized in 1.1, if possible.  Deleting members is easy - deleteMembers in ManageMembers.php.

-[Unknown]

Orstio

Quote1) to have the user edit his password in the SMF profile and have it changed on the mambo side as well...

That's already done in v2.11.  Try it.  ;)

Advertisement: