function service_links_admin_settings in Service links 6
Same name and namespace in other branches
- 5 service_links.module \service_links_admin_settings()
- 6.2 service_links.admin.inc \service_links_admin_settings()
- 7.2 service_links.admin.inc \service_links_admin_settings()
1 string reference to 'service_links_admin_settings'
- service_links_menu in ./
service_links.module - Implementation of hook_menu().
File
- ./
service_links.module, line 30 - Current Maintainer: Fabio Mucciante aka TheCrow Original Author: Fredrik Jonsson fredrik at combonet dot se A module that adds Digg, del.icio.us, reddit, Technorati etc. links to nodes.
Code
function service_links_admin_settings() {
$form['where_to_show_the_links'] = array(
'#type' => 'fieldset',
'#title' => t('Where to show the service links'),
'#description' => t('Set the node types and categories you want to display links for.'),
);
$form['where_to_show_the_links']['service_links_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Node types'),
'#default_value' => variable_get('service_links_node_types', array()),
'#options' => array_map('check_plain', node_get_types('names')),
);
if (module_exists('taxonomy')) {
$form['where_to_show_the_links']['service_links_category_types'] = array(
'#type' => 'select',
'#multiple' => TRUE,
'#title' => t('Categories'),
'#default_value' => variable_get('service_links_category_types', array()),
'#options' => _service_links_get_terms(),
);
}
$form['what_links_to_show'] = array(
'#type' => 'fieldset',
'#title' => t('What bookmark links to show'),
);
$form['what_links_to_show']['service_links_show_delicious'] = array(
'#type' => 'checkbox',
'#title' => t('Show del.icio.us link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_delicious', 1),
);
$form['what_links_to_show']['service_links_show_digg'] = array(
'#type' => 'checkbox',
'#title' => t('Show Digg link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_digg', 1),
);
$form['what_links_to_show']['service_links_show_stumbleupon'] = array(
'#type' => 'checkbox',
'#title' => t('Show StumbleUpon link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_stumbleupon', 0),
);
$form['what_links_to_show']['service_links_show_propeller'] = array(
'#type' => 'checkbox',
'#title' => t('Show Propeller link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_propeller', 0),
);
$form['what_links_to_show']['service_links_show_reddit'] = array(
'#type' => 'checkbox',
'#title' => t('Show Reddit link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_reddit', 0),
);
$form['what_links_to_show']['service_links_show_magnoliacom'] = array(
'#type' => 'checkbox',
'#title' => t('Show ma.gnolia.com link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_magnoliacom', 0),
);
$form['what_links_to_show']['service_links_show_newsvine'] = array(
'#type' => 'checkbox',
'#title' => t('Show Newsvine link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_newsvine', 0),
);
$form['what_links_to_show']['service_links_show_furl'] = array(
'#type' => 'checkbox',
'#title' => t('Show Furl link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_furl', 0),
);
$form['what_links_to_show']['service_links_show_facebook'] = array(
'#type' => 'checkbox',
'#title' => t('Show Facebook link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_facebook', 0),
);
$form['what_links_to_show']['service_links_show_myspace'] = array(
'#type' => 'checkbox',
'#title' => t('Show MySpace link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_myspace', 0),
);
$form['what_links_to_show']['service_links_show_identica'] = array(
'#type' => 'checkbox',
'#title' => t('Show identi.ca link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_identica', 0),
);
$form['what_links_to_show']['service_links_show_twitter'] = array(
'#type' => 'checkbox',
//'#title' => t('Show Twitter link without TinyURL support'),
'#title' => t('Show Twitter link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_twitter', 0),
);
/*$form['what_links_to_show']['service_links_show_twitter_with_tinyurl'] = array(
'#type' => 'checkbox',
'#title' => t('Show Twitter link with TinyURL support'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_twitter_with_tinyurl', 0),
);*/
$form['what_links_to_show']['service_links_show_google'] = array(
'#type' => 'checkbox',
'#title' => t('Show Google link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_google', 0),
);
$form['what_links_to_show']['service_links_show_yahoo'] = array(
'#type' => 'checkbox',
'#title' => t('Show Yahoo link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_yahoo', 0),
);
$form['what_links_to_show']['service_links_show_buzz'] = array(
'#type' => 'checkbox',
'#title' => t('Show Buzz link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_buzz', 0),
);
$form['what_links_to_show']['service_links_show_linkedin'] = array(
'#type' => 'checkbox',
'#title' => t('Show LinkedIn link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_linkedin', 0),
);
$form['what_links2_to_show'] = array(
'#type' => 'fieldset',
'#title' => t('What search links to show'),
);
$form['what_links2_to_show']['service_links_show_technorati'] = array(
'#type' => 'checkbox',
'#title' => t('Show Technorati link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_technorati', 1),
);
$form['what_links2_to_show']['service_links_show_icerocket'] = array(
'#type' => 'checkbox',
'#title' => t('Show IceRocket link'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_show_icerocket', 0),
);
$form['how_to_show_the_links'] = array(
'#type' => 'fieldset',
'#title' => t('When and how to show the links'),
);
$form['how_to_show_the_links']['service_links_in_links'] = array(
'#type' => 'select',
'#title' => t('Service links in links'),
'#default_value' => variable_get('service_links_in_links', 0),
'#options' => array(
0 => t('Disabled'),
1 => t('Teaser view'),
2 => t('Full-page view'),
3 => t('Teasers and full-page view'),
),
'#description' => t('When to display the services in the links section.'),
);
$form['how_to_show_the_links']['service_links_in_node'] = array(
'#type' => 'select',
'#title' => t('Service links in nodes'),
'#default_value' => variable_get('service_links_in_node', 2),
'#options' => array(
0 => t('Disabled'),
1 => t('Teaser view'),
2 => t('Full-page view'),
3 => t('Teasers and full-page view'),
),
'#description' => t('When to display the services after the node text.'),
);
$form['how_to_show_the_links']['service_links_style'] = array(
'#type' => 'select',
'#title' => t('Service links style'),
'#default_value' => variable_get('service_links_style', 1),
'#options' => array(
1 => t('Text links'),
2 => t('Image links'),
3 => t('Image and text links'),
),
);
if (module_exists('aggregator2')) {
$form['aggregator2_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Aggregator2 settings'),
);
$form['aggregator2_settings']['service_links_agg2_link'] = array(
'#type' => 'checkbox',
'#title' => t('Use link to original article aggregated by aggregator2 module'),
'#return_value' => 1,
'#default_value' => variable_get('service_links_agg2_link', 0),
);
}
return system_settings_form($form);
}