-
Notifications
You must be signed in to change notification settings - Fork 0
/
social_comments.admin.inc
83 lines (71 loc) · 2.2 KB
/
social_comments.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* @file
* Social administration settings.
*/
/**
* Administrative settings form.
*/
function social_comments_settings_form($form, &$form_state) {
$form = array();
$form['google'] = array(
'#type' => 'fieldset',
'#title' => t('Google settings'),
);
$form['google']['social_comments_google_cache'] = array(
'#type' => 'textfield',
'#title' => t('Google cache expire'),
'#description' => t('Enter in seconds'),
'#default_value' => variable_get('social_comments_google_cache', 600),
);
$form['google']['social_comments_google_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Google API key'),
'#description' => t(
'You can create it here !link',
array(
'!link' => l(
t('Google API'),
'https://code.google.com/apis/console',
array(
'attributes' => array(
'target' => '_blank',
),
)
),
)
),
'#default_value' => variable_get('social_comments_google_api_key'),
);
$form['facebook'] = array(
'#type' => 'fieldset',
'#title' => t('Facebook Settings'),
);
$form['facebook']['social_comments_facebook_cache'] = array(
'#type' => 'textfield',
'#title' => t('Facebook cache expire'),
'#description' => t('Enter in seconds'),
'#default_value' => variable_get('social_comments_facebook_cache', 600),
);
$form['facebook']['social_comments_facebook_app_id'] = array(
'#type' => 'textfield',
'#title' => t('Facebook App ID'),
'#default_value' => variable_get('social_comments_facebook_app_id'),
);
$form['facebook']['social_comments_facebook_app_secret'] = array(
'#type' => 'textfield',
'#title' => t('Facebook App Secret'),
'#default_value' => variable_get('social_comments_facebook_app_secret'),
);
$form['twitter'] = array(
'#type' => 'fieldset',
'#title' => t('Twitter Settings'),
);
$form['twitter']['social_comments_twitter_cache'] = array(
'#type' => 'textfield',
'#title' => t('Twitter cache expire'),
'#description' => t('Enter in seconds'),
'#default_value' => variable_get('social_comments_twitter_cache', 600),
);
return system_settings_form($form);
}