You are here

function _biblio_get_user_openurl_form in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.admin.inc \_biblio_get_user_openurl_form()
  2. 6 biblio.admin.inc \_biblio_get_user_openurl_form()
  3. 7.2 includes/biblio.admin.inc \_biblio_get_user_openurl_form()

Parameters

$user:

Return value

multitype:string number NULL

1 call to _biblio_get_user_openurl_form()
biblio_form_user_profile_form_alter in ./biblio.module
Implements hook_user().

File

includes/biblio.admin.inc, line 1909
biblio.admin.inc

Code

function _biblio_get_user_openurl_form($user) {
  $form['openurl'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('OpenURL'),
    '#description' => t('You can set an <a href="http://en.wikipedia.org/wiki/OpenURL">openurl</a> link here'),
  );
  $form['openurl']['biblio_baseopenurl'] = array(
    '#type' => 'textfield',
    '#title' => t('OpenURL Base URL'),
    '#size' => 95,
    '#default_value' => !empty($user->data['biblio_baseopenurl']) ? $user->data['biblio_baseopenurl'] : '',
    '#description' => t('This sets your base <a href="http://en.wikipedia.org/wiki/OpenURL">OpenURL</a> gateway, which is used to generate OpenURL links. To implement a "Universal" OpenURL system, try using OCLC\'s <a href="http://www.oclc.org/productworks/urlresolver.htm">OpenURL Resolver Registry</a> gateway: <a href="http://worldcatlibraries.org/registry/gateway">http://worldcatlibraries.org/registry/gateway</a>'),
  );
  $sid = "Biblio:" . variable_get('site_name', 'Drupal');
  $form['openurl']['biblio_openurl_sid'] = array(
    '#type' => 'textfield',
    '#title' => t('OpenURL Site ID'),
    '#size' => 95,
    '#default_value' => !empty($user->data['biblio_openurl_sid']) ? $user->data['biblio_openurl_sid'] : '',
    '#description' => t('This sets your site name, some link resolvers will require a specific Site ID in order to process your requests.'),
  );
  return $form;
}