Mercurial > hg > digitalobjects
diff digitalobjects.admin.inc @ 0:6f6e07baad80 default tip
initial
author | Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 02 Jun 2015 08:57:48 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/digitalobjects.admin.inc Tue Jun 02 08:57:48 2015 +0200 @@ -0,0 +1,124 @@ +<?php +/** + * Form builder for general settings used as a menu callback. + * + * @param array $form + * @param array $form_state + * + * @return array Output of the system_settings_form() + */ +function digitalobjects_settings(array $form, array &$form_state) { + + + $form['digitalobjects_bibdata_path'] = array( + '#type' => 'textfield', + '#title' => t('bibdataprovider URL'), + '#default_value' => variable_get('digitalobjects_bibdata_path',"http://localhost:18080/metadata"), + '#maxlength' => 255, + '#description' => t('URL to the bibdataprovider (no "/" at the end!)'), + + ); + + $form['digitalobjects_docuviewer_path'] = array( + '#type' => 'textfield', + '#title' => t('docuviewer URL'), + '#default_value' => variable_get('digitalobjects_docuviewer_path',"http://localhost:18080/ECHOdocuView"), + '#maxlength' => 255, + '#description' => t('URL to the docuviewer (no "/" at the end!)'), + + ); + + + + $scal="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?"; + + $form['digitalobjects_scaler_path'] = array( + '#type' => 'textfield', + '#title' => t('scaler URL'), + '#default_value' => variable_get('digitalobjects_scaler_path',$scal), + '#maxlength' => 255, + '#description' => t('Url to digilib scaler'), + + ); + + $digilibjs="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/jquery/digilib.html?"; + + $form['digitalobjects_digilib_path'] = array( + '#type' => 'textfield', + '#title' => t('scaler URL'), + '#default_value' => variable_get('digitalobjects_digilib_path',$digilibjs), + '#maxlength' => 255, + '#description' => t('Url to digilib'), + + ); + + + + + + $pdfViewer="http://content.mpiwg-berlin.mpg.de/pdfViewer/pdf.js-master/web/viewer.html?file="; + + $form['digitalobjects_pdfviewer_path'] = array( + '#type' => 'textfield', + '#title' => t('pdf viewer URL'), + '#default_value' => variable_get('digitalobjects_pdfviewer_path',$pdfViewer), + '#maxlength' => 255, + '#description' => t('URL to the pdfViewer, used for "View PDF in external viewer"'), + + ); + + $repPath="http://content.mpiwg-berlin.mpg.de/mpiwg/online/permanent/"; + + $form['digitalobjects_repository_path'] = array( + '#type' => 'textfield', + '#title' => t('default repository path'), + '#default_value' => variable_get('digitalobjects_repository_path',$repPath), + '#maxlength' => 255, + '#description' => t('Default repository path, used for "View PDF in external viewer"'), + + ); + + + $linkbase="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/jquery/digilib.html?fn=/permanent/library/VAQGXTWH/pageimg/"; + $form['digitalobjects_imagebase_digilib_path'] = array( + '#type' => 'textfield', + '#title' => t('EXPERIMENTAL -- default image folder path (digilib)'), + '#default_value' => variable_get('digitalobjects_imagebase_digilib_path',$linkbase), + '#maxlength' => 255, + '#description' => t('Default image folder path, used for "View filename as image with link to digilib"'), + + ); + + $srcbase="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?dw=100&fn="; + + $form['digitalobjects_imagebase_scaler_path'] = array( + '#type' => 'textfield', + '#title' => t('EXPERIMENTAL -- default image folder path (scaler)'), + '#default_value' => variable_get('digitalobjects_imagebase_scaler_path',$srcbase), + '#maxlength' => 255, + '#description' => t('Default image folder path, used for "View filename as image with link to digilib"'), + + ); + + + $srcbase_large="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?dw=200&fn="; + + $form['digitalobjects_imagebase_scaler_path_large'] = array( + '#type' => 'textfield', + '#title' => t('EXPERIMENTAL -- default image folder path (scaler/large)'), + '#default_value' => variable_get('digitalobjects_imagebase_scaler_path_large',$srcbase_large), + '#maxlength' => 255, + '#description' => t('Default image folder path, used for "View filename (200px) as image with link to digilib"'), + + ); + + + + + + + return system_settings_form($form); + +} + +