/[drupal]/contributions/modules/diggthis/diggthis.admin.inc
ViewVC logotype

Contents of /contributions/modules/diggthis/diggthis.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Sep 3 12:12:47 2008 UTC (14 months, 3 weeks ago) by yaph
Branch: MAIN
CVS Tags: DRUPAL-6--2-1-DEV, DRUPAL-6--2-1-RC1, HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Use include files for admin settings and page functions
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Admin settings for the diggthis module.
7 */
8
9 /**
10 * Admin settings form for the diggthis module
11 */
12 function diggthis_admin_settings() {
13 $form = array();
14 $form['diggthis'] = array(
15 '#type' => 'fieldset',
16 '#title' => t('diggthis settings')
17 );
18
19 $form['diggthis']['diggthis_button_skin'] = array(
20 '#type' => 'select',
21 '#title' => t('Button skin'),
22 '#default_value' => variable_get('diggthis_button_skin', 'standard'),
23 '#options' => array(
24 'standard' => t('standard'),
25 'compact' => t('compact')
26 ),
27 '#description' => t('The Button skin option controls the look at the button. If set to <em>standard</em> the button defaults to a standard digg button (much like the one you see on Digg itself). If specified as <em>compact</em>, then a smaller horizontal visual design is used that will fit better into a list of links.')
28 );
29
30 $form['diggthis']['diggthis_button_bgcolor'] = array(
31 '#type' => 'textfield',
32 '#title' => t('Button background color'),
33 '#default_value' => variable_get('diggthis_button_bgcolor', ''),
34 '#size' => 7,
35 '#maxlength' => 7,
36 '#description' => t('Enter a hexadecimal color value here, e.g. <code>#ff9900</code>. Include the leading <code>#</code> and enter 6 numbers/digits')
37 );
38
39 $form['diggthis']['diggthis_button_weight'] = array(
40 '#type' => 'select',
41 '#title' => t('Weight'),
42 '#default_value' => variable_get('diggthis_button_weight', 10),
43 '#options' => drupal_map_assoc(range(-20, 20)),
44 '#description' => t('Specifies the position of the Diggthis button. A low weight, e.g. <strong>-20</strong> will display the button above the content and a high weight, e.g. <strong>20</strong> below the content.')
45 );
46
47 $form['diggthis']['diggthis_node_types'] = array(
48 '#type' => 'checkboxes',
49 '#title' => t('Node Types'),
50 '#default_value' => variable_get('diggthis_node_types', array()),
51 '#options' => node_get_types('names'),
52 '#description' => t('activate the node types in where the digg button shall be displayed')
53 );
54
55 $form['diggthis_api'] = array(
56 '#type' => 'fieldset',
57 '#title' => t('diggthis API settings')
58 );
59
60 $form['diggthis_api']['diggthis_stories_domain'] = array(
61 '#type' => 'textfield',
62 '#title' => t('Digg Stories Domain'),
63 '#default_value' => variable_get('diggthis_stories_domain', ''),
64 '#size' => 32,
65 '#maxlength' => 128,
66 '#description' => t('Enter the domain, e.g. <em>mydomain.com</em>, that will be used to show top Digg stories for.')
67 );
68
69 $period = drupal_map_assoc(array(21600, 43200, 86400), 'format_interval');
70 $form['diggthis_api']['diggthis_cache_lifetime'] = array(
71 '#type' => 'select',
72 '#title' => t('Minimum cache lifetime'),
73 '#default_value' => variable_get('diggthis_cache_lifetime', 43200),
74 '#options' => $period,
75 '#description' => t('The time the response from the Digg API is cached before being requested again.')
76 );
77
78 return system_settings_form($form);
79 }

  ViewVC Help
Powered by ViewVC 1.1.2