'fieldset', '#title' => t('diggthis settings') ); $form['diggthis']['diggthis_button_skin'] = array( '#type' => 'select', '#title' => t('Button skin'), '#default_value' => variable_get('diggthis_button_skin', 'standard'), '#options' => array( 'standard' => t('standard'), 'compact' => t('compact') ), '#description' => t('The Button skin option controls the look at the button. If set to standard the button defaults to a standard digg button (much like the one you see on Digg itself). If specified as compact, then a smaller horizontal visual design is used that will fit better into a list of links.') ); $form['diggthis']['diggthis_button_bgcolor'] = array( '#type' => 'textfield', '#title' => t('Button background color'), '#default_value' => variable_get('diggthis_button_bgcolor', ''), '#size' => 7, '#maxlength' => 7, '#description' => t('Enter a hexadecimal color value here, e.g. #ff9900. Include the leading # and enter 6 numbers/digits') ); $form['diggthis']['diggthis_button_weight'] = array( '#type' => 'select', '#title' => t('Weight'), '#default_value' => variable_get('diggthis_button_weight', 10), '#options' => drupal_map_assoc(range(-20, 20)), '#description' => t('Specifies the position of the Diggthis button. A low weight, e.g. -20 will display the button above the content and a high weight, e.g. 20 below the content.') ); $form['diggthis']['diggthis_node_types'] = array( '#type' => 'checkboxes', '#title' => t('Node Types'), '#default_value' => variable_get('diggthis_node_types', array()), '#options' => node_get_types('names'), '#description' => t('activate the node types in where the digg button shall be displayed') ); $form['diggthis_api'] = array( '#type' => 'fieldset', '#title' => t('diggthis API settings') ); $form['diggthis_api']['diggthis_stories_domain'] = array( '#type' => 'textfield', '#title' => t('Digg Stories Domain'), '#default_value' => variable_get('diggthis_stories_domain', ''), '#size' => 32, '#maxlength' => 128, '#description' => t('Enter the domain, e.g. mydomain.com, that will be used to show top Digg stories for.') ); $period = drupal_map_assoc(array(21600, 43200, 86400), 'format_interval'); $form['diggthis_api']['diggthis_cache_lifetime'] = array( '#type' => 'select', '#title' => t('Minimum cache lifetime'), '#default_value' => variable_get('diggthis_cache_lifetime', 43200), '#options' => $period, '#description' => t('The time the response from the Digg API is cached before being requested again.') ); return system_settings_form($form); }