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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Oct 11 13:36:12 2008 UTC (13 months, 2 weeks ago) by freso
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +56 -0 lines
File MIME type: text/x-php
Merge from DRUPAL-6--1 (6.x-1.x) to HEAD (6.x-2.x).
1 <?php
2 // $Id: languageicons.admin.inc,v 1.1.2.2 2008/08/11 17:25:55 freso Exp $
3
4 /**
5 * @file
6 * Admin page callbacks for the Language Icons module.
7 */
8
9 /**
10 * Form builder; configure Language Icons.
11 *
12 * @ingroup forms
13 * @see system_settings_form()
14 */
15 function languageicons_admin_settings() {
16 $form['show'] = array(
17 '#type' => 'fieldset',
18 '#title' => t('Add language icons'),
19 '#description' => t('Link types to add language icons.'),
20 );
21 $form['show']['languageicons_show_node'] = array(
22 '#type' => 'checkbox',
23 '#title' => t('Node links'),
24 '#default_value' => variable_get('languageicons_show_node', 1),
25 );
26 $form['show']['languageicons_show_block'] = array(
27 '#type' => 'checkbox',
28 '#title' => t('Language switcher block'),
29 '#default_value' => variable_get('languageicons_show_block', 1),
30 );
31 $form['languageicons_placement'] = array(
32 '#type' => 'radios',
33 '#title' => t('Icon placement'),
34 '#options' => array('before' => t('Before'), 'after' => t('After'), 'replace' => t('Replace')),
35 '#default_value' => variable_get('languageicons_placement', 'before'),
36 '#description' => t('Where to display the icon, relative to the link title.'),
37 );
38 $form['languageicons_path'] = array(
39 '#type' => 'textfield',
40 '#title' => t('Icons file path'),
41 '#default_value' => variable_get('languageicons_path', drupal_get_path('module', 'languageicons') .'/flags/*.png'),
42 '#size' => 70,
43 '#maxlength' => 180,
44 '#description' => t('Path for language icons, relative to Drupal installation. \'*\' is a placeholder for language code.'),
45 );
46 $form['languageicons_size'] = array(
47 '#type' => 'textfield',
48 '#title' => t('Image size'),
49 '#default_value' => variable_get('languageicons_size', '16x12'),
50 '#size' => 10,
51 '#maxlength' => 10,
52 '#description' => t('Image size for language icons, in the form "width x height".'),
53 );
54
55 return system_settings_form($form);
56 }

  ViewVC Help
Powered by ViewVC 1.1.2