Projet

Général

Profil

Paste
Télécharger (4,91 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / responsive / theme-settings.php @ 668200bc

1
<?php
2
/**
3
 * Implements hook_form_FORM_ID_alter().
4
 *
5
 * @param $form
6
 *   The form.
7
 * @param $form_state
8
 *   The form state.
9
 */
10
function responsive_form_system_theme_settings_alter(&$form, &$form_state) {
11

    
12
  $form['resp_settings'] = array(
13
    '#type' => 'fieldset',
14
    '#title' => t('Responsive Theme Settings'),
15
    '#collapsible' => FALSE,
16
    '#collapsed' => FALSE,
17
  );
18
  $form['resp_settings']['breadcrumbs'] = array(
19
    '#type' => 'checkbox',
20
    '#title' => t('Show breadcrumbs in a page'),
21
    '#default_value' => theme_get_setting('breadcrumbs','responsive'),
22
    '#description'   => t("Check this option to show breadcrumbs in page. Uncheck to hide."),
23
  );
24
  $form['resp_settings']['slideshow'] = array(
25
    '#type' => 'fieldset',
26
    '#title' => t('Front Page Slideshow'),
27
    '#collapsible' => TRUE,
28
    '#collapsed' => FALSE,
29
  );
30
  $form['resp_settings']['slideshow']['slideshow_display'] = array(
31
    '#type' => 'checkbox',
32
    '#title' => t('Show slideshow'),
33
    '#default_value' => theme_get_setting('slideshow_display','responsive'),
34
    '#description'   => t("Check this option to show Slideshow in front page. Uncheck to hide."),
35
  );
36
    $form['resp_settings']['slideshow']['slide'] = array(
37
    '#markup' => t('You can change the description and URL of each slide in the following Slide Setting fieldsets.'),
38
  );
39
  $form['resp_settings']['slideshow']['slide1'] = array(
40
    '#type' => 'fieldset',
41
    '#title' => t('Slide 1'),
42
    '#collapsible' => TRUE,
43
    '#collapsed' => TRUE,
44
  );
45
  $form['resp_settings']['slideshow']['slide1']['slide1_desc'] = array(
46
    '#type' => 'textfield',
47
    '#title' => t('Slide Description'),
48
    '#default_value' => theme_get_setting('slide1_desc','responsive'),
49
  );
50
  $form['resp_settings']['slideshow']['slide1']['slide1_url'] = array(
51
    '#type' => 'textfield',
52
    '#title' => t('Slide URL'),
53
    '#default_value' => theme_get_setting('slide1_url','responsive'),
54
  );
55
  $form['resp_settings']['slideshow']['slide2'] = array(
56
    '#type' => 'fieldset',
57
    '#title' => t('Slide 2'),
58
    '#collapsible' => TRUE,
59
    '#collapsed' => TRUE,
60
  );
61
  $form['resp_settings']['slideshow']['slide2']['slide2_desc'] = array(
62
    '#type' => 'textfield',
63
    '#title' => t('Slide Description'),
64
    '#default_value' => theme_get_setting('slide2_desc','responsive'),
65
  );
66
  $form['resp_settings']['slideshow']['slide2']['slide2_url'] = array(
67
    '#type' => 'textfield',
68
    '#title' => t('Slide URL'),
69
    '#default_value' => theme_get_setting('slide2_url','responsive'),
70
  );
71
  $form['resp_settings']['slideshow']['slide3'] = array(
72
    '#type' => 'fieldset',
73
    '#title' => t('Slide 3'),
74
    '#collapsible' => TRUE,
75
    '#collapsed' => TRUE,
76
  );
77
  $form['resp_settings']['slideshow']['slide3']['slide3_desc'] = array(
78
    '#type' => 'textfield',
79
    '#title' => t('Slide Description'),
80
    '#default_value' => theme_get_setting('slide3_desc','responsive'),
81
  );
82
  $form['resp_settings']['slideshow']['slide3']['slide3_url'] = array(
83
    '#type' => 'textfield',
84
    '#title' => t('Slide URL'),
85
    '#default_value' => theme_get_setting('slide3_url','responsive'),
86
  );
87
  $form['resp_settings']['slideshow']['slideimage'] = array(
88
    '#markup' => t('To change the Slide Images, Replace the slide-image-1.jpg, slide-image-2.jpg and slide-image-3.jpg in the images folder of the responsive theme folder.'),
89
  );
90
  $form['resp_settings']['socialicon'] = array(
91
    '#type' => 'fieldset',
92
    '#title' => t('Social Icon'),
93
    '#collapsible' => TRUE,
94
    '#collapsed' => FALSE,
95
  );
96
  $form['resp_settings']['socialicon']['socialicon_display'] = array(
97
    '#type' => 'checkbox',
98
    '#title' => t('Show Social Icon'),
99
    '#default_value' => theme_get_setting('socialicon_display','responsive'),
100
    '#description'   => t("Check this option to show Social Icon. Uncheck to hide."),
101
  );
102
  $form['resp_settings']['socialicon']['twitter_url'] = array(
103
    '#type' => 'textfield',
104
    '#title' => t('Twitter Profile URL'),
105
    '#default_value' => theme_get_setting('twitter_url', 'responsive'),
106
          '#description'   => t("Enter your Twitter Profile URL. Leave blank to hide."),
107
  );
108
  $form['resp_settings']['socialicon']['facebook_url'] = array(
109
    '#type' => 'textfield',
110
    '#title' => t('Facebook Profile URL'),
111
    '#default_value' => theme_get_setting('facebook_url', 'responsive'),
112
          '#description'   => t("Enter your Facebook Profile URL. Leave blank to hide."),
113
  );
114
  $form['resp_settings']['socialicon']['googleplus_url'] = array(
115
    '#type' => 'textfield',
116
    '#title' => t('Google+ Profile URL'),
117
    '#default_value' => theme_get_setting('googleplus_url', 'responsive'),
118
          '#description'   => t("Enter your Google+ Profile URL. Leave blank to hide."),
119
  );
120
  $form['resp_settings']['socialicon']['linkedin_url'] = array(
121
    '#type' => 'textfield',
122
    '#title' => t('LinkedIn Profile URL'),
123
    '#default_value' => theme_get_setting('linkedin_url', 'responsive'),
124
          '#description'   => t("Enter your LinkedIn Profile URL. Leave blank to hide."),
125
  );
126
}