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

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

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


Revision 1.3 - (show annotations) (download) (as text)
Mon Mar 2 21:13:34 2009 UTC (8 months, 3 weeks ago) by yaph
Branch: MAIN
CVS Tags: DRUPAL-6--1-1-BETA4, DRUPAL-6--1-1-BETA2, DRUPAL-6--1-1-BETA3, HEAD
Changes since 1.2: +9 -2 lines
File MIME type: text/x-php
Show user link only in node links of enabled content types but in all comment links if buymeabeer_userbeer_enable is enabled, in response to issue #386260
1 <?php
2 // $Id: buymeabeer.admin.inc,v 1.2 2008/11/13 00:05:27 yaph Exp $
3
4 /**
5 * @file
6 * Admin settings for the Buy me a Beer module.
7 */
8
9 /**
10 * Admin settings form for the Buy me a Beer module
11 */
12 function buymeabeer_admin_settings() {
13 $form = array();
14 $form['buymeabeer'] = array(
15 '#type' => 'fieldset',
16 '#title' => t('Buy Me a Beer settings'),
17 '#collapsible' => TRUE,
18 '#collapsed' => FALSE
19 );
20
21 $form['buymeabeer']['buymeabeer_paypal_mail'] = array(
22 '#type' => 'textfield',
23 '#title' => t('Paypal E-mail Addrees'),
24 '#default_value' => variable_get('buymeabeer_paypal_mail', ''),
25 '#size' => 60,
26 '#maxlength' => 60,
27 '#required' => TRUE,
28 '#description' => t('Enter an e-mail address that is enabled to receive paypal payments.')
29 );
30
31 $form['buymeabeer']['buymeabeer_anchor_text'] = array(
32 '#type' => 'textfield',
33 '#title' => t('Anchor Text'),
34 '#default_value' => variable_get('buymeabeer_anchor_text', BMAB_ANCHOR_TEXT),
35 '#size' => 60,
36 '#maxlength' => 60,
37 '#description' => t('Enter the anchor text for the link.')
38 );
39
40 $form['buymeabeer']['buymeabeer_link_title_text'] = array(
41 '#type' => 'textfield',
42 '#title' => t('Link Title Text'),
43 '#default_value' => variable_get('buymeabeer_link_title_text', BMAB_LINK_TITLE_TEXT),
44 '#size' => 60,
45 '#maxlength' => 60,
46 '#description' => t('Enter the title text for the link. This is what is displayed as
47 a tooltip when the cursor is moved over the link. This text is also used as the paypal
48 donation identifier')
49 );
50
51 $form['buymeabeer']['buymeabeer_teaser_full_view'] = array(
52 '#type' => 'select',
53 '#title' => t('Display in teaser and/or full view'),
54 '#default_value' => variable_get('buymeabeer_teaser_full_view', 0),
55 '#options' => array(0 => t('Full view'), 1 => t('Teaser'), 2 => t('Teasers and full view')),
56 '#description' => t('When to display the link.'),
57 );
58
59 $form['buymeabeer']['buymeabeer_node_types'] = array(
60 '#type' => 'checkboxes',
61 '#title' => t('Node Types'),
62 '#default_value' => variable_get('buymeabeer_node_types', array()),
63 '#options' => node_get_types('names'),
64 '#description' => t('Enable the node types to display the link for.')
65 );
66
67 $form['buymeabeer']['buymeabeer_weight'] = array(
68 '#type' => 'select',
69 '#title' => t('Weight'),
70 '#default_value' => variable_get('buymeabeer_weight', 20),
71 '#options' => drupal_map_assoc(range(-20, 20)),
72 '#description' => t('Specifies the position of the link.
73 A low weight, e.g. <strong>-20</strong> will display the link above the content
74 and a high weight, e.g. <strong>20</strong> below the content.')
75 );
76 $form['buymeabeer_users'] = array(
77 '#type' => 'fieldset',
78 '#title' => t('User settings'),
79 '#collapsible' => TRUE,
80 '#collapsed' => FALSE
81 );
82 $form['buymeabeer_users']['buymeabeer_userbeer_enable'] = array(
83 '#type' => 'checkbox',
84 '#title' => t('Enable beers for users'),
85 '#default_value' => variable_get('buymeabeer_userbeer_enable', 0),
86 '#description' => t('If enabled a donation link will be displayed in the links of comments by users who entered the donation email and in links of enabled content types.')
87 );
88
89 return system_settings_form($form);
90 }

  ViewVC Help
Powered by ViewVC 1.1.2