I managed to add a few more things:
- Facebook autologin - there has been code for this before, but I do not know how it could have worked. (It did not work for me.) This new feature is optional and needs to be enabled explicitly, because I suppose some gallery admins might not want it.
What does it do? It tries to detect whether someone who is not logged on to the gallery, is logged on to Facebook -- and then automatically logs him in to the gallery, too, without needing a mouse click. - Configuration GUI via the plugins page (finally!), and also have a few words there about the basic usage and that it needs a Facebook App Registration
- Optionally add the big ugly(?) Facebook login button, with configurable HTML markup for (absolute) positioning. This should also address the problem that some themes (->curves? others?) prevent the "normal" button from being added to the layout
- Stay on same Coppermine page during Facebook login and also logout (no more redirecting to gallery index)
- If CPG setting comment_promote_registration is enabled, customize the text to not only promote normal login but also Facebook login
Some proactive support attempts :-) Because I know that this beast is indeed very complicated and not easy to manage/troubleshoot.
If you should have a problem with the login process, try to find out where exactly it stops from working. Tools like
LiveHttpHeaders or
IEhttpHeaders might help with that.
There can be actually three... well... four ways how it can go wrong:
- AppId/Secret are wrong (= not identical with the Facebook App Registration)
- In the Facebook App Registration the specified page URL is wrong (= not identical with the actual Gallery URL)
- Something inside Coppermine prevents the login
- Still some problem with the plugin code...
If you should have a problem with the new v1.4 autologin feature
- Have you enabled it in the plugin settings?
- Please wait for a moment. For me it seems to take a few seconds until the check is done and the gallery is reloaded in logged-in state
- Some browsers might prevent a page from being refreshed. They shouldn't! Maybe even some too-strict browser security model (private mode?) might prevent this from working.
- Oh, please do not make me go back to the code for this :-) I hate Javascript quite much...
BTW, has anyone else than me managed to get this working yet?
It would be great if someone could offer his working Facebook-login-able gallery for others to double-check on the login process (i.e. what a correct login process looks like in liveHttpHeaders).
Unfortunately I cannot share mine (at this time) because it has too little bandwith, sorry.
Some background about why I am doing this:
I have a small Coppermine gallery with lots of photos of people, friends and events where I have been asked to be a photographer. Definitely not the type of photos that one would want to share publically, so I have them secured via several different Coppermine groups. This approach works quite well, but there are some problems of the type of "password forgetting" and "group accounts".
So what I am trying to achieve is to keep my strict fine-grained Coppermine security model, and just map Facebook users to it, so that I can give the Facebook users persmissions to see those pictures that I want them to see, and ideally I would want to give those permissions in advance. I could then avoid "group accounts", and password remembering should then not be an issue with the users anymore, either...
I suppose that this approach is probably quite different from what others would like to achieve with Facebook integration. But maybe this is useful for you, too, though.
Future plans (beyond what I wrote previously):
Oh, I have just yesterday discovered that VZ (studiVZ/meinVZ) seems to have a
similar login API as Facebook. And wondering whether to use it would make sense in the scope of this plugin (then probably better renaming to "social_login" plugin

) -- or better to create a separate vz-login-plugin, but then in a way that both could be used at the same time.
Not making any promises!