Closed (fixed)
Project:
Drupal.org CVS applications
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jun 2010 at 18:08 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andriy_gerasika commentedHello,
I want to contribute module marrying Javascript OpenID selector (http://code.google.com/p/openid-selector/) with Drupal's OpenID module.
Benefits of the module are:
1. versus https://www.idselector.com/
my module is open-source and GPL
2. versus http://drupal.org/project/comfortid
IMHO my module's openid login form looks more nice and provides more options, see #3
3. Javascript OpenID selector module is in use at SourceForge (https://sourceforge.net/account/login.php), which proves it is good enough
Demo is available at
http://www.gerixsoft.com/user/login
More details can be found at
http://www.gerixsoft.com/blog/drupal/openid-selector
Source code is attached.
Thank You
Kind Regards,
Andriy Gerasika
Comment #2
sunThanks for your application.
Hm. Why can't you contribute to the existing http://drupal.org/project/comfortid instead and perhaps join forces with that project's maintainer, especially in the long run?
Comment #3
avpadernoComment #4
andriy_gerasika commentedthese modules are very different:
ComfortID uses its own Javascript, and implements its own login block,
my module is integrating existing openid-selector javascript from Google Code (same as on SourceForge), and integrates into existing "/user/login" login form
i.e.. I do not reinvent the wheel, ComfortID does
Comment #5
joachim commentedI agree with the applicant's point in #4. ComfortID does its own thing; the proposed module here integrates the external tool from Google code. I don't see they can be usefully merged.
However, some problems with the module code, some minor and some not so minor:
- is there no way this module can work without having to hack Drupal core? I don't know enough about jQuery and the Drupal behaviours system, but can't a behaviour be overridden by a later module?
- merge INSTALL and README into just README, since they're both pretty slim.
- add a file header documentation block
- newline needed at the end of your module file.
- the convention on D6 is a space either side of the . operator.
- openid_selector_form_alter() adds HTML to the output. This should use a theme function.
Comment #6
andriy_gerasika commentedall fixed except:
- openid_selector_form_alter() adds HTML to the output. This should use a theme function.
Is module supposed to use theme_form/render_form from http://drupal.org/node/112358?
Can you please post/point me to an example (URL)?
I guess there will be a conflict if two modules will decide to theme login form
New version is attached below.
Comment #7
andriy_gerasika commentedforgot to change status
Comment #8
andriy_gerasika commentedfound two more issues:
a) form alter code produces a warning under strict mode
b) JS file is licensed under BSD
Comment #9
joachim commented> a) form alter code produces a warning under strict mode
What's the warning?
> b) JS file is licensed under BSD
In which case you can't include it. And anyway, it's better not to include external libraries.
Have you looked at http://drupal.org/project/libraries?
Comment #10
njathan commentedSubscribing.. looking forward to this module :)
Comment #11
andriy_gerasika commenteda)
User dereine told me on IRC I must wrap $forms[$form_id] access w/ array_key_exists check. done
b)
external Javascript library is required to be unpacked into openid-selector subfolder (i.e. sites/*/modules/openid-selector/openid-selector)
new version is attached.
I am not quite sure about Libraries module:
- major modules like wysiwyg, fckeditor do not use it
- it has an alpha status that has not changed in last 9 monthes; is it stable enough to use it?
- not clear about its future: how will it play w/ Drupal 7 since Drupal 7 introduces some libraries API as well.
though I will release a new version w/ Libraries dependency soon.
Comment #12
sunWysiwyg will use and depend on Libraries API in D7. Libraries API is actually used a lot throughout contrib already. It is not what hook_library() in D7 does. For full details, you may want to read #315100: Allow to add JS/CSS libraries (sets of files, settings, and dependent libraries)
Comment #13
andriy_gerasika commentedattached is a new version of openid-selector module w/ Libraries module dependency.
Comment #14
njathan commentedI tried this module (#13) on Drupal 6.19. While it seems to be working right on Firefox, it does not on Chrome. I am trying to login with google/yahoo account, and upon clicking the Google/yahoo icon, it flashes the error message:
Chrome did not redirect me to the respective login pages before throwing that.
edit: Chrome v6.0.408.1 dev
the module version in #6 worked well though
Comment #15
andriy_gerasika commentedthanks, I will fix this bug soon
Comment #16
andriy_gerasika commentedattached is an updated version fixing "Username field is required. Password field is required." in Chrome.
p.s.
If you have Caching enabled, you may need to reset the cache when upgrading.
Comment #17
joachim commentedI've just tested this and it works great! Very useful addition to Drupal.
A few more points, just small stuff and enhancements:
- copyright notice in several of your files. I can't find anything about this in the CVS application guidelines, but I've a feeling we avoid these (IIRC it causes a legal problem as soon as you get a patch from another person). Could a maintainer comment please?
- I'm not that clued up on JS in Drupal, but it seems to me at least some of the code in your JS file should be using Drupal.behaviors. See http://drupal.org/node/205296 for more.
- ditto the variables such as openid.img_path which you set in the hook_form_alter() -- could they be set on the Drupal object?
- " * Implementation of hook_form_alter : adds OpenID selector to the OpenID form" -- break this into two lines, with a blank line in between. The format for a hook implementation header is:
- For clarity, I would lay out the definition of your $forms array on several lines.
- I'd also add a comment above that to explain that the keys are formIDs and the values the HTML ids. Though actually, you could probably just strreplace('_', '-') for the same effect, but I guess whether that makes simpler code is a matter of opinion ;)
Nearly there! :D
Comment #18
avpadernoThat is what Crell would say. To make a comparison, Drupal core code is copyrighted by every contributor; you will not find a single file that is reported as copyrighted by Dries Buytaert.
Comment #19
andriy_gerasika commentedall done, except
- I'd also add a comment above that to explain that the keys are formIDs and the values the HTML ids. Though actually, you could probably just strreplace('_', '-') for the same effect, but I guess whether that makes simpler code is a matter of opinion ;)
this will not work for 'user_login_block' => 'user-login-form', array line
Comment #20
joachim commented> this will not work for 'user_login_block' => 'user-login-form', array line
Heh, I didn't notice that one ;)
All looks good to me.
I look forward to using this one :)
Comment #21
njathan commentedYes it seems to be working well on google chrome (also) now... waiting to see its own project page :)
Comment #22
michelleApproved based on joachim's RTBC.
Michelle
Comment #23
andriy_gerasika commentedThanks to everybody, your comments were very helpful :)
Project is now available at
http://drupal.org/project/openid_selector