I have been looking at the integration tools. Here's what I know so far:
- e107 uses 1 cookie (default name = "e107cookie")
- cookie is in format id#.encpasswd where id# is obviouslty the user's id number, and encpasswd is the password in the database (text password having been run through md5) run through md5 again. Eg. if the text password was Password, then the database would contain dc647eb65e6711e155375218212b3964, and the cookie would contain b8498ee29e56e711a268ae8cc461ae94.
- the field in the database to determine if a user is valid (user_ban) uses 0 to show a user is valid, and 1 if they are not. This may be why I get 0 members listed, and errors show when I try to list users ( see http://urbanlines.net/gallery/memberlist.php?debug=1 ).
Results so far are that it recognises when I put the correct username/password in (tells me if it's wrong) but then it still doesn't log me in. It creates 4 cookies: - e107cookie (userid) - wsnpass (password as in database) - testcookie (userid) - returnto (page I tried to log in from)
I'm a bit stuck on getting it to read/write the cookies. I'm guessing I need to add $cookietype = 'e107'; then edit classes/members.php to include an else if ($cookietype == "e107") section or 2, but not sure what or where.
Is this going to be a simple job, or will loads of complicated changes be needed?
Had a play with what you sent, and a bit of a rethink. I was thinking that I needed to allow users to log in via the gallery. Of course I can just direct them to the main site to log in and use the cookie created there to allow access to the gallery. D'oh!
Well, the changes required to allow integration to e107:
create an integration script integration/e107.php:
Also worth taking out all login username/password forms from the gallery template you're using and redirect guests to the e107 login page. That's the bit I'm going to do next as I'm going to be able to design a template that fits nicely inside the CMS page.
Comments on e107 integration
Member
Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK
Total Topics: 7
Total Comments: 20
I have been looking at the integration tools. Here's what I know so far:
- e107 uses 1 cookie (default name = "e107cookie")
- cookie is in format id#.encpasswd where id# is obviouslty the user's id number, and encpasswd is the password in the database (text password having been run through md5) run through md5 again. Eg. if the text password was Password, then the database would contain dc647eb65e6711e155375218212b3964, and the cookie would contain b8498ee29e56e711a268ae8cc461ae94.
- the field in the database to determine if a user is valid (user_ban) uses 0 to show a user is valid, and 1 if they are not. This may be why I get 0 members listed, and errors show when I try to list users ( see http://urbanlines.net/gallery/memberlist.php?debug=1 ).
I have added the following integration code
Results so far are that it recognises when I put the correct username/password in (tells me if it's wrong) but then it still doesn't log me in. It creates 4 cookies:
- e107cookie (userid)
- wsnpass (password as in database)
- testcookie (userid)
- returnto (page I tried to log in from)
I'm a bit stuck on getting it to read/write the cookies. I'm guessing I need to add $cookietype = 'e107'; then edit classes/members.php to include an else if ($cookietype == "e107") section or 2, but not sure what or where.
Is this going to be a simple job, or will loads of complicated changes be needed?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Replace with
and that might work, though I'm not sure.
- the field in the database to determine if a user is valid (user_ban) uses 0 to show a user is valid, and 1 if they are not.
You'll have to not integrate that field.
Member
Usergroup: Member
Joined: Dec 19, 2003
Location: Stoke, UK
Total Topics: 7
Total Comments: 20
Had a play with what you sent, and a bit of a rethink. I was thinking that I needed to allow users to log in via the gallery. Of course I can just direct them to the main site to log in and use the cookie created there to allow access to the gallery. D'oh!
Well, the changes required to allow integration to e107:
create an integration script integration/e107.php:
classes/members.php - replace with
classes/members.php - replace with
Also worth taking out all login username/password forms from the gallery template you're using and redirect guests to the e107 login page. That's the bit I'm going to do next as I'm going to be able to design a template that fits nicely inside the CMS page.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Thanks, I've included those changes for the next release.