comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:6f6e07baad80
1 <?php
2 /**
3 * Form builder for general settings used as a menu callback.
4 *
5 * @param array $form
6 * @param array $form_state
7 *
8 * @return array Output of the system_settings_form()
9 */
10 function digitalobjects_settings(array $form, array &$form_state) {
11
12
13 $form['digitalobjects_bibdata_path'] = array(
14 '#type' => 'textfield',
15 '#title' => t('bibdataprovider URL'),
16 '#default_value' => variable_get('digitalobjects_bibdata_path',"http://localhost:18080/metadata"),
17 '#maxlength' => 255,
18 '#description' => t('URL to the bibdataprovider (no "/" at the end!)'),
19
20 );
21
22 $form['digitalobjects_docuviewer_path'] = array(
23 '#type' => 'textfield',
24 '#title' => t('docuviewer URL'),
25 '#default_value' => variable_get('digitalobjects_docuviewer_path',"http://localhost:18080/ECHOdocuView"),
26 '#maxlength' => 255,
27 '#description' => t('URL to the docuviewer (no "/" at the end!)'),
28
29 );
30
31
32
33 $scal="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?";
34
35 $form['digitalobjects_scaler_path'] = array(
36 '#type' => 'textfield',
37 '#title' => t('scaler URL'),
38 '#default_value' => variable_get('digitalobjects_scaler_path',$scal),
39 '#maxlength' => 255,
40 '#description' => t('Url to digilib scaler'),
41
42 );
43
44 $digilibjs="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/jquery/digilib.html?";
45
46 $form['digitalobjects_digilib_path'] = array(
47 '#type' => 'textfield',
48 '#title' => t('scaler URL'),
49 '#default_value' => variable_get('digitalobjects_digilib_path',$digilibjs),
50 '#maxlength' => 255,
51 '#description' => t('Url to digilib'),
52
53 );
54
55
56
57
58
59 $pdfViewer="http://content.mpiwg-berlin.mpg.de/pdfViewer/pdf.js-master/web/viewer.html?file=";
60
61 $form['digitalobjects_pdfviewer_path'] = array(
62 '#type' => 'textfield',
63 '#title' => t('pdf viewer URL'),
64 '#default_value' => variable_get('digitalobjects_pdfviewer_path',$pdfViewer),
65 '#maxlength' => 255,
66 '#description' => t('URL to the pdfViewer, used for "View PDF in external viewer"'),
67
68 );
69
70 $repPath="http://content.mpiwg-berlin.mpg.de/mpiwg/online/permanent/";
71
72 $form['digitalobjects_repository_path'] = array(
73 '#type' => 'textfield',
74 '#title' => t('default repository path'),
75 '#default_value' => variable_get('digitalobjects_repository_path',$repPath),
76 '#maxlength' => 255,
77 '#description' => t('Default repository path, used for "View PDF in external viewer"'),
78
79 );
80
81
82 $linkbase="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/jquery/digilib.html?fn=/permanent/library/VAQGXTWH/pageimg/";
83 $form['digitalobjects_imagebase_digilib_path'] = array(
84 '#type' => 'textfield',
85 '#title' => t('EXPERIMENTAL -- default image folder path (digilib)'),
86 '#default_value' => variable_get('digitalobjects_imagebase_digilib_path',$linkbase),
87 '#maxlength' => 255,
88 '#description' => t('Default image folder path, used for "View filename as image with link to digilib"'),
89
90 );
91
92 $srcbase="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?dw=100&fn=";
93
94 $form['digitalobjects_imagebase_scaler_path'] = array(
95 '#type' => 'textfield',
96 '#title' => t('EXPERIMENTAL -- default image folder path (scaler)'),
97 '#default_value' => variable_get('digitalobjects_imagebase_scaler_path',$srcbase),
98 '#maxlength' => 255,
99 '#description' => t('Default image folder path, used for "View filename as image with link to digilib"'),
100
101 );
102
103
104 $srcbase_large="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler?dw=200&fn=";
105
106 $form['digitalobjects_imagebase_scaler_path_large'] = array(
107 '#type' => 'textfield',
108 '#title' => t('EXPERIMENTAL -- default image folder path (scaler/large)'),
109 '#default_value' => variable_get('digitalobjects_imagebase_scaler_path_large',$srcbase_large),
110 '#maxlength' => 255,
111 '#description' => t('Default image folder path, used for "View filename (200px) as image with link to digilib"'),
112
113 );
114
115
116
117
118
119
120 return system_settings_form($form);
121
122 }
123
124