You are here

function workspace_settings in Workspace 6

Same name and namespace in other branches
  1. 7 workspace.module \workspace_settings()

Implementation of hook_settings().

1 string reference to 'workspace_settings'
workspace_menu in ./workspace.module
Implementation of hook_menu().

File

./workspace.module, line 532
Presents a user-centric view of content.

Code

function workspace_settings() {
  $roles = user_roles();

  // The anonymous user does not have a profile.
  unset($roles[DRUPAL_ANONYMOUS_RID]);
  $form['info'] = array(
    '#value' => t("Select each role for which you want the link to a user's workspace to show up in their user profile."),
  );
  foreach ($roles as $rid => $name) {
    $identifier = 'workspace_user_profile_' . $rid;
    $form[$identifier] = array(
      '#type' => 'checkbox',
      '#title' => $name,
      '#default_value' => variable_get($identifier, 0),
    );
  }
  $form['workspace_user_profile_link'] = array(
    '#type' => 'textfield',
    '#title' => t("Name of link to user's workspace"),
    '#description' => t("This will be used to display the link to a user's workspace on his or her profile page. The %username token will be replaced by the username of the user whose profile is being shown."),
    '#default_value' => variable_get('workspace_user_profile_link', t('View recent content created by %username')),
  );
  return system_settings_form($form);
}