simpleopenidselector This is a simple Javascript OpenID selector. People simply select their account by a recognisable logo.

  1. OVERVIEW
  2. RELEASE FOR YII FEATURES
  3. HOMEPAGE
  4. DEMO
  5. USAGE
  6. OPTIONS
  7. INTERNATIONALIZATION
  8. TROUBLESHOOTING
  9. FOR LINUX
  10. GENERATING SPRITE BY HAND
  11. LICENSE
  12. Resources

OVERVIEW

This is a simple Javascript OpenID selector. It has been designed so that users do not even need to know what OpenID is to use it, they simply select their account by a recognisable logo.

RELEASE FOR YII FEATURES

What was done:

  • Reviewed directory structure
  • UK locale was renamed to UA
    hint: like Ukrainian domain zone, not United Kingdom
  • Maked possible to edit config directly from widget
    hint: it was only by hand in main js file
  • Found and added .sh script for generating sprites for Linux
  • See more OPTIONS in extension page

HOMEPAGE

http://code.google.com/p/openid-selector/

DEMO

See http://openid-selector.googlecode.com/svn/trunk/demo.html

USAGE

Paste next code in your view:

<?php $this->widget('application.widgets.openidProviders.openidProviders',array('options'=>array('lang'=>'ru','demo'=>'js:true'))); ?>

OPTIONS

Its very simple to understand:

  1. List of providers and locale properties defiled in 'assets/js/assets-jquery-{locale}.js'
  2. CSS file is in 'assets/css/openid.css' directory
  3. Views are in 'views/main-{locale}.php'
  4. Native openid props can be changed from widget call adding 'options' array:
    • version: '1.2', // version constant
    • demo: false, //if false - there is only alert message not redirecting to provider
    • demo_text: 'In client demo mode. Normally would have submitted OpenID:',
    • cookie_expires: 6*30, // 6 months.
    • cookie_name: 'openid_provider',
    • cookie_path: '/',
    • img_path: 'images/', //path to images dir by default is staged by widget in assets dir
    • lang: null, // language, is set in openid-jquery-.js //staged by widget in 'en'
    • signin_text: null, // text on submit button on the form
    • input_id: null,
    • provider_url: null,
    • provider_id: null,
    • all_small: false, // output large providers w/ small icons
    • no_sprite: false, // don't use sprite image
    • image_title: '{provider}', // for image title

INTERNATIONALIZATION

Now there are English, Russian and Ukrainian languages available

  1. Create view in '/views' dir with your locale naming short-code
  2. Create providers list in '/assets/js' dir with your locale naming short-code
  3. If it`s differs from existing image sprites - generate sprites by instruments from '/tools' dir. See readme to get hints.

TROUBLESHOOTING

Please remember after you change list of providers, you must run tools/generate-sprite.js to refresh sprite image

generate-sprite.js requires ImageMagick to be installed and works only in Windows (Linux and Apple users can run in VM)

Before running generate-sprite.js for the first time, check its source code and correct line 16 (var imagemagick = '<...>';) to point to ImageMagick install dir.

FOR LINUX

There is sh script for generating sprites
http://code.google.com/p/openid-selector/source/browse/trunk/generate-sprite.sh?r=115 USAGE:

  1. Go to tools dir: [user@localhost home] cd /path/to/tools/directory
  2. Run generating script: [user@localhost tools] sh generate-sprite.sh en
  3. After generating, please remove sprite-generators dir from project

GENERATING SPRITE BY HAND

First row - big images one by one 60x100px
Second row - as I knew one by one 24x24px
Glue images like in examples

LICENSE

openid-selector code is licenced under the New BSD License.

Resources

8 0
11 followers
1 022 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Auth
Developed by: GOsha
Created on: Jan 6, 2011
Last updated: 13 years ago

Downloads

show all

Related Extensions