You are here

function follow_block_configure in Follow 5

Same name and namespace in other branches
  1. 6 follow.module \follow_block_configure()
  2. 7.2 follow.module \follow_block_configure()
  3. 7 follow.module \follow_block_configure()

Implementation of hook_block_configure().

File

./follow.module, line 112
Allows users to add links to their social network profiles.

Code

function follow_block_configure($delta = '', $edit = array()) {
  switch ($delta) {
    case 'site':
      $form['follow_title'] = array(
        '#type' => 'radios',
        '#title' => t('Default block title'),
        '#default_value' => variable_get('follow_site_block_title', FOLLOW_NAME),
        '#options' => array(
          FOLLOW_NAME => t('Follow @name on', array(
            '@name' => variable_get('site_name', 'Drupal'),
          )),
          FOLLOW_ME => t('Follow me on'),
          FOLLOW_US => t('Follow us on'),
        ),
      );
      $form['follow_user'] = array(
        '#type' => 'checkbox',
        '#title' => t('User pages'),
        '#description' => t('Should this block display on user profile pages?'),
        '#default_value' => variable_get('follow_site_block_user', TRUE),
      );
      return $form;
    case 'user':
      $form['follow_title'] = array(
        '#type' => 'radios',
        '#title' => t('Default block title'),
        '#default_value' => variable_get('follow_user_block_title', FOLLOW_NAME),
        '#options' => array(
          FOLLOW_NAME => t('Follow [username] on'),
          FOLLOW_ME => t('Follow me on'),
        ),
      );
      return $form;
  }
}