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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
<?php
// $Id$
/**
* @file
* Admin functions for fblikebutton.
*/
/**
* Configure which node types can be "liked" by users.
*/
function fblikebutton_admin_settings() {
$fblikebutton_node_options = node_type_get_names();
$form['fblikebutton_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Display the button on these content types'),
'#options' => $fblikebutton_node_options,
'#default_value' => variable_get('fblikebutton_node_types', array()),
'#description' => t('Each of these content types will have the "like" button automatically added to them.'),
);
$form['fblikebutton_api'] = array(
'#type' => 'fieldset',
'#title' => t('FB Like Button settings'),
'#collapsible' => true,
'#collapsed' => true,
);
$form['fblikebutton_api']['fblikebutton_layout'] = array(
'#type' => 'select',
'#title' => t('Layout style'),
'#options' => array('standard' => t('Standard'), 'box_count' => t('Box Count'), 'button_count' => t('Button Count')),
'#default_value' => variable_get('fblikebutton_layout', 'standard'),
'#description' => t('Determines the size and amount of social context next to the button'),
);
$form['fblikebutton_api']['fblikebutton_show_faces'] = array(
'#type' => 'select',
'#title' => t('Display faces in the box'),
'#options' => array('show' => t('Show faces'), 'hide' => t('Do not show faces')),
'#default_value' => variable_get('fblikebutton_show_faces', 'show'),
'#description' => t('Show profile pictures below the button. Only work on Standard layout'),
);
$form['fblikebutton_api']['fblikebutton_action'] = array(
'#type' => 'select',
'#title' => t('Verb to display'),
'#options' => array('like' => t('Like'), 'recommend' => t('Recommend')),
'#default_value' => variable_get('fblikebutton_action', 'like'),
'#description' => t('The verb to display in the button.'),
);
$form['fblikebutton_api']['fblikebutton_font'] = array(
'#type' => 'select',
'#title' => t('Font'),
'#options' => array('arial' => 'Arial',
'lucida+grande' => 'Lucida Grande',
'segoe+ui' => 'Segoe UI',
'tahoma' => 'Tahoma',
'trebuchet+ms' => 'Trebuchet MS',
'verdana' => 'Verdana'),
'#default_value' => variable_get('fblikebutton_font', 'arial'),
'#description' => t('The font to display in the button'),
);
$form['fblikebutton_api']['fblikebutton_color_scheme'] = array(
'#type' => 'select',
'#title' => t('Color scheme'),
'#options' => array('light' => t('Light'), 'dark' => t('Dark')),
'#default_value' => variable_get('fblikebutton_color_scheme', 'light'),
'#description' => t('The color scheme of box environtment'),
);
return system_settings_form($form);
}
/**
* Configure form block configuration
*/
function fblikebutton_block_settings() {
global $base_url;
$form['fblikebutton_block_url'] = array(
'#type' => 'textfield',
'#default_value' => variable_get('fblikebutton_block_url', $base_url),
'#description' => t('URL of your homepage to like')
);
$form['fblikebutton_block'] = array(
'#type' => 'fieldset',
'#title' => 'Block configuration',
'#collapsible' => false,
);
$form['fblikebutton_block']['fblikebutton_bl_layout'] = array(
'#type' => 'select',
'#title' => t('Layout style'),
'#options' => array('standard' => t('Standard'), 'box_count' => t('Box Count'), 'button_count' => t('Button Count')),
'#default_value' => variable_get('fblikebutton_bl_layout', 'standard'),
'#description' => t('Determines the size and amount of social context next to the button'),
);
$form['fblikebutton_block']['fblikebutton_bl_show_faces'] = array(
'#type' => 'select',
'#title' => t('Display faces in the box'),
'#options' => array('show' => t('Show faces'), 'hide' => t('Do not show faces')),
'#default_value' => variable_get('fblikebutton_bl_show_faces', 'show'),
'#description' => t('Show profile pictures below the button. Only works with Standard layout'),
);
$form['fblikebutton_block']['fblikebutton_bl_action'] = array(
'#type' => 'select',
'#title' => t('Verb to display'),
'#options' => array('like' => t('Like'), 'recommend' => t('Recommend')),
'#default_value' => variable_get('fblikebutton_bl_action', 'like'),
'#description' => t('The verb to display in the button.'),
);
$form['fblikebutton_block']['fblikebutton_bl_font'] = array(
'#type' => 'select',
'#title' => t('Font'),
'#options' => array('arial' => 'Arial',
'lucida+grande' => 'Lucida Grande',
'segoe+ui' => 'Segoe UI',
'tahoma' => 'Tahoma',
'trebuchet+ms' => 'Trebuchet MS',
'verdana' => 'Verdana'),
'#default_value' => variable_get('fblikebutton_bl_font', 'arial'),
'#description' => t('The font to display in the button'),
);
$form['fblikebutton_block']['fblikebutton_bl_color_scheme'] = array(
'#type' => 'select',
'#title' => t('Color scheme'),
'#options' => array('light' => t('Light'), 'dark' => t('Dark')),
'#default_value' => variable_get('fblikebutton_bl_color_scheme', 'light'),
'#description' => t('The color scheme of box environtment'),
);
return system_settings_form($form);
}
|