You are here

function purr_messages_settings in Purr Messages 6

Same name and namespace in other branches
  1. 8.2 purr_messages.admin.inc \purr_messages_settings()
  2. 6.2 purr_messages.admin.inc \purr_messages_settings()
  3. 7.2 purr_messages.admin.inc \purr_messages_settings()
  4. 7 purr_messages.module \purr_messages_settings()

Implementation of hook_settings(). Configuration settings page.

1 string reference to 'purr_messages_settings'
purr_messages_menu in ./purr_messages.module
Implementation of hook_menu().

File

./purr_messages.module, line 90
Purr Messages A jQuery based override of Drupal's core message system

Code

function purr_messages_settings() {
  $module_path = drupal_get_path('module', 'purr_messages');
  $form['purr_messages_code_status'] = array(
    '#type' => 'fieldset',
    '#title' => t('Purr Messages settings'),
    '#weight' => -10,
    '#description' => purr_messages_status() !== FALSE ? t('You have a custom css file in: <br/>/%path/purrcss/') : t('You are using the default purr style. To use custom css and images simply
      copy the <em>\'purrcss\'</em> folder from: <br/>%modulepath<br/> and place
      it in your theme folder: <br/>%path<br/>Then make the alterations you want
      to the copied version in your theme folder. This module will automatically
      pick up the changes and this message will change if you\'ve done it
      correctly.<br/>', array(
      '%path' => path_to_theme(),
      '%modulepath' => $module_path,
    )),
  );
  $form['purr_messages_code_status']['purr_messages_code'] = array(
    '#type' => 'textarea',
    '#title' => t('The settings code'),
    '#rows' => 10,
    '#weight' => -10,
    '#default_value' => variable_get('purr_messages_code', purr_messages_defaults()),
    '#description' => t('Add the purr messages code here. Example code is already
      provided, simply adjust the values to suit. More information can be found
      here: !netperspective', array(
      '!netperspective' => l('http://kitchen.net-perspective.com/open-source/purr', 'http://kitchen.net-perspective.com/open-source/purr'),
    )),
  );
  $form['purr_messages_admin_path'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable purr messages on admin paths'),
    '#description' => t('Checking this box will disable purr messages on admin paths,
      as determined by the path_is_admin() function.'),
    '#default_value' => variable_get('purr_messages_admin_path', FALSE),
  );
  return system_settings_form($form);
}