-
Notifications
You must be signed in to change notification settings - Fork 1
/
opengraph.admin.inc
390 lines (387 loc) · 13.3 KB
/
opengraph.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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<?php
/**
* @file
*/
function opengraph_site_information() {
$form = array();
// Basic information
$form['basic_fs'] = array(
'#type' => 'fieldset',
'#title' => t('Basic information'),
);
$form['basic_fs']['opengraph_site_name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#default_value' => variable_get('opengraph_site_name', variable_get('site_name', 'Drupal')),
'#description' => t('The name of this website.'),
'#required' => TRUE,
);
$form['basic_fs']['opengraph_description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#default_value' => variable_get('opengraph_description', variable_get('site_mission', '')),
'#description' => t("Your site's mission or focus statement."),
'#required' => TRUE,
);
$form['basic_fs']['opengraph_type'] = array(
'#type' => 'select',
'#title' => 'Type',
'#default_value' => variable_get('opengraph_type', 'website'),
'#description' => t("The type under which you would classify your website."),
'#required' => TRUE,
'#options' => array(
t('Activities') => array(
'activity' => t('Activity'),
'sport' => t('Sport'),
),
t('Businesses') => array(
'bar' => t('Bar'),
'company' => t('Company'),
'cafe' => t('Cafe'),
'hotel' => t('Hotel'),
'restaurant' => t('Restaurant'),
),
t('Groups') => array(
'cause' => t('Cause'),
'sports_league' => t("Sport's league"),
'sports_team' => t("Sport's team"),
),
t('Organizations') => array(
'band' => t('Band'),
'government' => t('Government'),
'non_profit' => t('Non profit'),
'school' => t('School'),
'university' => t('University'),
),
t('People') => array(
'actor' => t('Actor'),
'athlete' => t('Athlete'),
'author' => t('Author'),
'director' => t('Director'),
'musician' => t('Musician'),
'politician' => t('Politician'),
'public_figure' => t('Public figure'),
),
t('Places') => array(
'city' => t('City'),
'country' => t('Country'),
'landmark' => t('Landmark'),
'state_province' => t('State/Province'),
),
t('Products and Entertainment') => array(
'album' => t('Album'),
'book' => t('Book'),
'drink' => t('Drink'),
'food' => t('Food'),
'game' => t('Game'),
'product' => t('Product'),
'song' => t('Song'),
'movie' => t('Movie'),
'tv_show' => t('TV show'),
),
t('Websites') => array(
'blog' => t('Blog'),
'website' => t('Website'),
'article' => t('Article'),
),
),
);
// Contact information
$form['contact_fs'] = array(
'#type' => 'fieldset',
'#title' => t('Contact information'),
);
$form['contact_fs']['opengraph_email'] = array(
'#type' => 'textfield',
'#title' => t('E-mail address'),
'#default_value' => variable_get('opengraph_email', variable_get('site_mail', ini_get('sendmail_from'))),
'#description' => t("The <em>From</em> address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)"),
'#required' => TRUE,
);
$form['contact_fs']['opengraph_phone_number'] = array(
'#type' => 'textfield',
'#title' => t('Telephone number'),
'#default_value' => variable_get('opengraph_phone_number', ''),
);
$form['contact_fs']['opengraph_fax_number'] = array(
'#type' => 'textfield',
'#title' => t('Fax number'),
'#default_value' => variable_get('opengraph_fax_number', ''),
);
// Address information
$form['location_fs'] = array(
'#type' => 'fieldset',
'#title' => t('Location'),
);
$form['location_fs']['opengraph_street_address'] = array(
'#type' => 'textfield',
'#title' => t('Street address'),
'#default_value' => variable_get('opengraph_street_address', ''),
);
$form['location_fs']['opengraph_postal_code'] = array(
'#type' => 'textfield',
'#title' => t('Postal code'),
'#default_value' => variable_get('opengraph_postal_code', ''),
);
$form['location_fs']['opengraph_locality'] = array(
'#type' => 'textfield',
'#title' => t('City'),
'#default_value' => variable_get('opengraph_locality', ''),
);
$form['location_fs']['opengraph_region'] = array(
'#type' => 'textfield',
'#title' => t('Region'),
'#default_value' => variable_get('opengraph_region', ''),
);
$form['location_fs']['opengraph_country_name'] = array(
'#type' => 'select',
'#title' => t('Country'),
'#options' => array(
"Afghanistan" => "Afghanistan",
"Aland Islands" => "Aland Islands",
"Albania" => "Albania",
"Algeria" => "Algeria",
"American Samoa" => "American Samoa",
"Andorra" => "Andorra",
"Angola" => "Angola",
"Anguilla" => "Anguilla",
"Antarctica" => "Antarctica",
"Antigua and Barbuda" => "Antigua and Barbuda",
"Argentina" => "Argentina",
"Armenia" => "Armenia",
"Aruba" => "Aruba",
"Australia" => "Australia",
"Austria" => "Austria",
"Azerbaijan" => "Azerbaijan",
"Bahamas" => "Bahamas",
"Bahrain" => "Bahrain",
"Bangladesh" => "Bangladesh",
"Barbados" => "Barbados",
"Belarus" => "Belarus",
"Belgium" => "Belgium",
"Belize" => "Belize",
"Benin" => "Benin",
"Bermuda" => "Bermuda",
"Bhutan" => "Bhutan",
"Bolivia" => "Bolivia",
"Bosnia and Herzegovina" => "Bosnia and Herzegovina",
"Botswana" => "Botswana",
"Brazil" => "Brazil",
"British Indian Ocean Territory" => "British Indian Ocean Territory",
"Brunei Darussalam" => "Brunei Darussalam",
"Bulgaria" => "Bulgaria",
"Burkina Faso" => "Burkina Faso",
"Burundi" => "Burundi",
"Cambodia" => "Cambodia",
"Cameroon" => "Cameroon",
"Canada" => "Canada",
"Cape Verde" => "Cape Verde",
"Caribbean Nations" => "Caribbean Nations",
"Cayman Islands" => "Cayman Islands",
"Central African Republic" => "Central African Republic",
"Chad" => "Chad",
"Chile" => "Chile",
"China" => "China",
"Christmas Island" => "Christmas Island",
"Cocos (Keeling) Islands" => "Cocos (Keeling) Islands",
"Colombia" => "Colombia",
"Comoros" => "Comoros",
"Congo" => "Congo",
"Cook Islands" => "Cook Islands",
"Costa Rica" => "Costa Rica",
"Cote D'Ivoire (Ivory Coast)" => "Cote D'Ivoire (Ivory Coast)",
"Croatia" => "Croatia",
"Cuba" => "Cuba",
"Cyprus" => "Cyprus",
"Czech Republic" => "Czech Republic",
"Democratic Republic of the Congo" => "Democratic Republic of the Congo",
"Denmark" => "Denmark",
"Djibouti" => "Djibouti",
"Dominica" => "Dominica",
"Dominican Republic" => "Dominican Republic",
"East Timor" => "East Timor",
"Ecuador" => "Ecuador",
"Egypt" => "Egypt",
"El Salvador" => "El Salvador",
"Equatorial Guinea" => "Equatorial Guinea",
"Eritrea" => "Eritrea",
"Estonia" => "Estonia",
"Ethiopia" => "Ethiopia",
"Falkland Islands (Malvinas)" => "Falkland Islands (Malvinas)",
"Faroe Islands" => "Faroe Islands",
"Federated States of Micronesia" => "Federated States of Micronesia",
"Fiji" => "Fiji",
"Finland" => "Finland",
"France" => "France",
"French Guiana" => "French Guiana",
"French Polynesia" => "French Polynesia",
"French Southern Territories" => "French Southern Territories",
"Gabon" => "Gabon",
"Gambia" => "Gambia",
"Georgia" => "Georgia",
"Germany" => "Germany",
"Ghana" => "Ghana",
"Gibraltar" => "Gibraltar",
"Greece" => "Greece",
"Greenland" => "Greenland",
"Grenada" => "Grenada",
"Guadeloupe" => "Guadeloupe",
"Guam" => "Guam",
"Guatemala" => "Guatemala",
"Guernsey" => "Guernsey",
"Guinea" => "Guinea",
"Guinea-Bissau" => "Guinea-Bissau",
"Guyana" => "Guyana",
"Haiti" => "Haiti",
"Honduras" => "Honduras",
"Hong Kong" => "Hong Kong",
"Hungary" => "Hungary",
"Iceland" => "Iceland",
"India" => "India",
"Indonesia" => "Indonesia",
"Iran" => "Iran",
"Iraq" => "Iraq",
"Ireland" => "Ireland",
"Isle of Man" => "Isle of Man",
"Israel" => "Israel",
"Italy" => "Italy",
"Jamaica" => "Jamaica",
"Japan" => "Japan",
"Jersey" => "Jersey",
"Jordan" => "Jordan",
"Kazakhstan" => "Kazakhstan",
"Kenya" => "Kenya",
"Kiribati" => "Kiribati",
"Korea" => "Korea",
"Korea (North)" => "Korea (North)",
"Kuwait" => "Kuwait",
"Kyrgyzstan" => "Kyrgyzstan",
"Laos" => "Laos",
"Latvia" => "Latvia",
"Lebanon" => "Lebanon",
"Lesotho" => "Lesotho",
"Liberia" => "Liberia",
"Libya" => "Libya",
"Liechtenstein" => "Liechtenstein",
"Lithuania" => "Lithuania",
"Luxembourg" => "Luxembourg",
"Macao" => "Macao",
"Macedonia" => "Macedonia",
"Madagascar" => "Madagascar",
"Malawi" => "Malawi",
"Malaysia" => "Malaysia",
"Maldives" => "Maldives",
"Mali" => "Mali",
"Malta" => "Malta",
"Marshall Islands" => "Marshall Islands",
"Martinique" => "Martinique",
"Mauritania" => "Mauritania",
"Mauritius" => "Mauritius",
"Mayotte" => "Mayotte",
"Mexico" => "Mexico",
"Moldova" => "Moldova",
"Monaco" => "Monaco",
"Mongolia" => "Mongolia",
"Montenegro" => "Montenegro",
"Montserrat" => "Montserrat",
"Morocco" => "Morocco",
"Mozambique" => "Mozambique",
"Myanmar" => "Myanmar",
"Namibia" => "Namibia",
"Nauru" => "Nauru",
"Nepal" => "Nepal",
"Netherlands" => "Netherlands",
"Netherlands Antilles" => "Netherlands Antilles",
"New Caledonia" => "New Caledonia",
"New Zealand" => "New Zealand",
"Nicaragua" => "Nicaragua",
"Niger" => "Niger",
"Nigeria" => "Nigeria",
"Niue" => "Niue",
"Norfolk Island" => "Norfolk Island",
"Northern Mariana Islands" => "Northern Mariana Islands",
"Norway" => "Norway",
"Oman" => "Oman",
"Other" => "Other",
"Pakistan" => "Pakistan",
"Palau" => "Palau",
"Palestinian Territory" => "Palestinian Territory",
"Panama" => "Panama",
"Papua New Guinea" => "Papua New Guinea",
"Paraguay" => "Paraguay",
"Peru" => "Peru",
"Philippines" => "Philippines",
"Pitcairn" => "Pitcairn",
"Poland" => "Poland",
"Portugal" => "Portugal",
"Puerto Rico" => "Puerto Rico",
"Qatar" => "Qatar",
"Reunion" => "Reunion",
"Romania" => "Romania",
"Russian Federation" => "Russian Federation",
"Rwanda" => "Rwanda",
"Saint Helena" => "Saint Helena",
"Saint Kitts and Nevis" => "Saint Kitts and Nevis",
"Saint Lucia" => "Saint Lucia",
"Saint Pierre and Miquelon" => "Saint Pierre and Miquelon",
"Saint Vincent and the Grenadines" => "Saint Vincent and the Grenadines",
"Samoa" => "Samoa",
"San Marino" => "San Marino",
"Sao Tome and Principe" => "Sao Tome and Principe",
"Saudi Arabia" => "Saudi Arabia",
"Senegal" => "Senegal",
"Serbia" => "Serbia",
"Seychelles" => "Seychelles",
"Sierra Leone" => "Sierra Leone",
"Singapore" => "Singapore",
"Slovak Republic" => "Slovak Republic",
"Slovenia" => "Slovenia",
"Solomon Islands" => "Solomon Islands",
"Somalia" => "Somalia",
"South Africa" => "South Africa",
"Spain" => "Spain",
"Sri Lanka" => "Sri Lanka",
"Sudan" => "Sudan",
"Suriname" => "Suriname",
"Svalbard and Jan Mayen" => "Svalbard and Jan Mayen",
"Swaziland" => "Swaziland",
"Sweden" => "Sweden",
"Switzerland" => "Switzerland",
"Syria" => "Syria",
"Taiwan" => "Taiwan",
"Tajikistan" => "Tajikistan",
"Tanzania" => "Tanzania",
"Thailand" => "Thailand",
"Timor-Leste" => "Timor-Leste",
"Togo" => "Togo",
"Tokelau" => "Tokelau",
"Tonga" => "Tonga",
"Trinidad and Tobago" => "Trinidad and Tobago",
"Tunisia" => "Tunisia",
"Turkey" => "Turkey",
"Turkmenistan" => "Turkmenistan",
"Turks and Caicos Islands" => "Turks and Caicos Islands",
"Tuvalu" => "Tuvalu",
"Uganda" => "Uganda",
"Ukraine" => "Ukraine",
"United Arab Emirates" => "United Arab Emirates",
"United Kingdom" => "United Kingdom",
"United States" => "United States",
"Uruguay" => "Uruguay",
"Uzbekistan" => "Uzbekistan",
"Vanuatu" => "Vanuatu",
"Vatican City State (Holy See)" => "Vatican City State (Holy See)",
"Venezuela" => "Venezuela",
"Vietnam" => "Vietnam",
"Virgin Islands (British)" => "Virgin Islands (British)",
"Virgin Islands (U.S.)" => "Virgin Islands (U.S.)",
"Wallis and Futuna" => "Wallis and Futuna",
"Western Sahara" => "Western Sahara",
"Yemen" => "Yemen",
"Zambia" => "Zambia",
"Zimbabwe" => "Zimbabwe",
),
'#default_value' => variable_get('opengraph_country_name', ''),
);
return system_settings_form($form);
}