valiant wrote:
have you already looked into docs/EMBEDDING, and modules/core/classes/GalleryEmbed.class?
I've read the embedding doc, and looks at the GalleryEmbed class, and it's way over my head. I know enough PHP to write a website that integrates with a simple database, but I can't follow what's going on here. I know far more perl.
Quote:
Basically, you map users of your own application/database to users of G2. (GalleryEmbed::addExternalIdMap() for existing users and GalleryEmbed::createUser() for new users).
Pretend for a second that I even know where to override/add the addExternalIdMap call, isn't this going in reverse? I have an app (in perl/mysql) that's been in use for over 5 years, and has an established userbase (of old friends). I'd like to let them use the same username/password in gallery without reregistering.
I can handle the two admin interface to assign privileges, and I don't need them to be able to register via gallery, but I just need one thing (subtopics for clarification):
(1) Have gallery query a different database to ask if this is a valid username/password.
(a) If the username is valid but no gallery username exists, create one.
(b) If the username is valid, and an identical username exists in gallery, use it.
(c) If the username is invalid, reject it and/or treat them as a guest.
I don't need the ability to make it seemlessly integrated (though that's a nice feature, I host other sites that use embedded gallery), I just want a single logon solution using a registration process provided by a separate app. Seems like this could be done in a general way by providing gallery with (a) the credentials for the other database (dbname, host, username, pw), and (b) the name of the fields (username, MD5(password)).
All the embedding docs I've come across seem to want to do far more than that. I don't care if cookies transfer across. I don't care if deleted users take up space in the gallery db. I don't care if it looks like it's all one application.
Can anybody provide hints as to how to do this?