Projet

Général

Profil

Révision e9f59589

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/piwik/piwik.admin.inc
83 83
  // Page specific visibility configurations.
84 84
  $php_access = user_access('use PHP for tracking visibility');
85 85
  $visibility = variable_get('piwik_visibility_pages', 0);
86
  $pages = variable_get('piwik_pages', '');
86
  $pages = variable_get('piwik_pages', PIWIK_PAGES);
87 87

  
88 88
  $form['tracking']['page_vis_settings'] = array(
89 89
    '#type' => 'fieldset',
......
175 175
    '#type' => 'fieldset',
176 176
    '#title' => t('Links and downloads'),
177 177
  );
178
  $form['tracking']['linktracking']['piwik_trackmailto'] = array(
179
    '#type' => 'checkbox',
180
    '#title' => t('Track clicks on mailto links'),
181
    '#default_value' => variable_get('piwik_trackmailto', 1),
182
  );
178 183
  $form['tracking']['linktracking']['piwik_track'] = array(
179 184
    '#type' => 'checkbox',
180 185
    '#title' => t('Track clicks on outbound links and downloads (clicks on file links) for the following extensions'),
......
184 189
    '#title' => t('List of download file extensions'),
185 190
    '#title_display' => 'invisible',
186 191
    '#type' => 'textfield',
187
    '#default_value' => variable_get('piwik_trackfiles_extensions', PK_TRACKFILES_EXTENSIONS),
188
    '#description' => t('A file extension list separated by the | character that will be tracked when clicked. Regular expressions are supported. For example: !extensions', array('!extensions' => PK_TRACKFILES_EXTENSIONS)),
192
    '#default_value' => variable_get('piwik_trackfiles_extensions', PIWIK_TRACKFILES_EXTENSIONS),
193
    '#description' => t('A file extension list separated by the | character that will be tracked when clicked. Regular expressions are supported. For example: !extensions', array('!extensions' => PIWIK_TRACKFILES_EXTENSIONS)),
189 194
    '#maxlength' => 255,
195
    '#states' => array(
196
      'enabled' => array(
197
        ':input[name="piwik_track"]' => array('checked' => TRUE),
198
      ),
199
      # Note: Form required marker is not visible as title is invisible.
200
      'required' => array(
201
        ':input[name="piwik_track"]' => array('checked' => TRUE),
202
      ),
203
    ),
204
  );
205

  
206
  // Message specific configurations.
207
  $form['tracking']['messagetracking'] = array(
208
    '#type' => 'fieldset',
209
    '#title' => t('Messages'),
210
  );
211
  $form['tracking']['messagetracking']['piwik_trackmessages'] = array(
212
    '#type' => 'checkboxes',
213
    '#title' => t('Track messages of type'),
214
    '#default_value' => variable_get('piwik_trackmessages', array()),
215
    '#description' => t('This will track the selected message types shown to users. Tracking of form validation errors may help you identifying usability issues in your site. Every message is tracked as one individual event. Messages from excluded pages cannot tracked.'),
216
    '#options' => array(
217
      'status' => t('Status message'),
218
      'warning' => t('Warning message'),
219
      'error' => t('Error message'),
220
    ),
190 221
  );
191 222

  
192 223
  $form['tracking']['search'] = array(
......
358 389
  $form['advanced']['piwik_js_scope'] = array(
359 390
    '#type' => 'select',
360 391
    '#title' => t('JavaScript scope'),
361
    '#description' => t("<strong>Warning:</strong> Adding the external JavaScript files to the footer region is recommended for performance reasons."),
392
    '#description' => t("Piwik recommends adding the tracking code to the header for performance reasons."),
362 393
    '#options' => array(
363 394
      'footer' => t('Footer'),
364 395
      'header' => t('Header'),
365 396
    ),
366
    '#default_value' => variable_get('piwik_js_scope', 'footer'),
397
    '#default_value' => variable_get('piwik_js_scope', 'header'),
367 398
  );
368 399

  
369 400
  return system_settings_form($form);

Formats disponibles : Unified diff