/[drupal]/contributions/modules/facebook_auth/facebook_auth.module
ViewVC logotype

Diff of /contributions/modules/facebook_auth/facebook_auth.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6, Sat Jun 16 06:21:01 2007 UTC revision 1.7, Thu Sep 6 06:34:55 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: facebook_auth.module,v 1.5 2007/06/16 05:19:20 halkeye Exp $  // $Id: facebook_auth.module,v 1.6 2007/06/16 06:21:01 halkeye Exp $
3  if (substr(phpversion(), 0, 1) == '4') {  if (substr(phpversion(), 0, 1) == '4') {
4     if (file_exists(dirname(__FILE__) . '/facebook-platform/php4client/facebook.php')) {     if (file_exists(dirname(__FILE__) . '/facebook-platform/php4client/facebook.php')) {
5        require_once('facebook-platform/php4client/facebook.php');        require_once('facebook-platform/php4client/facebook.php');
# Line 147  function facebook_auth_form_alter($form_ Line 147  function facebook_auth_form_alter($form_
147     if (!$secret || !$api_key) { return; }     if (!$secret || !$api_key) { return; }
148     if (!variable_get('facebook_auth_enable_loginblock', FALSE)) { return; }     if (!variable_get('facebook_auth_enable_loginblock', FALSE)) { return; }
149     if ($form_id == 'user_login_block' || $form_id == 'user_login') {     if ($form_id == 'user_login_block' || $form_id == 'user_login') {
150        $img = theme('image', drupal_get_path('module', 'facebook_auth') .'/img/facebook_login.gif', t('Login to facebook'), t('Login to facebook'));        $img = theme('image', 'http://static.ak.facebook.com/images/devsite/facebook_login.gif', t('Login to facebook'), t('Login to facebook'), NULL, FALSE);
151        $form['facebook_link'] = array(        $form['facebook_link'] = array(
152           '#type' => 'markup',           '#type' => 'markup',
153           '#value' => l($img, 'facebook', array(), NULL, NULL, FALSE, TRUE),           '#value' => l($img, 'facebook', array(), 'destination='.$_GET['q'], NULL, FALSE, TRUE),
154        );        );
155     }     }
156     return $form;     return $form;
# Line 173  function facebook_auth_block($op = 'list Line 173  function facebook_auth_block($op = 'list
173           if ($user && $user->uid) { return; }           if ($user && $user->uid) { return; }
174           $block = array(           $block = array(
175              'subject' => t('Login with facebook'),              'subject' => t('Login with facebook'),
176              'content' => l(theme('image', drupal_get_path('module', 'facebook_auth') .'/img/facebook_login.gif', t('Login to facebook'), t('Login to facebook')), 'facebook', array(), NULL, NULL, FALSE, TRUE),              'content' => l(theme('image', 'http://static.ak.facebook.com/images/devsite/facebook_login.gif', t('Login to facebook'), t('Login to facebook'), NULL, FALSE), 'facebook', array(), 'destination='.$_GET['q'], NULL, FALSE, TRUE),
177           );           );
178           break;           break;
179        }        }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2