This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
sign_in_with_twitter.admin.inc
49 lines (46 loc) · 2.04 KB
/
sign_in_with_twitter.admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
// $Id$
/**
* @file
* Admin settings page for the sign_in_with_twitter module.
*/
/**
* Implementation of hook_admin().
*/
function sign_in_with_twitter_admin() {
$module_path = drupal_get_path('module', 'sign_in_with_twitter') .'/images/';
global $base_url;
$form = array();
$form['sign_in_with_twitter_callback'] = array(
'#type' => 'item',
//'#readonly' => TRUE,
'#title' => t('Callback URL'),
'#value' => $base_url.'/sign-in-with-twitter/callback',
'#description' => t('Callback URL for the application settings on <a href="https://twitter.com/oauth_clients">https://twitter.com/oauth_clients</a>.'),
);
$form['sign_in_with_twitter_consumer_key'] = array(
'#type' => 'textfield',
'#title' => t('Consumer key'),
'#default_value' => variable_get('sign_in_with_twitter_consumer_key', ''),
'#description' => t('Consumer key from your application settings page.'),
);
$form['sign_in_with_twitter_consumer_secret'] = array(
'#type' => 'textfield',
'#title' => t('Consumer secret'),
'#default_value' => variable_get('sign_in_with_twitter_consumer_secret', ''),
'#description' => t('Consumer secret from your application settings page.'),
);
$form['sign_in_with_twitter_button'] = array(
'#type' => 'radios',
'#title' => t('Select sign in button'),
'#default_value' => variable_get('sign_in_with_twitter_button', 'Sign-in-with-Twitter-darker.png'),
'#description' => t('Select the button to display to anonymous users.'),
'#options' => array(
'Sign-in-with-Twitter-darker.png' => theme_image($module_path .'Sign-in-with-Twitter-darker.png'),
'Sign-in-with-Twitter-darker-small.png' => theme_image($module_path .'Sign-in-with-Twitter-darker-small.png'),
'Sign-in-with-Twitter-lighter.png' => theme_image($module_path .'Sign-in-with-Twitter-lighter.png'),
'Sign-in-with-Twitter-lighter-small.png' => theme_image($module_path .'Sign-in-with-Twitter-lighter-small.png')
),
);
return system_settings_form($form);
} // function sign_in_with_twitter_admin().