Merge lp:~sebastian-meyer/dfg-viewer/bug790098 into lp:dfg-viewer/classic
- bug790098
- Merge into classic
Proposed by
Sebastian Meyer
Status: | Merged |
---|---|
Merged at revision: | 4 |
Proposed branch: | lp:~sebastian-meyer/dfg-viewer/bug790098 |
Merge into: | lp:dfg-viewer/classic |
Diff against target: |
2138 lines (+26/-312) 8 files modified
slub_dfgviewer/ext_emconf.php (+3/-8) slub_dfgviewer/ext_localconf.php (+0/-1) slub_dfgviewer/ext_tables.php (+0/-3) slub_dfgviewer/locallang_db.xml (+0/-1) slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php (+7/-8) slub_dfgviewer/pi1/locallang.xml (+0/-275) slub_dfgviewer/pi1/static/constants.txt (+1/-1) slub_dfgviewer/pi1/static/setup.txt (+15/-15) |
To merge this branch: | bzr merge lp:~sebastian-meyer/dfg-viewer/bug790098 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Saxon State Library Team | Pending | ||
Review via email: mp+110529@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'slub_dfgviewer/ext_emconf.php' |
2 | --- slub_dfgviewer/ext_emconf.php 2011-03-07 15:24:39 +0000 |
3 | +++ slub_dfgviewer/ext_emconf.php 2012-06-15 13:45:23 +0000 |
4 | @@ -12,13 +12,11 @@ |
5 | |
6 | $EM_CONF[$_EXTKEY] = array( |
7 | 'title' => 'DFG-Viewer', |
8 | - 'description' => 'Remote resources navigator for digital libraries. Reads METS/MODS via OAI2.', |
9 | + 'description' => 'Remote resources navigator for digital libraries. Reads METS/MODS and METS/TEI via OAI2.', |
10 | 'category' => 'plugin', |
11 | 'author' => 'Sebastian Meyer', |
12 | 'author_email' => 'sebastian.meyer@slub-dresden.de', |
13 | 'shy' => '', |
14 | - 'dependencies' => '', |
15 | - 'conflicts' => '', |
16 | 'priority' => '', |
17 | 'module' => '', |
18 | 'state' => 'stable', |
19 | @@ -32,8 +30,8 @@ |
20 | 'version' => '2.5.0', |
21 | 'constraints' => array( |
22 | 'depends' => array( |
23 | - 'php' => '5.2.0-', |
24 | - 'typo3' => '4.0.0-', |
25 | + 'php' => '5.3.0-', |
26 | + 'typo3' => '4.4.0-', |
27 | ), |
28 | 'conflicts' => array( |
29 | ), |
30 | @@ -42,9 +40,6 @@ |
31 | ), |
32 | ), |
33 | '_md5_values_when_last_written' => '', |
34 | - 'suggests' => array( |
35 | - 'realurl' => '', |
36 | - ), |
37 | ); |
38 | |
39 | ?> |
40 | \ No newline at end of file |
41 | |
42 | === modified file 'slub_dfgviewer/ext_localconf.php' |
43 | --- slub_dfgviewer/ext_localconf.php 2011-03-07 15:24:39 +0000 |
44 | +++ slub_dfgviewer/ext_localconf.php 2012-06-15 13:45:23 +0000 |
45 | @@ -2,5 +2,4 @@ |
46 | if (!defined ('TYPO3_MODE')) die ('Access denied.'); |
47 | |
48 | t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_slubdfgviewer_pi1.php','_pi1','list_type',0); |
49 | -t3lib_extMgm::addPItoST43($_EXTKEY,'pi2/class.tx_slubdfgviewer_pi2.php','_pi2','list_type',0); |
50 | ?> |
51 | \ No newline at end of file |
52 | |
53 | === modified file 'slub_dfgviewer/ext_tables.php' |
54 | --- slub_dfgviewer/ext_tables.php 2011-03-07 15:24:39 +0000 |
55 | +++ slub_dfgviewer/ext_tables.php 2012-06-15 13:45:23 +0000 |
56 | @@ -3,11 +3,8 @@ |
57 | |
58 | t3lib_div::loadTCA('tt_content'); |
59 | $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key,pages'; |
60 | -$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi2']='layout,select_key,pages'; |
61 | |
62 | t3lib_extMgm::addPlugin(array('LLL:EXT:slub_dfgviewer/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type'); |
63 | -t3lib_extMgm::addPlugin(array('LLL:EXT:slub_dfgviewer/locallang_db.xml:tt_content.list_type_pi2', $_EXTKEY.'_pi2'),'list_type'); |
64 | |
65 | t3lib_extMgm::addStaticFile($_EXTKEY,'pi1/static/','DFG-Viewer'); |
66 | -t3lib_extMgm::addStaticFile($_EXTKEY,'pi2/static/','DFG-Viewer (Prototyp)'); |
67 | ?> |
68 | \ No newline at end of file |
69 | |
70 | === modified file 'slub_dfgviewer/locallang_db.xml' |
71 | --- slub_dfgviewer/locallang_db.xml 2011-03-07 15:24:39 +0000 |
72 | +++ slub_dfgviewer/locallang_db.xml 2012-06-15 13:45:23 +0000 |
73 | @@ -7,7 +7,6 @@ |
74 | <data type="array"> |
75 | <languageKey index="default" type="array"> |
76 | <label index="tt_content.list_type_pi1">DFG-Viewer</label> |
77 | - <label index="tt_content.list_type_pi2">DFG-Viewer (Prototyp)</label> |
78 | </languageKey> |
79 | </data> |
80 | </T3locallang> |
81 | \ No newline at end of file |
82 | |
83 | === added directory 'slub_dfgviewer/pi1' |
84 | === removed directory 'slub_dfgviewer/pi1' |
85 | === removed file 'slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php' |
86 | --- slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php 2011-03-07 15:24:39 +0000 |
87 | +++ slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php 1970-01-01 00:00:00 +0000 |
88 | @@ -1,1568 +0,0 @@ |
89 | -<?php |
90 | -/*************************************************************** |
91 | -* Copyright notice |
92 | -* |
93 | -* (c) 2009 Sebastian Meyer <sebastian.meyer@slub-dresden.de> |
94 | -* All rights reserved |
95 | -* |
96 | -* This script is part of the TYPO3 project. The TYPO3 project is |
97 | -* free software; you can redistribute it and/or modify |
98 | -* it under the terms of the GNU General Public License as published by |
99 | -* the Free Software Foundation; either version 3 of the License, or |
100 | -* (at your option) any later version. |
101 | -* |
102 | -* The GNU General Public License can be found at |
103 | -* http://www.gnu.org/copyleft/gpl.html. |
104 | -* |
105 | -* This script is distributed in the hope that it will be useful, |
106 | -* but WITHOUT ANY WARRANTY; without even the implied warranty of |
107 | -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
108 | -* GNU General Public License for more details. |
109 | -* |
110 | -* This copyright notice MUST APPEAR in all copies of the script! |
111 | -***************************************************************/ |
112 | - |
113 | -require_once (PATH_tslib.'class.tslib_pibase.php'); |
114 | - |
115 | -/** |
116 | - * Plugin 'DFG-Viewer' for the 'slub_dfgviewer' extension. |
117 | - * |
118 | - * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de> |
119 | - * @copyright Copyright (c) 2009 Sebastian Meyer, SLUB Dresden |
120 | - * @version $Id: class.tx_slubdfgviewer_pi1.php 34 2010-12-17 10:32:23Z smeyer $ |
121 | - * @package TYPO3 |
122 | - * @subpackage tx_slubdfgviewer |
123 | - */ |
124 | -class tx_slubdfgviewer_pi1 extends tslib_pibase { |
125 | - |
126 | - var $prefixId = 'set'; // $prefixId should be the class name but this is more practicable. |
127 | - |
128 | - var $scriptRelPath = 'pi1/class.tx_slubdfgviewer_pi1.php'; |
129 | - |
130 | - var $extKey = 'slub_dfgviewer'; |
131 | - |
132 | - var $session = array (); |
133 | - |
134 | - var $cache = 0; // No caching. |
135 | - |
136 | - var $multiPart = FALSE; // If TRUE, there is no physical structMap (and no images). |
137 | - |
138 | - var $metsLight = FALSE; // If TRUE, there is no logical structMap (which is deprecated). |
139 | - |
140 | - var $check = array (); |
141 | - |
142 | - var $error = array (); |
143 | - |
144 | - var $warning = array (); |
145 | - |
146 | - var $hint = array (); |
147 | - |
148 | - /** |
149 | - * The main method of the plugin |
150 | - * |
151 | - * @param string $content: The plugin content |
152 | - * @param array $conf: The plugin configuration |
153 | - * @return string The content that is displayed on the website |
154 | - */ |
155 | - function main($content, $conf) { |
156 | - |
157 | - // Get plugin configuration. |
158 | - |
159 | - $this->conf = $conf; |
160 | - |
161 | - $this->pi_setPiVarDefaults(); |
162 | - |
163 | - $this->pi_loadLL(); |
164 | - |
165 | - $this->pi_USER_INT_obj = 1; // No caching. |
166 | - |
167 | - // Set stylesheet and favicon. |
168 | - |
169 | - $this->setStyle(); |
170 | - |
171 | - // Load XML from session or get it from data provider. |
172 | - |
173 | - libxml_use_internal_errors(TRUE); |
174 | - |
175 | - libxml_clear_errors(); |
176 | - |
177 | - $this->session = $GLOBALS['TSFE']->fe_user->getKey('ses', $this->extKey); |
178 | - |
179 | - $this->piVars['mets'] = trim($this->piVars['mets']); |
180 | - |
181 | - $sessionKey = md5($this->piVars['mets']); |
182 | - |
183 | - if (!empty ($this->conf['useragent'])) { // Set user-agent. |
184 | - |
185 | - ini_set('user_agent', $this->conf['useragent']); |
186 | - |
187 | - } |
188 | - |
189 | - if (!empty ($this->session[$sessionKey]['xml']) && $this->piVars['debug'] != 1) { |
190 | - |
191 | - $_xml = @simplexml_load_string($this->session[$sessionKey]['xml']); |
192 | - |
193 | - } elseif (($_xml = @simplexml_load_file($this->piVars['mets'])) !== FALSE) { |
194 | - |
195 | - if (!$_xml->error) { |
196 | - |
197 | - $this->session[$sessionKey]['xml'] = $_xml->asXML(); |
198 | - |
199 | - if ($this->piVars['debug'] == 1) { |
200 | - |
201 | - $this->check[] = $this->pi_getLL('check_load'); |
202 | - |
203 | - } |
204 | - |
205 | - } else { |
206 | - |
207 | - $this->error[] = $this->pi_getLL('error_oai').htmlspecialchars($_xml->error); |
208 | - |
209 | - } |
210 | - |
211 | - } else { |
212 | - |
213 | - if (($_file = @file($this->piVars['mets'])) === FALSE) { |
214 | - |
215 | - $this->error[] = $this->pi_getLL('error_file').htmlspecialchars($this->piVars['mets']); |
216 | - |
217 | - } |
218 | - |
219 | - $_errors = libxml_get_errors(); |
220 | - |
221 | - if (!empty ($_errors)) { |
222 | - |
223 | - foreach ($_errors as $_error) { |
224 | - |
225 | - $this->error[] = $this->libxml_show_error($_error, $_file); |
226 | - |
227 | - } |
228 | - |
229 | - } else { |
230 | - |
231 | - $this->error[] = $this->pi_getLL('error_xml'); |
232 | - |
233 | - } |
234 | - |
235 | - } |
236 | - |
237 | - // Check if there is a valid METS namespace. |
238 | - |
239 | - if (count($this->error) == 0 && $_xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/')) { |
240 | - |
241 | - $_mets = $_xml->xpath('//mets:mets'); |
242 | - |
243 | - if (!empty ($_mets)) { |
244 | - |
245 | - $mets = $_mets[0]; |
246 | - |
247 | - // Register namespaces. |
248 | - |
249 | - $mets->registerXPathNamespace('mets', 'http://www.loc.gov/METS/'); |
250 | - |
251 | - $mets->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
252 | - |
253 | - $mets->registerXPathNamespace('xlink', 'http://www.w3.org/1999/xlink'); |
254 | - |
255 | - $mets->registerXPathNamespace('dv', 'http://dfg-viewer.de/'); |
256 | - |
257 | - if ($this->piVars['debug'] == 1) { |
258 | - |
259 | - $this->check[] = $this->pi_getLL('check_mets'); |
260 | - |
261 | - } |
262 | - |
263 | - } else { |
264 | - |
265 | - $this->error[] = $this->pi_getLL('error_mets'); |
266 | - |
267 | - } |
268 | - |
269 | - } elseif (count($this->error) == 0) { |
270 | - |
271 | - $this->error[] = $this->pi_getLL('error_ns'); |
272 | - |
273 | - } |
274 | - |
275 | - // Validate METS/MODS against schemas. |
276 | - |
277 | - if (count($this->error) == 0 && $this->piVars['debug'] == 1) { |
278 | - |
279 | - $this->validateSchema($mets); |
280 | - |
281 | - } |
282 | - |
283 | - // Check if there are logical and physical <structMap> nodes. |
284 | - |
285 | - if (count($this->error) == 0) { |
286 | - |
287 | - $_numOfLogStrct = count($mets->xpath('./mets:structMap[@TYPE="LOGICAL"]')); |
288 | - |
289 | - if ($_numOfLogStrct < 1) { |
290 | - |
291 | - $this->metsLight = TRUE; |
292 | - |
293 | - if ($this->piVars['debug'] == 1) { |
294 | - |
295 | - $this->warning[] = $this->pi_getLL('warning_logical'); |
296 | - |
297 | - } |
298 | - |
299 | - } elseif ($_numOfLogStrct > 1) { |
300 | - |
301 | - $this->error[] = $this->pi_getLL('error_logical'); |
302 | - |
303 | - } elseif ($this->piVars['debug'] == 1) { |
304 | - |
305 | - $this->check[] = $this->pi_getLL('check_logical'); |
306 | - |
307 | - } |
308 | - |
309 | - $_numOfPhysStrct = count($mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]')); |
310 | - |
311 | - if ($_numOfPhysStrct == 1) { |
312 | - |
313 | - // Is there a <fileSec> node, too? |
314 | - |
315 | - $_numOfFileSec = count($mets->xpath('./mets:fileSec')); |
316 | - |
317 | - if ($_numOfFileSec != 1) { |
318 | - |
319 | - $this->error[] = $this->pi_getLL('error_filesec'); |
320 | - |
321 | - } elseif ($this->piVars['debug'] == 1) { |
322 | - |
323 | - $this->check[] = $this->pi_getLL('check_physical_filesec'); |
324 | - |
325 | - } |
326 | - |
327 | - } elseif ($_numOfPhysStrct < 1) { |
328 | - |
329 | - if (!$this->metsLight) { |
330 | - |
331 | - $this->multiPart = TRUE; |
332 | - |
333 | - if ($this->piVars['debug'] == 1) { |
334 | - |
335 | - $this->check[] = $this->pi_getLL('check_multipart'); |
336 | - |
337 | - } |
338 | - |
339 | - } else { |
340 | - |
341 | - $this->error[] = $this->pi_getLL('error_structmap'); |
342 | - |
343 | - } |
344 | - |
345 | - } else { |
346 | - |
347 | - $this->error[] = $this->pi_getLL('error_physical'); |
348 | - |
349 | - } |
350 | - |
351 | - } |
352 | - |
353 | - // Get ADMID and DMDID from logical or physical <structMap> node. |
354 | - |
355 | - $admid = $dmdid = ''; |
356 | - |
357 | - if (!$this->metsLight && count($this->error) == 0) { |
358 | - |
359 | - $_admids = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ADMID]'); |
360 | - |
361 | - foreach ($_admids as $_admid) { |
362 | - |
363 | - if (count($mets->xpath('./mets:structLink/mets:smLink[@xlink:from="'.(string) $_admid['ID'].'"]'))) { |
364 | - |
365 | - $admid = (string) $_admid['ADMID']; |
366 | - |
367 | - break; |
368 | - |
369 | - } elseif ($admid == '') { |
370 | - |
371 | - $admid = (string) $_admid['ADMID']; |
372 | - |
373 | - } |
374 | - |
375 | - } |
376 | - |
377 | - $_dmdids = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@DMDID]'); |
378 | - |
379 | - foreach ($_dmdids as $_dmdid) { |
380 | - |
381 | - if (count($mets->xpath('./mets:structLink/mets:smLink[@xlink:from="'.(string) $_dmdid['ID'].'"]'))) { |
382 | - |
383 | - $dmdid = (string) $_dmdid['DMDID']; |
384 | - |
385 | - break; |
386 | - |
387 | - } elseif ($dmdid == '') { |
388 | - |
389 | - $dmdid = (string) $_dmdid['DMDID']; |
390 | - |
391 | - } |
392 | - |
393 | - } |
394 | - |
395 | - } elseif (count($this->error) == 0) { |
396 | - |
397 | - $_admid = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div/@ADMID'); |
398 | - |
399 | - $admid = (string) $_admid[0]; |
400 | - |
401 | - $_dmdid = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div/@DMDID'); |
402 | - |
403 | - $dmdid = (string) $_dmdid[0]; |
404 | - |
405 | - } |
406 | - |
407 | - if (count($this->error) == 0 && $admid == '') { |
408 | - |
409 | - $this->error[] = $this->pi_getLL('error_admid'); |
410 | - |
411 | - } elseif (count($this->error) == 0 && $this->piVars['debug'] == 1) { |
412 | - |
413 | - $this->check[] = $this->pi_getLL('check_admid'); |
414 | - |
415 | - } |
416 | - |
417 | - if (count($this->error) == 0 && $dmdid == '') { |
418 | - |
419 | - $this->error[] = $this->pi_getLL('error_dmdid'); |
420 | - |
421 | - } elseif (count($this->error) == 0 && $this->piVars['debug'] == 1) { |
422 | - |
423 | - $this->check[] = $this->pi_getLL('check_dmdid'); |
424 | - |
425 | - } |
426 | - |
427 | - // Get page array sorted by ORDER attribute. |
428 | - |
429 | - if (count($this->error) == 0 && !$this->multiPart) { |
430 | - |
431 | - if (!empty ($this->session[$sessionKey]['pages']) && !empty ($this->session[$sessionKey]['labels']) && $this->piVars['debug'] != 1) { |
432 | - |
433 | - $pages = $this->session[$sessionKey]['pages']; |
434 | - |
435 | - $labels = $this->session[$sessionKey]['labels']; |
436 | - |
437 | - } else { |
438 | - |
439 | - $_pages = $_labels = array (); |
440 | - |
441 | - if (!$this->metsLight) { |
442 | - |
443 | - $_pageNodes = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div[@TYPE="physSequence"]/mets:div[@TYPE="page"]'); |
444 | - |
445 | - } else { |
446 | - |
447 | - $_pageNodes = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div/mets:div'); |
448 | - |
449 | - } |
450 | - |
451 | - if (is_array($_pageNodes)) { |
452 | - |
453 | - foreach ($_pageNodes as $_page) { |
454 | - |
455 | - $_order = (int) $_page['ORDER']; |
456 | - |
457 | - $_pages[$_order] = (string) $_page['ID']; |
458 | - |
459 | - $_labels[$_order] = (string) $_page['ORDERLABEL']; |
460 | - |
461 | - } |
462 | - |
463 | - } |
464 | - |
465 | - if (ksort($_pages) && ksort($_labels)) { |
466 | - |
467 | - $pages = array_merge($_pages); |
468 | - |
469 | - $labels = array_merge($_labels); |
470 | - |
471 | - } |
472 | - |
473 | - $this->session[$sessionKey]['pages'] = $pages; |
474 | - |
475 | - $this->session[$sessionKey]['labels'] = $labels; |
476 | - |
477 | - } |
478 | - |
479 | - $_numOfPages = count($pages); |
480 | - |
481 | - if ($_numOfPages < 1 && $this->piVars['debug'] == 1) { |
482 | - |
483 | - $this->warning[] = $this->pi_getLL('warning_pages'); |
484 | - |
485 | - } elseif ($this->piVars['debug'] == 1) { |
486 | - |
487 | - $this->check[] = $this->pi_getLL('check_pages'); |
488 | - |
489 | - } |
490 | - |
491 | - if (!is_int($this->piVars['image']) && in_array($this->piVars['image'], $pages)) { |
492 | - |
493 | - $this->piVars['image'] = array_search($this->piVars['image'], $pages) + 1; |
494 | - |
495 | - } elseif ($this->piVars['image'] < 1 || $this->piVars['image'] > $_numOfPages) { |
496 | - |
497 | - $this->piVars['image'] = 1; |
498 | - |
499 | - } |
500 | - |
501 | - if ($this->piVars['double'] == 1) { |
502 | - |
503 | - $factor = 2; |
504 | - |
505 | - } else { |
506 | - |
507 | - $factor = 1; |
508 | - |
509 | - } |
510 | - |
511 | - $_pageSelect = ''; |
512 | - |
513 | - for ($i = 0; $i < $_numOfPages; $i++) { |
514 | - |
515 | - $_pageSelect .= '<option value="'.($i + 1).'"'.($this->piVars['image'] == ($i + 1) ? ' selected="selected"' : '').'>['.($i + 1).']'.(!empty ($labels[$i]) ? ' - '.htmlspecialchars($labels[$i]) : '').'</option>'; |
516 | - |
517 | - } |
518 | - |
519 | - $_pageSelect .= '</select><input type="hidden" name="'.$this->prefixId.'[mets]" value="'.htmlspecialchars($this->piVars['mets']).'" /><input type="hidden" name="'.$this->prefixId.'[zoom]" value="'.htmlspecialchars($this->piVars['zoom']).'" /><input type="hidden" name="'.$this->prefixId.'[debug]" value="'.htmlspecialchars($this->piVars['debug']).'" /><input type="hidden" name="'.$this->prefixId.'[double]" value="'.htmlspecialchars($this->piVars['double']).'" /><input type="hidden" name="'.$this->prefixId.'[style]" value="'.htmlspecialchars($this->piVars['style']).'" /></div></form>'; |
520 | - |
521 | - $markerArray['###PAGESELECT1###'] = '<form id="pageSelect1" method="get" action="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array (), $this->cache, TRUE)).'"><div><label for="selector1">'.$this->pi_getLL('pageSelect').'</label><select onchange="javascript:document.getElementById(\'pageSelect1\').submit();" name="'.$this->prefixId.'[image]" id="selector1">'.$_pageSelect; |
522 | - |
523 | - $markerArray['###PAGESELECT2###'] = '<form id="pageSelect2" method="get" action="'.htmlspecialchars($this->pi_linkTP_keepPIVars_url(array (), $this->cache, TRUE)).'"><div><label for="selector2">'.$this->pi_getLL('pageSelect').'</label><select onchange="javascript:document.getElementById(\'pageSelect2\').submit();" name="'.$this->prefixId.'[image]" id="selector2">'.$_pageSelect; |
524 | - |
525 | - } else { |
526 | - |
527 | - $markerArray['###PAGESELECT1###'] = ''; |
528 | - |
529 | - $markerArray['###PAGESELECT2###'] = ''; |
530 | - |
531 | - } |
532 | - |
533 | - // Build navigation tree from logical <structMap>. |
534 | - |
535 | - if (count($this->error) == 0 && !$this->metsLight && count($mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div')) > 1) { |
536 | - |
537 | - $_divs = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div'); |
538 | - |
539 | - $navigation = ''; |
540 | - |
541 | - while (list (, $_div) = each($_divs)) { |
542 | - |
543 | - $navigation .= $this->generateNavigation($_div, $mets, $pages); |
544 | - |
545 | - } |
546 | - |
547 | - if ($navigation != '') { |
548 | - |
549 | - $navigation = '<ul>'.$navigation.'</ul>'; |
550 | - |
551 | - $markerArray['###NAVIGATION###'] = $this->cObj->stdWrap($navigation, $this->conf['navigation.']); |
552 | - |
553 | - if ($this->piVars['debug'] == 1) { |
554 | - |
555 | - $this->check[] = $this->pi_getLL('check_navigation'); |
556 | - |
557 | - } |
558 | - |
559 | - } else { |
560 | - |
561 | - $markerArray['###NAVIGATION###'] = ''; |
562 | - |
563 | - } |
564 | - |
565 | - } else { |
566 | - |
567 | - $markerArray['###NAVIGATION###'] = ''; |
568 | - |
569 | - } |
570 | - |
571 | - // Get bibliographic metadata from <dmdSec>. |
572 | - |
573 | - if (count($this->error) == 0 ) { |
574 | - |
575 | - $_mods = $mets->xpath('./mets:dmdSec[@ID="'.$dmdid.'"]/mets:mdWrap[@MDTYPE="MODS"]/mets:xmlData/mods:mods'); |
576 | - |
577 | - } |
578 | - |
579 | - if (count($this->error) == 0 && count($_mods) == 1 && $_mods !== FALSE) { |
580 | - |
581 | - $mods = $_mods[0]->children('http://www.loc.gov/mods/v3'); |
582 | - |
583 | - if (!empty ($mods->titleInfo) && strlen((string) $mods->titleInfo->title) > 0) { |
584 | - |
585 | - $title = htmlspecialchars(trim((string) $mods->titleInfo->title)); |
586 | - |
587 | - if (!empty ($mods->titleInfo->nonSort) && strlen((string) $mods->titleInfo->nonSort) > 0) { |
588 | - |
589 | - $title = htmlspecialchars(trim((string) $mods->titleInfo->nonSort)).' '.$title; |
590 | - |
591 | - } |
592 | - |
593 | - $markerArray['###TITLE###'] = $this->cObj->stdWrap($title, $this->conf['title.']); |
594 | - |
595 | - if (!empty ($mods->titleInfo->partNumber) && strlen((string) $mods->titleInfo->partNumber) > 0) { |
596 | - |
597 | - $volume = $this->pi_getLL('volume').' '.htmlspecialchars(trim((string) $mods->titleInfo->partNumber)); |
598 | - |
599 | - if (!empty ($mods->titleInfo->partName) && strlen((string) $mods->titleInfo->partName) > 0) { |
600 | - |
601 | - $volume .= ': '.htmlspecialchars(trim((string) $mods->titleInfo->partName)); |
602 | - |
603 | - } |
604 | - |
605 | - $markerArray['###VOLUME###'] = $this->cObj->stdWrap($volume, $this->conf['volume.']); |
606 | - |
607 | - } else { |
608 | - |
609 | - $markerArray['###VOLUME###'] = ''; |
610 | - |
611 | - } |
612 | - |
613 | - } |
614 | - |
615 | - if (empty ($title) && $this->piVars['debug'] == 1) { |
616 | - |
617 | - $this->warning[] = $this->pi_getLL('warning_title'); |
618 | - |
619 | - } |
620 | - |
621 | - if (!empty ($mods->name->displayForm) && strlen((string) $mods->name->displayForm) > 0) { |
622 | - |
623 | - $author = htmlspecialchars(trim((string) $mods->name->displayForm)); |
624 | - |
625 | - $markerArray['###AUTHOR###'] = $this->cObj->stdWrap($author, $this->conf['author.']); |
626 | - |
627 | - } elseif (!empty ($mods->name->namePart) && strlen((string) $mods->name->namePart) > 0) { |
628 | - |
629 | - $author = htmlspecialchars(trim((string) $mods->name->namePart)); |
630 | - |
631 | - $markerArray['###AUTHOR###'] = $this->cObj->stdWrap($author, $this->conf['author.']); |
632 | - |
633 | - } else { |
634 | - |
635 | - $markerArray['###AUTHOR###'] = ''; |
636 | - |
637 | - } |
638 | - |
639 | - if (!empty ($author)) { |
640 | - |
641 | - $mods->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
642 | - |
643 | - $_roles = $mods->xpath('./mods:name/mods:role/mods:roleTerm[@type="code"][@authority="marcrelator"]'); |
644 | - |
645 | - if ($_roles !== FALSE && !empty ($_roles)) { |
646 | - |
647 | - if ($_roles[0] != 'aut') { |
648 | - |
649 | - $markerArray['###AUTHOR###'] = ''; |
650 | - |
651 | - } |
652 | - |
653 | - } |
654 | - |
655 | - } |
656 | - |
657 | - if (empty ($author) && $this->piVars['debug'] == 1) { |
658 | - |
659 | - $this->warning[] = $this->pi_getLL('warning_author'); |
660 | - |
661 | - } |
662 | - |
663 | - if (!empty ($mods->originInfo)) { |
664 | - |
665 | - if (!empty ($mods->originInfo->place) && !empty ($mods->originInfo->place->placeTerm) && strlen((string) $mods->originInfo->place->placeTerm) > 0) { |
666 | - |
667 | - $place = htmlspecialchars(trim((string) $mods->originInfo->place->placeTerm)); |
668 | - |
669 | - $markerArray['###PLACE###'] = $this->cObj->stdWrap($place, $this->conf['place.']); |
670 | - |
671 | - } else { |
672 | - |
673 | - $markerArray['###PLACE###'] = ''; |
674 | - |
675 | - } |
676 | - |
677 | - if (!empty ($mods->originInfo->dateIssued) && strlen((string) $mods->originInfo->dateIssued) > 0) { |
678 | - |
679 | - $date = htmlspecialchars(trim((string) $mods->originInfo->dateIssued)); |
680 | - |
681 | - $markerArray['###DATE###'] = $this->cObj->stdWrap($date, $this->conf['date.']); |
682 | - |
683 | - } else { |
684 | - |
685 | - $markerArray['###DATE###'] = ''; |
686 | - |
687 | - } |
688 | - |
689 | - } else { |
690 | - |
691 | - $markerArray['###PLACE###'] = ''; |
692 | - |
693 | - $markerArray['###DATE###'] = ''; |
694 | - |
695 | - } |
696 | - |
697 | - if (empty ($place) && $this->piVars['debug'] == 1) { |
698 | - |
699 | - $this->warning[] = $this->pi_getLL('warning_place'); |
700 | - |
701 | - } |
702 | - |
703 | - if (empty ($date) && $this->piVars['debug'] == 1) { |
704 | - |
705 | - $this->warning[] = $this->pi_getLL('warning_date'); |
706 | - |
707 | - } |
708 | - |
709 | - $ids = array (); |
710 | - |
711 | - $_ids = $mets->xpath('./mets:dmdSec[@ID="'.$dmdid.'"]/mets:mdWrap[@MDTYPE="MODS"]/mets:xmlData/mods:mods/mods:identifier'); |
712 | - |
713 | - foreach ($_ids as $_id) { |
714 | - |
715 | - if (isset ($this->conf[$_id['type'].'Resolver'])) { |
716 | - |
717 | - $ids[] = $this->pi_linkToPage(htmlspecialchars($this->pi_getLL((string) $_id['type']).' '.$_id), $this->conf[$_id['type'].'Resolver'].rawurlencode((string) $_id)); |
718 | - |
719 | - } |
720 | - |
721 | - } |
722 | - |
723 | - if (!empty ($ids)) { |
724 | - |
725 | - $markerArray['###ID###'] = $this->cObj->stdWrap(implode($this->conf['idSpacer'], $ids), $this->conf['id.']); |
726 | - |
727 | - } else { |
728 | - |
729 | - $markerArray['###ID###'] = ''; |
730 | - |
731 | - } |
732 | - |
733 | - if ($this->piVars['debug'] == 1) { |
734 | - |
735 | - $this->check[] = $this->pi_getLL('check_mods'); |
736 | - |
737 | - } |
738 | - |
739 | - } elseif (count($this->error) == 0 && (count($_mods) < 1 || $_mods === FALSE)) { |
740 | - |
741 | - $this->error[] = $this->pi_getLL('error_dmdsec'); |
742 | - |
743 | - } elseif (count($this->error) == 0) { |
744 | - |
745 | - $this->error[] = $this->pi_getLL('error_dmdsecs'); |
746 | - |
747 | - } |
748 | - |
749 | - // Get administrative metadata from <amdSec>. |
750 | - |
751 | - if (count($this->error) == 0 ) { |
752 | - |
753 | - $_rights = $mets->xpath('./mets:amdSec[@ID="'.$admid.'"]/mets:rightsMD/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="DVRIGHTS"]/mets:xmlData/dv:rights'); |
754 | - |
755 | - } |
756 | - |
757 | - if (count($this->error) == 0 && count($_rights) == 1 && $_rights !== FALSE) { |
758 | - |
759 | - $rights = $_rights[0]->children('http://dfg-viewer.de/'); |
760 | - |
761 | - $owner = htmlspecialchars(trim((string) $rights->owner)); |
762 | - |
763 | - $contact = htmlspecialchars(trim((string) $rights->ownerContact)); |
764 | - |
765 | - $logo = htmlspecialchars(trim((string) $rights->ownerLogo)); |
766 | - |
767 | - $site = htmlspecialchars(trim((string) $rights->ownerSiteURL)); |
768 | - |
769 | - if (!empty ($contact)) { |
770 | - |
771 | - $markerArray['###CONTACT###'] = '<a id="con" href="'.$contact.'" title="'.$this->pi_getLL('contactLink').'">'.$this->pi_getLL('contactLink').'</a>'; |
772 | - |
773 | - } else { |
774 | - |
775 | - $markerArray['###CONTACT###'] = '<a id="con" href="'.$site.'" title="'.$this->pi_getLL('contactLink').'">'.$this->pi_getLL('contactLink').'</a>'; |
776 | - |
777 | - } |
778 | - |
779 | - $markerArray['###OWNER###'] = '<a class="owner" href="'.$site.'" title="'.$owner.'"><img src="'.$logo.'" title="'.$owner.'" alt="'.$owner.'" /></a>'; |
780 | - |
781 | - if (empty ($owner) && $this->piVars['debug'] == 1) { |
782 | - |
783 | - $this->warning[] = $this->pi_getLL('warning_owner'); |
784 | - |
785 | - } |
786 | - |
787 | - if (empty ($contact) && $this->piVars['debug'] == 1) { |
788 | - |
789 | - $this->warning[] = $this->pi_getLL('warning_contact'); |
790 | - |
791 | - } |
792 | - |
793 | - if (empty ($logo) && $this->piVars['debug'] == 1) { |
794 | - |
795 | - $this->warning[] = $this->pi_getLL('warning_logo'); |
796 | - |
797 | - } |
798 | - |
799 | - if (empty ($site) && $this->piVars['debug'] == 1) { |
800 | - |
801 | - $this->warning[] = $this->pi_getLL('warning_site'); |
802 | - |
803 | - } |
804 | - |
805 | - if ($this->piVars['debug'] == 1) { |
806 | - |
807 | - $this->check[] = $this->pi_getLL('check_dvrights'); |
808 | - |
809 | - } |
810 | - |
811 | - } elseif (count($this->error) == 0 && (count($_rights) < 1 || $_rights === FALSE)) { |
812 | - |
813 | - $this->error[] = $this->pi_getLL('error_amdsec_dvrights'); |
814 | - |
815 | - } elseif (count($this->error) == 0) { |
816 | - |
817 | - $this->error[] = $this->pi_getLL('error_amdsecs_dvrights'); |
818 | - |
819 | - } |
820 | - |
821 | - if ($this->piVars['debug'] == 1 ) { |
822 | - |
823 | - $markerArray['###OWNER###'] = '<a class="owner" href="http://dfg-viewer.de/" title="METS/MODS-Validator"><img src="'.t3lib_extMgm::siteRelPath($this->extKey).'/res/validatorlogo.jpg" title="METS/MODS-Validator" alt="METS/MODS-Validator" /></a>'; |
824 | - |
825 | - } |
826 | - |
827 | - if (count($this->error) == 0 ) { |
828 | - |
829 | - $_links = $mets->xpath('./mets:amdSec[@ID="'.$admid.'"]/mets:digiprovMD/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="DVLINKS"]/mets:xmlData/dv:links'); |
830 | - |
831 | - } |
832 | - |
833 | - if (count($this->error) == 0 && count($_links) == 1 && $_links !== FALSE) { |
834 | - |
835 | - $links = $_links[0]->children('http://dfg-viewer.de/'); |
836 | - |
837 | - $presentation = htmlspecialchars(trim((string) $links->presentation)); |
838 | - |
839 | - $markerArray['###ALTERNATIVE###'] = '<a id="loc" href="'.$presentation.'" title="'.$this->pi_getLL('alternate').'">'.$this->pi_getLL('alternate').'</a>'; |
840 | - |
841 | - $reference = htmlspecialchars(trim((string) $links->reference)); |
842 | - |
843 | - $markerArray['###CATALOG###'] = '<a class="reference" href="'.$reference.'" title="'.$this->pi_getLL('catalog').'">'.$this->pi_getLL('catalog').'</a>'; |
844 | - |
845 | - if (empty ($presentation) && $this->piVars['debug'] == 1) { |
846 | - |
847 | - $this->warning[] = $this->pi_getLL('warning_presentation'); |
848 | - |
849 | - } |
850 | - |
851 | - if (empty ($reference) && $this->piVars['debug'] == 1) { |
852 | - |
853 | - $this->warning[] = $this->pi_getLL('warning_reference'); |
854 | - |
855 | - } |
856 | - |
857 | - if ($this->piVars['debug'] == 1) { |
858 | - |
859 | - $this->check[] = $this->pi_getLL('check_dvlinks'); |
860 | - |
861 | - } |
862 | - |
863 | - } elseif (count($this->error) == 0 && (count($_links) < 1 || $_links === FALSE)) { |
864 | - |
865 | - $this->error[] = $this->pi_getLL('error_amdsec_dvlinks'); |
866 | - |
867 | - } elseif (count($this->error) == 0) { |
868 | - |
869 | - $this->error[] = $this->pi_getLL('error_amdsecs_dvlinks'); |
870 | - |
871 | - } |
872 | - |
873 | - // Get file links from <fileSec>. |
874 | - |
875 | - $markerArray['###DOUBLEIMAGE###'] = ''; |
876 | - |
877 | - if (count($this->error) == 0 && !$this->multiPart) { |
878 | - |
879 | - if ($this->piVars['debug'] == 1) { |
880 | - |
881 | - $this->check[] = $this->pi_getLL('check_files'); |
882 | - |
883 | - } |
884 | - |
885 | - $_fileIds = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]//mets:div[@ID="'.$pages[$this->piVars['image'] - 1].'"]/mets:fptr/@FILEID'); |
886 | - |
887 | - if ($this->piVars['double'] != 1) { |
888 | - |
889 | - foreach ($_fileIds as $_fileId) { |
890 | - |
891 | - $_downloadPage = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="DOWNLOAD"]/mets:file[@ID="'.(string) $_fileId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
892 | - |
893 | - if (!empty ($_downloadPage)) { |
894 | - |
895 | - $downloadPage = $_downloadPage[0]->attributes('http://www.w3.org/1999/xlink')->href; |
896 | - |
897 | - break; |
898 | - |
899 | - } |
900 | - |
901 | - } |
902 | - |
903 | - } |
904 | - |
905 | - foreach ($_fileIds as $_fileId) { |
906 | - |
907 | - $_maxPath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="MAX"]/mets:file[@ID="'.(string) $_fileId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
908 | - |
909 | - if (!empty ($_maxPath)) { |
910 | - |
911 | - if (strtolower($this->piVars['zoom']) == 'max') { |
912 | - |
913 | - $imagePath = $_maxPath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
914 | - |
915 | - } |
916 | - |
917 | - $maxZoom = TRUE; |
918 | - |
919 | - } |
920 | - |
921 | - $_minPath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="MIN"]/mets:file[@ID="'.(string) $_fileId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
922 | - |
923 | - if (!empty ($_minPath)) { |
924 | - |
925 | - if (strtolower($this->piVars['zoom']) == 'min') { |
926 | - |
927 | - $imagePath = $_minPath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
928 | - |
929 | - } |
930 | - |
931 | - $minZoom = TRUE; |
932 | - |
933 | - } |
934 | - |
935 | - $_defPath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="DEFAULT"]/mets:file[@ID="'.(string) $_fileId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
936 | - |
937 | - if (!empty ($_defPath)) { |
938 | - |
939 | - $defPath = $_defPath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
940 | - |
941 | - } |
942 | - |
943 | - } |
944 | - |
945 | - if (empty ($imagePath)) { |
946 | - |
947 | - $imagePath = $defPath; |
948 | - |
949 | - } |
950 | - |
951 | - if ($this->piVars['double'] != 1) { |
952 | - |
953 | - $markerArray['###IMAGE###'] = $this->cObj->stdWrap('<a class="imglink" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] + $factor), $this->cache)).'" title="'.$this->pi_getLL('next').'"><img src="'.htmlspecialchars($imagePath).'" alt="'.$this->pi_getLL('loading').(!empty ($contact) ? ' '.$this->pi_getLL('contact').' '.$contact : '').'" title="'.$this->pi_getLL('next').'" /></a>', $this->conf['image.']); |
954 | - |
955 | - } else { |
956 | - |
957 | - $markerArray['###IMAGE###'] = $this->cObj->stdWrap('<a class="imglink" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] - $factor), $this->cache)).'" title="'.$this->pi_getLL('previous').'"><img src="'.htmlspecialchars($imagePath).'" alt="'.$this->pi_getLL('loading').(!empty ($contact) ? ' '.$this->pi_getLL('contact').' '.$contact : '').'" title="'.$this->pi_getLL('previous').'" /></a>', $this->conf['image.']); |
958 | - |
959 | - } |
960 | - |
961 | - if ($this->piVars['double'] == 1) { |
962 | - |
963 | - $_doubleIds = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]//mets:div[@ID="'.$pages[$this->piVars['image']].'"]/mets:fptr/@FILEID'); |
964 | - |
965 | - if (!empty ($_doubleIds)) { |
966 | - |
967 | - foreach ($_doubleIds as $_doubleId) { |
968 | - |
969 | - $_maxDoublePath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="MAX"]/mets:file[@ID="'.(string) $_doubleId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
970 | - |
971 | - if (!empty ($_maxDoublePath)) { |
972 | - |
973 | - if (strtolower($this->piVars['zoom']) == 'max') { |
974 | - |
975 | - $doublePath = $_maxDoublePath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
976 | - |
977 | - } |
978 | - |
979 | - } |
980 | - |
981 | - $_minDoublePath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="MIN"]/mets:file[@ID="'.(string) $_doubleId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
982 | - |
983 | - if (!empty ($_minDoublePath)) { |
984 | - |
985 | - if (strtolower($this->piVars['zoom']) == 'min') { |
986 | - |
987 | - $doublePath = $_minDoublePath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
988 | - |
989 | - } |
990 | - |
991 | - } |
992 | - |
993 | - $_defDoublePath = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="DEFAULT"]/mets:file[@ID="'.(string) $_doubleId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
994 | - |
995 | - if (!empty ($_defDoublePath)) { |
996 | - |
997 | - $defDoublePath = $_defDoublePath[0]->attributes('http://www.w3.org/1999/xlink')->href; |
998 | - |
999 | - } |
1000 | - |
1001 | - } |
1002 | - |
1003 | - if (empty ($doublePath)) { |
1004 | - |
1005 | - $doublePath = $defDoublePath; |
1006 | - |
1007 | - } |
1008 | - |
1009 | - $markerArray['###DOUBLEIMAGE###'] = $this->cObj->stdWrap('<a class="imglink" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] + $factor), $this->cache)).'" title="'.$this->pi_getLL('next').'"><img src="'.htmlspecialchars($doublePath).'" alt="'.$this->pi_getLL('problem').(!empty ($contact) ? ' '.$this->pi_getLL('contact').' '.$contact : '').'" title="'.$this->pi_getLL('next').'" /></a>', $this->conf['double.']); |
1010 | - |
1011 | - } |
1012 | - |
1013 | - } |
1014 | - |
1015 | - } elseif (count($this->error) == 0) { |
1016 | - |
1017 | - $imagePath = str_replace('EXT:'.$this->extKey.'/', t3lib_extMgm::siteRelPath($this->extKey), trim($this->conf['multiVolumePic'])); |
1018 | - |
1019 | - $markerArray['###IMAGE###'] = '<img src="'.htmlspecialchars($imagePath) . '" alt="'.$this->pi_getLL('choose').'" />'; |
1020 | - |
1021 | - } |
1022 | - |
1023 | - $urisAll = array (); |
1024 | - |
1025 | - if (count($this->error) == 0) { |
1026 | - |
1027 | - $_urisAll = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div/@CONTENTIDS'); |
1028 | - |
1029 | - if (empty ($_urisAll)) { |
1030 | - |
1031 | - $_urisAll = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div[@TYPE="physSequence"]/@CONTENTIDS'); |
1032 | - |
1033 | - } |
1034 | - |
1035 | - if (!empty ($_urisAll)) { |
1036 | - |
1037 | - $_uris = explode(' ', (string) $_urisAll[0]); |
1038 | - |
1039 | - foreach ($_uris as $_uri) { |
1040 | - |
1041 | - if (preg_match('/^http:\/\//i', $_uri)) { |
1042 | - |
1043 | - $urisAll[] = $this->pi_linkToPage(htmlspecialchars($_uri), $_uri); |
1044 | - |
1045 | - } elseif (preg_match('/^urn:/i', $_uri)) { |
1046 | - |
1047 | - $urisAll[] = $this->pi_linkToPage(htmlspecialchars($_uri), 'http://nbn-resolving.de/'.$_uri); |
1048 | - |
1049 | - } |
1050 | - |
1051 | - } |
1052 | - |
1053 | - } |
1054 | - |
1055 | - } |
1056 | - |
1057 | - if (!empty ($urisAll)) { |
1058 | - |
1059 | - $markerArray['###PID_ALL###'] = $this->cObj->stdWrap($this->pi_getLL('pid_all').implode($this->conf['idSpacer'], $urisAll), $this->conf['pid.']); |
1060 | - |
1061 | - } else { |
1062 | - |
1063 | - $markerArray['###PID_ALL###'] = ''; |
1064 | - |
1065 | - } |
1066 | - |
1067 | - $urisPage = array (); |
1068 | - |
1069 | - if (count($this->error) == 0 && $this->piVars['double'] != 1) { |
1070 | - |
1071 | - $_urisPage = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]//mets:div[@ID="'.$pages[$this->piVars['image'] - 1].'"]/@CONTENTIDS'); |
1072 | - |
1073 | - if (!empty ($_urisPage)) { |
1074 | - |
1075 | - $_uris = explode(' ', (string) $_urisPage[0]); |
1076 | - |
1077 | - foreach ($_uris as $_uri) { |
1078 | - |
1079 | - if (preg_match('/^http:\/\//i', $_uri)) { |
1080 | - |
1081 | - $urisPage[] = $this->pi_linkToPage(htmlspecialchars($_uri), $_uri); |
1082 | - |
1083 | - } elseif (preg_match('/^urn:/i', $_uri)) { |
1084 | - |
1085 | - $urisPage[] = $this->pi_linkToPage(htmlspecialchars($_uri), 'http://nbn-resolving.de/'.$_uri); |
1086 | - |
1087 | - } |
1088 | - |
1089 | - } |
1090 | - |
1091 | - } |
1092 | - |
1093 | - } |
1094 | - |
1095 | - if (!empty ($urisPage)) { |
1096 | - |
1097 | - $markerArray['###PID_PAGE###'] = $this->cObj->stdWrap($this->pi_getLL('pid_page').implode($this->conf['idSpacer'], $urisPage), $this->conf['pid.']); |
1098 | - |
1099 | - } else { |
1100 | - |
1101 | - $markerArray['###PID_PAGE###'] = ''; |
1102 | - |
1103 | - } |
1104 | - |
1105 | - switch (strtolower($this->piVars['zoom'])) { |
1106 | - |
1107 | - case 'min': |
1108 | - |
1109 | - $markerArray['###ZOOM_IN###'] = '<a class="in" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('zoom' => 'default'), $this->cache)).'" title="'.$this->pi_getLL('zoom_in').'">'.$this->pi_getLL('zoom_in').'</a>'; |
1110 | - |
1111 | - $markerArray['###ZOOM_OUT###'] = '<span class="out" title="'.$this->pi_getLL('zoom_out').'">'.$this->pi_getLL('zoom_out').'</span>'; |
1112 | - |
1113 | - break; |
1114 | - |
1115 | - case 'max': |
1116 | - |
1117 | - $markerArray['###ZOOM_IN###'] = '<span class="in" title="'.$this->pi_getLL('zoom_in').'">'.$this->pi_getLL('zoom_in').'</span>'; |
1118 | - |
1119 | - $markerArray['###ZOOM_OUT###'] = '<a class="out" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('zoom' => 'default'), $this->cache)).'" title="'.$this->pi_getLL('zoom_out').'">'.$this->pi_getLL('zoom_out').'</a>'; |
1120 | - |
1121 | - break; |
1122 | - |
1123 | - default: |
1124 | - |
1125 | - if ($maxZoom) { |
1126 | - |
1127 | - $markerArray['###ZOOM_IN###'] = '<a class="in" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('zoom' => 'max'), $this->cache)).'" title="'.$this->pi_getLL('zoom_in').'">'.$this->pi_getLL('zoom_in').'</a>'; |
1128 | - |
1129 | - } else { |
1130 | - |
1131 | - $markerArray['###ZOOM_IN###'] = '<span class="in" title="'.$this->pi_getLL('zoom_in').'">'.$this->pi_getLL('zoom_in').'</span>'; |
1132 | - |
1133 | - } |
1134 | - |
1135 | - if ($minZoom) { |
1136 | - |
1137 | - $markerArray['###ZOOM_OUT###'] = '<a class="out" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('zoom' => 'min'), $this->cache)).'" title="'.$this->pi_getLL('zoom_out').'">'.$this->pi_getLL('zoom_out').'</a>'; |
1138 | - |
1139 | - } else { |
1140 | - |
1141 | - $markerArray['###ZOOM_OUT###'] = '<span class="out" title="'.$this->pi_getLL('zoom_out').'">'.$this->pi_getLL('zoom_out').'</span>'; |
1142 | - |
1143 | - } |
1144 | - |
1145 | - break; |
1146 | - |
1147 | - } |
1148 | - |
1149 | - if ($this->piVars['double'] != 1) { |
1150 | - |
1151 | - $markerArray['###DOUBLE###'] = '<a class="doubleon" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('double' => '1'), $this->cache)).'" title="'.$this->pi_getLL('double_on').'">'.$this->pi_getLL('double_on').'</a>'; |
1152 | - |
1153 | - $markerArray['###DOUBLE###'] .= '<span class="switch" title="'.$this->pi_getLL('switch').'">'.$this->pi_getLL('switch').'</span>'; |
1154 | - |
1155 | - } else { |
1156 | - |
1157 | - $markerArray['###DOUBLE###'] = '<a class="doubleoff" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('double' => '0'), $this->cache)).'" title="'.$this->pi_getLL('double_off').'">'.$this->pi_getLL('double_off').'</a>'; |
1158 | - |
1159 | - $markerArray['###DOUBLE###'] .= '<a class="switch" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] + 1), $this->cache)).'" title="'.$this->pi_getLL('switch').'">'.$this->pi_getLL('switch').'</a>'; |
1160 | - |
1161 | - } |
1162 | - |
1163 | - if (!empty ($downloadPage)) { |
1164 | - |
1165 | - $markerArray['###DOWNLOAD_PAGE###'] = '<a class="site" href="'.htmlspecialchars($downloadPage).'" title="'.$this->pi_getLL('download_page').'">'.$this->pi_getLL('download_page').'</a>'; |
1166 | - |
1167 | - } else { |
1168 | - |
1169 | - $markerArray['###DOWNLOAD_PAGE###'] = '<span class="site" title="'.$this->pi_getLL('download_page').'">'.$this->pi_getLL('download_page').'</span>'; |
1170 | - |
1171 | - } |
1172 | - |
1173 | - if (count($this->error) == 0 && !$this->multiPart) { |
1174 | - |
1175 | - $_fileIds = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div/mets:fptr/@FILEID'); |
1176 | - |
1177 | - if (empty ($_fileIds)) { |
1178 | - |
1179 | - $_fileIds = $mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div[@TYPE="physSequence"]/mets:fptr/@FILEID'); |
1180 | - |
1181 | - } |
1182 | - |
1183 | - } elseif (count($this->error) == 0) { |
1184 | - |
1185 | - $_fileIds = $mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div/mets:div/mets:fptr/@FILEID'); |
1186 | - |
1187 | - } |
1188 | - |
1189 | - if (!empty ($_fileIds)) { |
1190 | - |
1191 | - foreach ($_fileIds as $_fileId) { |
1192 | - |
1193 | - $_downloadAll = $mets->xpath('./mets:fileSec/mets:fileGrp[@USE="DOWNLOAD"]/mets:file[@ID="'.(string) $_fileId.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
1194 | - |
1195 | - if (!empty ($_downloadAll)) { |
1196 | - |
1197 | - $downloadAll = $_downloadAll[0]->attributes('http://www.w3.org/1999/xlink')->href; |
1198 | - |
1199 | - break; |
1200 | - |
1201 | - } |
1202 | - |
1203 | - } |
1204 | - |
1205 | - } |
1206 | - |
1207 | - if (!empty ($downloadAll)) { |
1208 | - |
1209 | - $markerArray['###DOWNLOAD_ALL###'] = '<a class="all" href="'.htmlspecialchars($downloadAll).'" title="'.$this->pi_getLL('download_all').'">'.$this->pi_getLL('download_all').'</a>'; |
1210 | - |
1211 | - } else { |
1212 | - |
1213 | - $markerArray['###DOWNLOAD_ALL###'] = '<span class="all" title="'.$this->pi_getLL('download_all').'">'.$this->pi_getLL('download_all').'</span>'; |
1214 | - |
1215 | - } |
1216 | - |
1217 | - $markerArray['###BACK_NAV###'] = ''; |
1218 | - |
1219 | - if ($this->piVars['image'] > 1) { |
1220 | - |
1221 | - $markerArray['###BACK_NAV###'] .= '<a class="first" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => 1), $this->cache)).'" title="'.$this->pi_getLL('first').'">'.$this->pi_getLL('first').'</a>'; |
1222 | - |
1223 | - } else { |
1224 | - |
1225 | - $markerArray['###BACK_NAV###'] .= '<span class="first" title="'.$this->pi_getLL('first').'">'.$this->pi_getLL('first').'</span>'; |
1226 | - |
1227 | - } |
1228 | - |
1229 | - if ($this->piVars['image'] > 5) { |
1230 | - |
1231 | - $markerArray['###BACK_NAV###'] .= '<a class="rwnd" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] - ($factor * 5)), $this->cache)).'" title="'.$this->pi_getLL('rwnd').'">'.$this->pi_getLL('rwnd').'</a>'; |
1232 | - |
1233 | - } else { |
1234 | - |
1235 | - $markerArray['###BACK_NAV###'] .= '<span class="rwnd" title="'.$this->pi_getLL('rwnd').'">'.$this->pi_getLL('rwnd').'</span>'; |
1236 | - |
1237 | - } |
1238 | - |
1239 | - if ($this->piVars['image'] > 1) { |
1240 | - |
1241 | - $markerArray['###BACK_NAV###'] .= '<a class="previous" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] - $factor), $this->cache)).'" title="'.$this->pi_getLL('previous').'" accesskey="-">'.$this->pi_getLL('previous').'</a>'; |
1242 | - |
1243 | - } else { |
1244 | - |
1245 | - $markerArray['###BACK_NAV###'] .= '<span class="previous" title="'.$this->pi_getLL('previous').'">'.$this->pi_getLL('previous').'</span>'; |
1246 | - |
1247 | - } |
1248 | - |
1249 | - $markerArray['###FWD_NAV###'] = ''; |
1250 | - |
1251 | - if ($this->piVars['image'] < $_numOfPages) { |
1252 | - |
1253 | - $markerArray['###FWD_NAV###'] .= '<a class="next" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] + $factor), $this->cache)).'" title="'.$this->pi_getLL('next').'" accesskey="+">'.$this->pi_getLL('next').'</a>'; |
1254 | - |
1255 | - } else { |
1256 | - |
1257 | - $markerArray['###FWD_NAV###'] .= '<span class="next" title="'.$this->pi_getLL('next').'">'.$this->pi_getLL('next').'</span>'; |
1258 | - |
1259 | - } |
1260 | - |
1261 | - if ($this->piVars['image'] < $_numOfPages - 4 ) { |
1262 | - |
1263 | - $markerArray['###FWD_NAV###'] .= '<a class="ffwd" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $this->piVars['image'] + ($factor * 5)), $this->cache)).'" title="'.$this->pi_getLL('ffwd').'">'.$this->pi_getLL('ffwd').'</a>'; |
1264 | - |
1265 | - } else { |
1266 | - |
1267 | - $markerArray['###FWD_NAV###'] .= '<span class="ffwd" title="'.$this->pi_getLL('ffwd').'">'.$this->pi_getLL('ffwd').'</span>'; |
1268 | - |
1269 | - } |
1270 | - |
1271 | - if ($this->piVars['image'] < $_numOfPages) { |
1272 | - |
1273 | - $markerArray['###FWD_NAV###'] .= '<a class="last" href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('image' => $_numOfPages - ($factor - 1)), $this->cache)).'" title="'.$this->pi_getLL('last').'">'.$this->pi_getLL('last').'</a>'; |
1274 | - |
1275 | - } else { |
1276 | - |
1277 | - $markerArray['###FWD_NAV###'] .= '<span class="last" title="'.$this->pi_getLL('last').'">'.$this->pi_getLL('last').'</span>'; |
1278 | - |
1279 | - } |
1280 | - |
1281 | - // Replace browser title. |
1282 | - |
1283 | - if ($this->conf['prependPageTitle'] && $GLOBALS['TSFE']->config['config']['noPageTitle'] == 2) { |
1284 | - |
1285 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_titleTag'] = ' <title>'.htmlspecialchars(trim($this->conf['prependPageTitle'])).' '.$markerArray['###TITLE###'].'</title>'; |
1286 | - |
1287 | - } |
1288 | - |
1289 | - // Load template and replace markers. |
1290 | - |
1291 | - if ($this->piVars['debug'] != 1) { |
1292 | - |
1293 | - if (count($this->error) != 0) { |
1294 | - |
1295 | - header('Location: '.$GLOBALS['TSFE']->baseUrl.$this->pi_linkTP_keepPIvars_url(array ('debug' => 1), $this->cache)); |
1296 | - |
1297 | - exit; |
1298 | - |
1299 | - } |
1300 | - |
1301 | - $this->templateCode = $this->cObj->fileResource($this->conf['templateFile']); |
1302 | - |
1303 | - } else { |
1304 | - |
1305 | - $markerArray['###SWITCHOFF###'] = '<a href="'.htmlspecialchars($this->pi_linkTP_keepPIvars_url(array ('debug' => '0'), $this->cache)).'" title="'.$this->pi_getLL('switchoff').'">'.$this->pi_getLL('switchoff').'</a>'; |
1306 | - |
1307 | - $markerArray['###MESSAGES###'] = ''; |
1308 | - |
1309 | - if (count($this->check) > 0) { |
1310 | - |
1311 | - $markerArray['###MESSAGES###'] .= '<h3>'.$this->pi_getLL('checks').'</h3><ul class="check"><li>'.implode('</li><li>', $this->check).'</li></ul>'; |
1312 | - |
1313 | - } |
1314 | - |
1315 | - if (count($this->error) > 0) { |
1316 | - |
1317 | - $markerArray['###MESSAGES###'] .= '<h3>'.$this->pi_getLL('errors').'</h3><ul class="error"><li>'.implode('</li><li>', $this->error).'</li></ul>'; |
1318 | - |
1319 | - } |
1320 | - |
1321 | - if (count($this->warning) > 0) { |
1322 | - |
1323 | - $markerArray['###MESSAGES###'] .= '<h3>'.$this->pi_getLL('warnings').'</h3><ul class="warning"><li>'.implode('</li><li>', $this->warning).'</li></ul>'; |
1324 | - |
1325 | - } |
1326 | - |
1327 | - if (count($this->hint) > 0) { |
1328 | - |
1329 | - $markerArray['###MESSAGES###'] .= '<h3>'.$this->pi_getLL('hints').'</h3><ul class="hint"><li>'.implode('</li><li>', $this->hint).'</li></ul>'; |
1330 | - |
1331 | - } |
1332 | - |
1333 | - $markerArray['###STATISTICS###'] = ''; |
1334 | - |
1335 | - $this->templateCode = $this->cObj->fileResource($this->conf['debug']); |
1336 | - |
1337 | - } |
1338 | - |
1339 | - $template['template'] = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE###'); |
1340 | - |
1341 | - $content .= $this->cObj->substituteMarkerArray($template['template'], $markerArray); |
1342 | - |
1343 | - // Save all session data. |
1344 | - |
1345 | - $GLOBALS['TSFE']->fe_user->setKey('ses', $this->extKey, $this->session); |
1346 | - |
1347 | - $GLOBALS['TSFE']->fe_user->storeSessionData(); |
1348 | - |
1349 | - // Let's rock! |
1350 | - |
1351 | - $this->prefixId = 'dfgviewer'; // Reset $prefixId to get a nice wrapping. |
1352 | - |
1353 | - return $this->pi_wrapInBaseClass($content); |
1354 | - |
1355 | - } |
1356 | - |
1357 | - /** |
1358 | - * Set stylesheet and favicon |
1359 | - * |
1360 | - * @return void |
1361 | - */ |
1362 | - function setStyle() { |
1363 | - |
1364 | - // Should we use a custom stylesheet? |
1365 | - |
1366 | - if (!empty ($this->piVars['style'])) { // Custom stylesheet provided |
1367 | - |
1368 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_style'] = ' <link rel="stylesheet" type="text/css" href="'.htmlspecialchars(trim($this->piVars['style'])).'" media="screen,projection" />'; |
1369 | - |
1370 | - } elseif (!empty ($this->conf['stylesheet'])) { // Default stylesheet |
1371 | - |
1372 | - $stylePath = str_replace('EXT:'.$this->extKey.'/', t3lib_extMgm::siteRelPath($this->extKey), trim($this->conf['stylesheet'])); |
1373 | - |
1374 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_style'] = ' <link rel="stylesheet" type="text/css" href="'.htmlspecialchars($stylePath).'" media="screen,projection" />'; |
1375 | - |
1376 | - if (!empty ($this->conf['iefix']) && !empty ($this->conf['iefix.']['condition'])) { // IEfix stylesheet |
1377 | - |
1378 | - $iefixPath = str_replace('EXT:'.$this->extKey.'/', t3lib_extMgm::siteRelPath($this->extKey), trim($this->conf['iefix'])); |
1379 | - |
1380 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_iefix'] = ' <!--[if '.trim($this->conf['iefix.']['condition']).']><link rel="stylesheet" type="text/css" href="'.htmlspecialchars($iefixPath).'" media="screen,projection" /><![endif]-->'; |
1381 | - |
1382 | - } |
1383 | - |
1384 | - if (!empty ($this->conf['print'])) { // Print stylesheet |
1385 | - |
1386 | - $printPath = str_replace('EXT:'.$this->extKey.'/', t3lib_extMgm::siteRelPath($this->extKey), trim($this->conf['print'])); |
1387 | - |
1388 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_print'] = ' <link rel="stylesheet" type="text/css" href="'.htmlspecialchars($printPath).'" media="print" />'; |
1389 | - |
1390 | - } |
1391 | - |
1392 | - if ($this->piVars['debug'] == 1) { |
1393 | - |
1394 | - $this->hint[] = $this->pi_getLL('hint_style'); |
1395 | - |
1396 | - } |
1397 | - |
1398 | - } |
1399 | - |
1400 | - if (!empty ($this->conf['favicon'])) { // Add favicon |
1401 | - |
1402 | - $faviconPath = str_replace('EXT:'.$this->extKey.'/', t3lib_extMgm::siteRelPath($this->extKey), trim($this->conf['favicon'])); |
1403 | - |
1404 | - $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_favicon'] = ' <link rel="shortcut icon" type="image/x-icon" href="'.htmlspecialchars($faviconPath).'" />'; |
1405 | - |
1406 | - } |
1407 | - |
1408 | - } |
1409 | - |
1410 | - /** |
1411 | - * Display LibXML error message |
1412 | - * |
1413 | - * @param object $error: A LibXMLError object |
1414 | - * @param array $xml: Array of XML lines |
1415 | - * @return string The rendered LibXML error message for output |
1416 | - */ |
1417 | - function libxml_show_error($error, $xml) { |
1418 | - |
1419 | - $return = ''; |
1420 | - |
1421 | - if ($xml !== FALSE) { |
1422 | - |
1423 | - $return .= trim($xml[$error->line - 1]); |
1424 | - |
1425 | - $return .= str_repeat('-', $error->column).'^'."\n\n"; |
1426 | - |
1427 | - } |
1428 | - |
1429 | - switch ($error->level) { |
1430 | - |
1431 | - case LIBXML_ERR_WARNING: |
1432 | - |
1433 | - $return .= "Warning {$error->code}: "; |
1434 | - |
1435 | - break; |
1436 | - |
1437 | - case LIBXML_ERR_ERROR: |
1438 | - |
1439 | - $return .= "Error {$error->code}: "; |
1440 | - |
1441 | - break; |
1442 | - |
1443 | - case LIBXML_ERR_FATAL: |
1444 | - |
1445 | - $return .= "Fatal Error {$error->code}: "; |
1446 | - |
1447 | - break; |
1448 | - |
1449 | - } |
1450 | - |
1451 | - $return .= trim($error->message).' in line '.$error->line.', column '.$error->column; |
1452 | - |
1453 | - return nl2br($return); |
1454 | - |
1455 | - } |
1456 | - |
1457 | - /** |
1458 | - * Validate XML against METS and MODS schema |
1459 | - * |
1460 | - * @param object $mets: A SimpleXML object |
1461 | - * @return void |
1462 | - */ |
1463 | - function validateSchema(&$mets) { |
1464 | - |
1465 | - $mets->registerXPathNamespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
1466 | - |
1467 | - $schemaLocations = $mets->xpath('//*[@xsi:schemaLocation]'); |
1468 | - |
1469 | - foreach ($schemaLocations as $schemaLocation) { |
1470 | - |
1471 | - $_schemas = explode (' ', (string) $schemaLocation->attributes('http://www.w3.org/2001/XMLSchema-instance')->schemaLocation); |
1472 | - |
1473 | - for ($i = 0; $i < count ($_schemas); $i++) { |
1474 | - |
1475 | - if ($_schemas[$i] == 'http://www.loc.gov/METS/') { |
1476 | - |
1477 | - $schemas['mets'] = $_schemas[$i + 1]; |
1478 | - |
1479 | - } elseif ($_schemas[$i] == 'http://www.loc.gov/mods/v3') { |
1480 | - |
1481 | - $schemas['mods'] = $_schemas[$i + 1]; |
1482 | - |
1483 | - } |
1484 | - |
1485 | - } |
1486 | - |
1487 | - } |
1488 | - |
1489 | - $mets->registerXPathNamespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
1490 | - |
1491 | - $schemaLocations = $mets->xpath('//@xsi:schemaLocation'); |
1492 | - |
1493 | - $dom = new DOMDocument('1.0', 'UTF-8'); |
1494 | - |
1495 | - $_node = $dom->appendChild($dom->importNode(dom_import_simplexml($mets), TRUE)); |
1496 | - |
1497 | - $dom->schemaValidate($schemas['mets']); |
1498 | - |
1499 | - if ($_error = libxml_get_last_error()) { |
1500 | - |
1501 | - $this->error[] = $this->pi_getLL('error_metsschema').htmlspecialchars($_error->message); |
1502 | - |
1503 | - libxml_clear_errors(); |
1504 | - |
1505 | - } else { |
1506 | - |
1507 | - $this->check[] = $this->pi_getLL('check_metsschema'); |
1508 | - |
1509 | - } |
1510 | - |
1511 | - $_mods = $mets->xpath('.//mods:mods'); |
1512 | - |
1513 | - $i = 1; |
1514 | - |
1515 | - foreach ($_mods as $mods) { |
1516 | - |
1517 | - if (count($this->error) == 0) { |
1518 | - |
1519 | - $dom = new DOMDocument('1.0', 'UTF-8'); |
1520 | - |
1521 | - $_node = $dom->appendChild($dom->importNode(dom_import_simplexml($mods), TRUE)); |
1522 | - |
1523 | - $dom->schemaValidate($schemas['mods']); |
1524 | - |
1525 | - if ($_error = libxml_get_last_error()) { |
1526 | - |
1527 | - $this->error[] = $this->pi_getLL('error_modsschema1').$i.$this->pi_getLL('error_modsschema2').htmlspecialchars($_error->message); |
1528 | - |
1529 | - libxml_clear_errors(); |
1530 | - |
1531 | - } else { |
1532 | - |
1533 | - $this->check[] = $this->pi_getLL('check_modsschema1').$i.$this->pi_getLL('check_modsschema2'); |
1534 | - |
1535 | - } |
1536 | - |
1537 | - $i++; |
1538 | - |
1539 | - } |
1540 | - |
1541 | - } |
1542 | - |
1543 | - $this->hint[] = $this->pi_getLL('hint_minver'); |
1544 | - |
1545 | - } |
1546 | - |
1547 | - /** |
1548 | - * Generate navigation from logical structMap |
1549 | - * |
1550 | - * @param object $div: A SimpleXML object |
1551 | - * @param object $mets: A SimpleXML object |
1552 | - * @param array $pages: Array of page ids |
1553 | - * @return string The rendered navigation tree for output |
1554 | - */ |
1555 | - function generateNavigation($div, &$mets, &$pages) { |
1556 | - |
1557 | - $navigation = ''; |
1558 | - |
1559 | - $div->registerXPathNamespace('mets', 'http://www.loc.gov/METS/'); |
1560 | - |
1561 | - $_pages = array (); |
1562 | - |
1563 | - if (count($_mptr = $div->xpath('./mets:mptr[@LOCTYPE="URL"]'))) { |
1564 | - |
1565 | - $link = (string) $_mptr[0]->attributes('http://www.w3.org/1999/xlink')->href; |
1566 | - |
1567 | - } elseif (!$this->multiPart) { |
1568 | - |
1569 | - $_physIds = $mets->xpath('./mets:structLink/mets:smLink[@xlink:from="'.(string) $div['ID'].'"]'); |
1570 | - |
1571 | - foreach ($_physIds as $_physId) { |
1572 | - |
1573 | - $_pages[] = array_search($_physId->attributes('http://www.w3.org/1999/xlink')->to, $pages); |
1574 | - |
1575 | - } |
1576 | - |
1577 | - if (count($_pages) > 0) { |
1578 | - |
1579 | - $link = min($_pages) + 1; |
1580 | - |
1581 | - } else { |
1582 | - |
1583 | - $link = FALSE; |
1584 | - |
1585 | - } |
1586 | - |
1587 | - } else { |
1588 | - |
1589 | - $link = 1; |
1590 | - |
1591 | - } |
1592 | - |
1593 | - if (!empty ($div['LABEL'])) { |
1594 | - |
1595 | - $title = htmlspecialchars((string) $div['LABEL']); |
1596 | - |
1597 | - } else { |
1598 | - |
1599 | - $title = $this->pi_getLL((string) $div['TYPE'], (string) $div['TYPE'], TRUE); |
1600 | - |
1601 | - } |
1602 | - |
1603 | - if (is_int($link)) { |
1604 | - |
1605 | - $aTag = $this->pi_linkTP_keepPIvars($title, array ('image' => $link), $this->cache); |
1606 | - |
1607 | - } elseif (is_string($link)) { |
1608 | - |
1609 | - $aTag = $this->pi_linkTP_keepPIvars($title, array ('mets' => $link, 'image' => 1), $this->cache); |
1610 | - |
1611 | - } else { |
1612 | - |
1613 | - $aTag = ''; |
1614 | - |
1615 | - } |
1616 | - |
1617 | - $navigation .= $aTag; |
1618 | - |
1619 | - $_divs = $div->xpath('./mets:div'); |
1620 | - |
1621 | - if (count($_divs)) { |
1622 | - |
1623 | - $_navigation = ''; |
1624 | - |
1625 | - while (list (, $_div) = each($_divs)) { |
1626 | - |
1627 | - $_navigation .= $this->generateNavigation($_div, $mets, $pages); |
1628 | - |
1629 | - } |
1630 | - |
1631 | - if ($_navigation != '') { |
1632 | - |
1633 | - $navigation .= '<ul>'.$_navigation.'</ul>'; |
1634 | - |
1635 | - } |
1636 | - |
1637 | - } |
1638 | - |
1639 | - if ($navigation != '') { |
1640 | - |
1641 | - return '<li'.(in_array($this->piVars['image'] - 1, $_pages) ? ' class="current"' : '').'>'.$navigation.'</li>'; |
1642 | - |
1643 | - } else { |
1644 | - |
1645 | - return FALSE; |
1646 | - |
1647 | - } |
1648 | - |
1649 | - } |
1650 | - |
1651 | -} |
1652 | - |
1653 | -if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php']) { |
1654 | - include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php']); |
1655 | -} |
1656 | -?> |
1657 | \ No newline at end of file |
1658 | |
1659 | === renamed file 'slub_dfgviewer/pi2/class.tx_slubdfgviewer_pi2.php' => 'slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php' |
1660 | --- slub_dfgviewer/pi2/class.tx_slubdfgviewer_pi2.php 2011-03-07 15:24:39 +0000 |
1661 | +++ slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php 2012-06-15 13:45:23 +0000 |
1662 | @@ -2,7 +2,7 @@ |
1663 | /*************************************************************** |
1664 | * Copyright notice |
1665 | * |
1666 | -* (c) 2009 Sebastian Meyer <sebastian.meyer@slub-dresden.de> |
1667 | +* (c) 2012 Sebastian Meyer <sebastian.meyer@slub-dresden.de> |
1668 | * All rights reserved |
1669 | * |
1670 | * This script is part of the TYPO3 project. The TYPO3 project is |
1671 | @@ -28,16 +28,15 @@ |
1672 | * Plugin 'DFG-Viewer' for the 'slub_dfgviewer' extension. |
1673 | * |
1674 | * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de> |
1675 | - * @copyright Copyright (c) 2010 Sebastian Meyer, SLUB Dresden |
1676 | - * @version $Id: class.tx_slubdfgviewer_pi2.php 35 2010-12-20 16:47:50Z smeyer $ |
1677 | + * @copyright Copyright (c) 2012 Sebastian Meyer, SLUB Dresden |
1678 | * @package TYPO3 |
1679 | * @subpackage tx_slubdfgviewer |
1680 | */ |
1681 | -class tx_slubdfgviewer_pi2 extends tslib_pibase { |
1682 | +class tx_slubdfgviewer_pi1 extends tslib_pibase { |
1683 | |
1684 | var $prefixId = 'set'; // $prefixId should be the class name but this is more practicable. |
1685 | |
1686 | - var $scriptRelPath = 'pi2/class.tx_slubdfgviewer_pi2.php'; |
1687 | + var $scriptRelPath = 'pi1/class.tx_slubdfgviewer_pi1.php'; |
1688 | |
1689 | var $extKey = 'slub_dfgviewer'; |
1690 | |
1691 | @@ -502,7 +501,7 @@ |
1692 | |
1693 | $mods = $_mods[0]->children('http://www.loc.gov/mods/v3'); |
1694 | |
1695 | - if (!empty ($mods->titleInfo) && strlen((string) $mods->titleInfo->title) > 0) { |
1696 | + if (!empty ($mods->titleInfo) && empty ($mods->titleInfo['type']) && strlen((string) $mods->titleInfo->title) > 0) { |
1697 | |
1698 | $title = htmlspecialchars(trim((string) $mods->titleInfo->title)); |
1699 | |
1700 | @@ -1680,7 +1679,7 @@ |
1701 | |
1702 | } |
1703 | |
1704 | -if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi2/class.tx_slubdfgviewer_pi2.php']) { |
1705 | - include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi2/class.tx_slubdfgviewer_pi2.php']); |
1706 | +if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php']) { |
1707 | + include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/slub_dfgviewer/pi1/class.tx_slubdfgviewer_pi1.php']); |
1708 | } |
1709 | ?> |
1710 | \ No newline at end of file |
1711 | |
1712 | === removed file 'slub_dfgviewer/pi1/locallang.xml' |
1713 | --- slub_dfgviewer/pi1/locallang.xml 2011-03-07 15:24:39 +0000 |
1714 | +++ slub_dfgviewer/pi1/locallang.xml 1970-01-01 00:00:00 +0000 |
1715 | @@ -1,275 +0,0 @@ |
1716 | -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
1717 | -<T3locallang> |
1718 | - <meta type="array"> |
1719 | - <description>Language labels for plugin of extension slub_dfgviewer</description> |
1720 | - <type></type> |
1721 | - </meta> |
1722 | - <data type="array"> |
1723 | - <languageKey index="default" type="array"> |
1724 | - <!-- structural data set (see http://dfg-viewer.de/en/structural-data-set/) --> |
1725 | - <label index="section">Section</label> |
1726 | - <label index="annotation">Annotation</label> |
1727 | - <label index="address">Address</label> |
1728 | - <label index="additional">Additional</label> |
1729 | - <label index="provenance">Provenance</label> |
1730 | - <label index="collation">Collation</label> |
1731 | - <label index="ornament">Ornament</label> |
1732 | - <label index="cover">Cover</label> |
1733 | - <label index="cover_front">Front Cover</label> |
1734 | - <label index="cover_back">Back Cover</label> |
1735 | - <label index="printers_mark">Printers Mark</label> |
1736 | - <label index="binding">Binding</label> |
1737 | - <label index="entry">Entry</label> |
1738 | - <label index="corrigenda">Corrigenda</label> |
1739 | - <label index="bookplate">Bookplate</label> |
1740 | - <label index="illustration">Illustration</label> |
1741 | - <label index="imprint">Imprint</label> |
1742 | - <label index="contents">Table of Contents</label> |
1743 | - <label index="chapter">Chapter</label> |
1744 | - <label index="map">Map</label> |
1745 | - <label index="colophon">Colophon</label> |
1746 | - <label index="engraved_titlepage">Engraved Titlepage</label> |
1747 | - <label index="musical_notation">Musical Notation</label> |
1748 | - <label index="privileges">Privileges</label> |
1749 | - <label index="index">Index</label> |
1750 | - <label index="paste_down">Paste Down</label> |
1751 | - <label index="stamp">Stamp</label> |
1752 | - <label index="table">Table</label> |
1753 | - <label index="title_page">Title Page</label> |
1754 | - <label index="verse">Verse</label> |
1755 | - <label index="endsheet">Endsheet</label> |
1756 | - <label index="preface">Preface</label> |
1757 | - <label index="dedication">Dedication</label> |
1758 | - <label index="monograph">Monograph</label> |
1759 | - <label index="multivolume_work">Multivolume Work</label> |
1760 | - <label index="volume">Volume</label> |
1761 | - <label index="periodical">Periodical</label> |
1762 | - <label index="issue">Issue</label> |
1763 | - <label index="article">Article</label> |
1764 | - <label index="contained_work">Contained Work</label> |
1765 | - <label index="manuscript">Manuscript</label> |
1766 | - <label index="fragment">Fragment</label> |
1767 | - <label index="edge">Edge</label> |
1768 | - <label index="spine">Spine</label> |
1769 | - <label index="fascicle">Fascicle</label> |
1770 | - <label index="text">Text</label> |
1771 | - <label index="initial_decoration">Initial Decoration</label> |
1772 | - <label index="scheme">Scheme</label> |
1773 | - <!-- /structural data set --> |
1774 | - <label index="volume">Volume</label> |
1775 | - <label index="pageSelect">select page:</label> |
1776 | - <label index="alternate">Local Viewer</label> |
1777 | - <label index="catalog">Online Public Access Catalog</label> |
1778 | - <label index="download_page">download this page</label> |
1779 | - <label index="download_all">download this book</label> |
1780 | - <label index="zoom_in">zoom in</label> |
1781 | - <label index="zoom_out">zoom out</label> |
1782 | - <label index="first">first page</label> |
1783 | - <label index="rwnd">5 pages back</label> |
1784 | - <label index="previous">previous page</label> |
1785 | - <label index="next">next page</label> |
1786 | - <label index="ffwd">5 pages forward</label> |
1787 | - <label index="last">last page</label> |
1788 | - <label index="choose">Please make a choice.</label> |
1789 | - <label index="loading">Loading image...</label> |
1790 | - <label index="contact">If this fails, please contact:</label> |
1791 | - <label index="vd16">VD16</label> |
1792 | - <label index="vd17">VD17</label> |
1793 | - <label index="vd18">VD18</label> |
1794 | - <label index="pid_all">Persistent Identifier (work): </label> |
1795 | - <label index="pid_page">Persistent Identifier (page): </label> |
1796 | - <label index="double_on">switch to double-side mode</label> |
1797 | - <label index="double_off">switch to single-side mode</label> |
1798 | - <label index="switch">adjust left &lt;-&gt; right</label> |
1799 | - <label index="switchoff">close debugger</label> |
1800 | - <label index="contactLink">Get in contact with us!</label> |
1801 | - <label index="checks">Passed Tests</label> |
1802 | - <label index="errors">Fatal Errors</label> |
1803 | - <label index="warnings">Non-critical Warnings</label> |
1804 | - <label index="hints">Useful Hints</label> |
1805 | - <label index="check_load">Loading XML document.</label> |
1806 | - <label index="check_mets">Parsing XML document as METS.</label> |
1807 | - <label index="check_metsschema">Validating METS node against the METS schema.</label> |
1808 | - <label index="check_modsschema1">Validating the </label> |
1809 | - <label index="check_modsschema2">. MODS node against the MODS schema.</label> |
1810 | - <label index="check_logical">Searching for logical &lt;structMap&gt; node.</label> |
1811 | - <label index="check_physical_filesec">Searching for physical &lt;structMap&gt; and &lt;fileSec&gt; nodes.</label> |
1812 | - <label index="check_multipart">There is no physical &lt;structMap&gt; node, thus it is a multi-part document.</label> |
1813 | - <label index="check_admid">Getting ADMID from logical &lt;structMap&gt; node.</label> |
1814 | - <label index="check_dmdid">Getting DMDID from logical &lt;structMap&gt; node.</label> |
1815 | - <label index="check_pages">Building array of pages from physical &lt;structMap&gt; node.</label> |
1816 | - <label index="check_navigation">Building navigation tree from logical &lt;structMap&gt; node.</label> |
1817 | - <label index="check_mods">Getting descriptive metadata from &lt;dmdSec&gt; node.</label> |
1818 | - <label index="check_dvrights">Getting administrative metadata from &lt;amdSec&gt; node's DVRIGHTS section.</label> |
1819 | - <label index="check_dvlinks">Getting administrative metadata from &lt;amdSec&gt; node's DVLINKS section.</label> |
1820 | - <label index="check_files">Getting image derivates from &lt;fileSec&gt; node.</label> |
1821 | - <label index="error_oai">Could not fetch the resource. The OAI2 interface returned this error: </label> |
1822 | - <label index="error_file">Could not fetch the resource. File not found: </label> |
1823 | - <label index="error_xml">Could not fetch the resource. It is not a well-formed XML document (or just unreachable).</label> |
1824 | - <label index="error_mets">There is no &lt;mets&gt; element in the namespace &quot;http://www.loc.gov/METS/&quot;.</label> |
1825 | - <label index="error_ns">There is no namespace declaration for &quot;http://www.loc.gov/METS/&quot;.</label> |
1826 | - <label index="error_metsschema">The METS node does not validate against the METS schema. The validator returned this error: </label> |
1827 | - <label index="error_modsschema1">The </label> |
1828 | - <label index="error_modsschema2">. MODS node does not validate against the MODS schema. The validator returned this error: </label> |
1829 | - <label index="error_logical">There is more than one logical &lt;structMap&gt; node. (This is valid, but not yet supported by the viewer.)</label> |
1830 | - <label index="error_filesec">There is no &lt;fileSec&gt; node.</label> |
1831 | - <label index="error_structmap">There is no &lt;structMap&gt; node.</label> |
1832 | - <label index="error_physical">There is more than one physical &lt;structMap&gt; node.</label> |
1833 | - <label index="error_admid">Could not find ADMID in &lt;structMap&gt; node.</label> |
1834 | - <label index="error_amdsec_dvrights">Could not find a DVRIGHTS section within the &lt;amdSec&gt; node with the referenced ADMID.</label> |
1835 | - <label index="error_amdsecs_dvrights">There is more than one &lt;amdSec&gt; node with the referenced ADMID or more than one DVRIGHTS section within it.</label> |
1836 | - <label index="error_amdsec_dvlinks">Could not find a DVLINKS section within the &lt;amdSec&gt; node with the referenced ADMID.</label> |
1837 | - <label index="error_amdsecs_dvlinks">There is more than one &lt;amdSec&gt; node with the referenced ADMID or more than one DVLINKS section within it.</label> |
1838 | - <label index="error_dmdid">Could not find DMDID in &lt;structMap&gt; node.</label> |
1839 | - <label index="error_dmdsec">Could not find a &lt;dmdSec&gt; node with the referenced DMDID.</label> |
1840 | - <label index="error_dmdsecs">There is more than one &lt;dmdSec&gt; node with the referenced DMDID.</label> |
1841 | - <label index="warning_logical">There is no logical &lt;structMap&gt; node.</label> |
1842 | - <label index="warning_pages">Could not find any pages in physical $lt;structMap&gt; node.</label> |
1843 | - <label index="warning_title">Could not get title from &lt;dmdSec&> node.</label> |
1844 | - <label index="warning_author">Could not get author from &lt;dmdSec&gt; node.</label> |
1845 | - <label index="warning_place">Could not get place of publication from &lt;dmdSec&gt; node.</label> |
1846 | - <label index="warning_date">Could not get date of publication from &lt;dmdSec&gt; node.</label> |
1847 | - <label index="warning_owner">Could not get owner from &lt;amdSec&gt; node.</label> |
1848 | - <label index="warning_contact">Could not get contact from &lt;amdSec&gt; node.</label> |
1849 | - <label index="warning_logo">Could not get logo from &lt;amdSec&gt; node.</label> |
1850 | - <label index="warning_site">Could not get site URL from &lt;amdSec&gt; node.</label> |
1851 | - <label index="warning_presentation">Could not get link to local presentation from &lt;amdSec&gt; node.</label> |
1852 | - <label index="warning_reference">Could not get opac reference from &lt;amdSec&gt; node.</label> |
1853 | - <label index="hint_style">You can use your own stylesheet by adding the parameter &quot;set[style]=http://link.to/your/stylesheet&quot; to the URL.</label> |
1854 | - <label index="hint_minver">At least METS version 1.6 and MODS version 3.3 are required, if you want to follow the guidelines of the German Research Foundation.</label> |
1855 | - </languageKey> |
1856 | - <languageKey index="de" type="array"> |
1857 | - <!-- Strukturdatenset (vgl. http://dfg-viewer.de/strukturdatenset/) --> |
1858 | - <label index="section">Abschnitt</label> |
1859 | - <label index="annotation">Annotation</label> |
1860 | - <label index="address">Anrede</label> |
1861 | - <label index="additional">Beilage</label> |
1862 | - <label index="provenance">Besitznachweis</label> |
1863 | - <label index="collation">Bogensignatur</label> |
1864 | - <label index="ornament">Buchschmuck</label> |
1865 | - <label index="cover">Deckel</label> |
1866 | - <label index="cover_front">Vorderdeckel</label> |
1867 | - <label index="cover_back">Rückdeckel</label> |
1868 | - <label index="printers_mark">Druckermarke</label> |
1869 | - <label index="binding">Einband</label> |
1870 | - <label index="entry">Eintrag</label> |
1871 | - <label index="corrigenda">Errata</label> |
1872 | - <label index="bookplate">Exlibris</label> |
1873 | - <label index="illustration">Illustration</label> |
1874 | - <label index="imprint">Impressum</label> |
1875 | - <label index="contents">Inhaltsverzeichnis</label> |
1876 | - <label index="chapter">Kapitel</label> |
1877 | - <label index="map">Karte</label> |
1878 | - <label index="colophon">Kolophon</label> |
1879 | - <label index="engraved_titlepage">Kupfertitel</label> |
1880 | - <label index="musical_notation">Musiknotation</label> |
1881 | - <label index="privileges">Privilegien</label> |
1882 | - <label index="index">Register</label> |
1883 | - <label index="paste_down">Spiegel</label> |
1884 | - <label index="stamp">Stempel</label> |
1885 | - <label index="table">Tabelle</label> |
1886 | - <label index="title_page">Titelblatt</label> |
1887 | - <label index="verse">Verse</label> |
1888 | - <label index="endsheet">Vorsatz</label> |
1889 | - <label index="preface">Vorwort</label> |
1890 | - <label index="dedication">Widmung</label> |
1891 | - <label index="monograph">Monographie</label> |
1892 | - <label index="multivolume_work">Mehrbändiges Werk</label> |
1893 | - <label index="volume">Band</label> |
1894 | - <label index="periodical">Periodica</label> |
1895 | - <label index="issue">Heft</label> |
1896 | - <label index="article">Artikel</label> |
1897 | - <label index="contained_work">Enthaltenes/Beigefügtes Werk</label> |
1898 | - <label index="manuscript">Handschrift</label> |
1899 | - <label index="fragment">Fragment</label> |
1900 | - <label index="edge">Schnitt</label> |
1901 | - <label index="spine">Rücken</label> |
1902 | - <label index="fascicle">Faszikel</label> |
1903 | - <label index="text">Text</label> |
1904 | - <label index="initial_decoration">Initialschmuck</label> |
1905 | - <label index="scheme">Schema</label> |
1906 | - <!-- /Strukturdatenset --> |
1907 | - <label index="volume">Band</label> |
1908 | - <label index="pageSelect">aktuelle Seite:</label> |
1909 | - <label index="alternate">lokale Präsentation</label> |
1910 | - <label index="catalog">Katalog-Nachweis</label> |
1911 | - <label index="download_page">diese Seite herunterladen</label> |
1912 | - <label index="download_all">ganzes Werk herunterladen</label> |
1913 | - <label index="zoom_in">Ansicht vergrößern</label> |
1914 | - <label index="zoom_out">Ansicht verkleinern</label> |
1915 | - <label index="first">erste Seite</label> |
1916 | - <label index="rwnd">5 Seiten zurück</label> |
1917 | - <label index="previous">vorherige Seite</label> |
1918 | - <label index="next">nächste Seite</label> |
1919 | - <label index="ffwd">5 Seiten weiter</label> |
1920 | - <label index="last">letzte Seite</label> |
1921 | - <label index="choose">Bitte wählen Sie einen Teil des Werks aus.</label> |
1922 | - <label index="loading">Lade Bild...</label> |
1923 | - <label index="contact">Sollte hier kein Bild erscheinen, wenden Sie sich bitte an:</label> |
1924 | - <label index="vd16">VD16</label> |
1925 | - <label index="vd17">VD17</label> |
1926 | - <label index="vd18">VD18</label> |
1927 | - <label index="pid_all">Persistente Identifier (Werk): </label> |
1928 | - <label index="pid_page">Persistente Identifier (Seite): </label> |
1929 | - <label index="double_on">Doppelseiten-Ansicht aktivieren</label> |
1930 | - <label index="double_off">Doppelseiten-Ansicht deaktivieren</label> |
1931 | - <label index="switch">links &lt;-&gt; rechts korrigieren</label> |
1932 | - <label index="switchoff">Debug-Modus beenden</label> |
1933 | - <label index="contactLink">Fragen zum digitalisierten Werk</label> |
1934 | - <label index="checks">Erfolgreiche Tests</label> |
1935 | - <label index="errors">Kritische Fehler</label> |
1936 | - <label index="warnings">Unkritische Warnungen</label> |
1937 | - <label index="hints">Hilfreiche Tipps</label> |
1938 | - <label index="check_load">XML-Dokument laden.</label> |
1939 | - <label index="check_mets">XML-Dokument als METS einlesen.</label> |
1940 | - <label index="check_metsschema">METS-Knoten gegen das METS-Schema validieren.</label> |
1941 | - <label index="check_modsschema1"></label> |
1942 | - <label index="check_modsschema2">. MODS-Knoten gegen das MODS-Schema validieren.</label> |
1943 | - <label index="check_logical">Logischen &lt;structMap&gt;-Knoten ermitteln.</label> |
1944 | - <label index="check_physical_filesec">Physischen &lt;structMap&gt;- und &lt;fileSec&gt;-Knoten ermitteln.</label> |
1945 | - <label index="check_multipart">Es handelt sich um ein mehrteiliges Werk ohne eigenen physischen &lt;structMap&gt;-Knoten.</label> |
1946 | - <label index="check_admid">ADMID aus dem logischen &lt;structMap&gt;-Knoten ermitteln.</label> |
1947 | - <label index="check_dmdid">DMDID aus dem logischen &lt;structMap&gt;-Knoten ermitteln.</label> |
1948 | - <label index="check_pages">Verzeichnis der Einzelseiten aus dem physischen &lt;structMap&gt;-Knoten erstellen.</label> |
1949 | - <label index="check_navigation">Strukturnavigation aus dem logischen &lt;structMap&gt;-Knoten erstellen.</label> |
1950 | - <label index="check_mods">Deskriptive Metadaten aus dem &lt;dmdSec&gt;-Knoten ermitteln.</label> |
1951 | - <label index="check_dvrights">Administrative Metadaten aus der DVRIGHTS-Sektion des &lt;amdSec&gt;-Knotens ermitteln.</label> |
1952 | - <label index="check_dvlinks">Administrative Metadaten aus der DVLINKS-Sektion des &lt;amdSec&gt;-Knotens ermitteln.</label> |
1953 | - <label index="check_files">Image-Varianten aus dem &lt;fileSec&gt;-Knoten ermitteln.</label> |
1954 | - <label index="error_oai">Kann die Ressource nicht laden. Die OAI2-Schnittstelle gibt diese Fehlermeldung aus: </label> |
1955 | - <label index="error_file">Kann die Ressource nicht laden. Die Datei wurde nicht gefunden: </label> |
1956 | - <label index="error_xml">Kann die Ressource nicht laden. Das XML-Dokument ist nicht wohlgeformt (oder nicht erreichbar).</label> |
1957 | - <label index="error_mets">Im Namensraum &quot;http://www.loc.gov/METS/&quot; existiert kein &lt;mets&gt;-Element.</label> |
1958 | - <label index="error_ns">Es existiert keine Namensraum-Deklaration für &quot;http://www.loc.gov/METS/&quot;.</label> |
1959 | - <label index="error_metsschema">Der METS-Knoten des XML-Dokuments validiert nicht gegen das METS-Schema. Der Validator gibt diese Fehlermeldung aus: </label> |
1960 | - <label index="error_modsschema1">Der </label> |
1961 | - <label index="error_modsschema2">. MODS-Knoten des XML-Dokuments validiert nicht gegen das MODS-Schema. Der Validator gibt diese Fehlermeldung aus: </label> |
1962 | - <label index="error_logical">Das XML-Dokument enthält mehr als einen logischen &lt;structMap&gt;-Knoten. (Das ist valide, wird vom Viewer aber noch nicht unterstützt.)</label> |
1963 | - <label index="error_filesec">Das XML-Dokument enthält keinen &lt;fileSec&gt;-Knoten.</label> |
1964 | - <label index="error_structmap">Das XML-Dokument enthält keinen &lt;structMap&gt;-Knoten.</label> |
1965 | - <label index="error_physical">Das XML-Dokument enthält mehr als einen physischen &lt;structMap&gt;-Knoten.</label> |
1966 | - <label index="error_admid">In den &lt;structMap&gt;-Knoten konnte keine ADMID gefunden werden.</label> |
1967 | - <label index="error_amdsec_dvrights">Im &lt;amdSec&gt;-Knoten mit der ermittelten ADMID konnte keine DVRIGHTS-Sektion gefunden werden.</label> |
1968 | - <label index="error_amdsecs_dvrights">Es wurde mehr als ein &lt;amdSec&gt;-Knoten mit der ermittelten ADMID oder mehr als eine DVRIGHTS-Sektion gefunden.</label> |
1969 | - <label index="error_amdsec_dvlinks">Im &lt;amdSec&gt;-Knoten mit der ermittelten ADMID konnte keine DVLINKS-Sektion gefunden werden.</label> |
1970 | - <label index="error_amdsecs_dvlinks">Es wurde mehr als ein &lt;amdSec&gt;-Knoten mit der ermittelten ADMID oder mehr als eine DVLINKS-Sektion gefunden.</label> |
1971 | - <label index="error_dmdid">In den &lt;structMap&gt;-Knoten konnte keine DMDID gefunden werden.</label> |
1972 | - <label index="error_dmdsec">Zu der ermittelten DMDID konnte kein &lt;dmdSec&gt;-Knoten gefunden werden.</label> |
1973 | - <label index="error_dmdsecs">Es wurde mehr als ein &lt;dmdSec&gt;-Knoten mit der ermittelten DMDID gefunden.</label> |
1974 | - <label index="warning_logical">Das XML-Dokument enthält keinen logischen &lt;structMap&gt;-Knoten.</label> |
1975 | - <label index="warning_pages">Im physischen $lt;structMap&gt;-Knoten konnten keine Seiten gefunden werden.</label> |
1976 | - <label index="warning_title">Im &lt;dmdSec&gt;-Knoten konnte kein Titel gefunden werden.</label> |
1977 | - <label index="warning_author">Im &lt;dmdSec&gt;-Knoten konnte kein Autor gefunden werden.</label> |
1978 | - <label index="warning_place">Im &lt;dmdSec&gt;-Knoten konnte kein Erscheinungsort gefunden werden.</label> |
1979 | - <label index="warning_date">Im &lt;dmdSec&gt;-Knoten konnte kein Erscheinungsjahr gefunden werden.</label> |
1980 | - <label index="warning_owner">Im &lt;amdSec&gt;-Knoten konnte kein Besitzer gefunden werden.</label> |
1981 | - <label index="warning_contact">Im &lt;amdSec&gt;-Knoten konnte kein Kontakt gefunden werden.</label> |
1982 | - <label index="warning_logo">Im &lt;amdSec&gt;-Knoten konnte kein Logo gefunden werden.</label> |
1983 | - <label index="warning_site">Im &lt;amdSec&gt;-Knoten konnte keine URL zur Webseite gefunden werden.</label> |
1984 | - <label index="warning_presentation">Im &lt;amdSec&gt;-Knoten konnte keine URL zur lokalen Präsentation gefunden werden.</label> |
1985 | - <label index="warning_reference">Im &lt;amdSec&gt;-Knoten konnte keine URL zum OPAC gefunden werden.</label> |
1986 | - <label index="hint_style">Sie können das Aussehen des DFG-Viewers beeinflussen, in dem Sie den Parameter &quot;set[style]=http://link.zu/ihrem/stylesheet&quot; zur URL hinzufügen.</label> |
1987 | - <label index="hint_minver">Sie müssen mindestens METS Version 1.6 und MODS Version 3.3 verwenden, wenn Sie alle Praxisregeln der Deutschen Forschungsgemeinschaft umsetzen möchten.</label> |
1988 | - </languageKey> |
1989 | - </data> |
1990 | -</T3locallang> |
1991 | \ No newline at end of file |
1992 | |
1993 | === renamed file 'slub_dfgviewer/pi2/locallang.xml' => 'slub_dfgviewer/pi1/locallang.xml' |
1994 | === removed directory 'slub_dfgviewer/pi1/static' |
1995 | === renamed directory 'slub_dfgviewer/pi2/static' => 'slub_dfgviewer/pi1/static' |
1996 | === removed file 'slub_dfgviewer/pi1/static/constants.txt' |
1997 | --- slub_dfgviewer/pi1/static/constants.txt 2011-03-07 15:24:39 +0000 |
1998 | +++ slub_dfgviewer/pi1/static/constants.txt 1970-01-01 00:00:00 +0000 |
1999 | @@ -1,17 +0,0 @@ |
2000 | -plugin.tx_slubdfgviewer_pi1 { |
2001 | - |
2002 | - templateFile = EXT:slub_dfgviewer/res/template.tmpl |
2003 | - |
2004 | - debug = EXT:slub_dfgviewer/res/debug.tmpl |
2005 | - |
2006 | - favicon = EXT:slub_dfgviewer/res/favicon.ico |
2007 | - |
2008 | - multiVolumePic = EXT:slub_dfgviewer/res/navigate.gif |
2009 | - |
2010 | - stylesheet = EXT:slub_dfgviewer/res/styles.css |
2011 | - |
2012 | - print = EXT:slub_dfgviewer/res/print.css |
2013 | - |
2014 | - iefix = EXT:slub_dfgviewer/res/ie6fix.css |
2015 | - |
2016 | -} |
2017 | \ No newline at end of file |
2018 | |
2019 | === modified file 'slub_dfgviewer/pi1/static/constants.txt' |
2020 | --- slub_dfgviewer/pi2/static/constants.txt 2011-03-07 15:24:39 +0000 |
2021 | +++ slub_dfgviewer/pi1/static/constants.txt 2012-06-15 13:45:23 +0000 |
2022 | @@ -1,4 +1,4 @@ |
2023 | -plugin.tx_slubdfgviewer_pi2 { |
2024 | +plugin.tx_slubdfgviewer_pi1 { |
2025 | |
2026 | templateFile = EXT:slub_dfgviewer/res/template.tmpl |
2027 | |
2028 | |
2029 | === removed file 'slub_dfgviewer/pi1/static/setup.txt' |
2030 | --- slub_dfgviewer/pi1/static/setup.txt 2011-03-07 15:24:39 +0000 |
2031 | +++ slub_dfgviewer/pi1/static/setup.txt 1970-01-01 00:00:00 +0000 |
2032 | @@ -1,65 +0,0 @@ |
2033 | -plugin.tx_slubdfgviewer_pi1 { |
2034 | - |
2035 | - templateFile = {$plugin.tx_slubdfgviewer_pi1.templateFile} |
2036 | - |
2037 | - debug = {$plugin.tx_slubdfgviewer_pi1.debug} |
2038 | - |
2039 | - favicon = {$plugin.tx_slubdfgviewer_pi1.favicon} |
2040 | - |
2041 | - multiVolumePic = {$plugin.tx_slubdfgviewer_pi1.multiVolumePic} |
2042 | - |
2043 | - stylesheet = {$plugin.tx_slubdfgviewer_pi1.stylesheet} |
2044 | - |
2045 | - print = {$plugin.tx_slubdfgviewer_pi1.print} |
2046 | - |
2047 | - iefix = {$plugin.tx_slubdfgviewer_pi1.iefix} |
2048 | - |
2049 | - iefix.condition = lt IE 7 |
2050 | - |
2051 | - useragent = DFG-Viewer/2.5 |
2052 | - |
2053 | - prependPageTitle = DFG-Viewer > |
2054 | - |
2055 | - vd16Resolver = http://gateway-bayern.bib-bvb.de/aleph-cgi/bvb_suche?sid=VD16&find_code_1=WVD&find_request_1= |
2056 | - |
2057 | - vd17Resolver = http://gso.gbv.de/xslt/DB=1.28/SET=1/TTL=1/CMD?ACT=SRCHA&IKT=8002&TRM= |
2058 | - |
2059 | - vd18Resolver = |
2060 | - |
2061 | - author.wrap = <span class="author">|:</span> |
2062 | - |
2063 | - title.wrap = | |
2064 | - |
2065 | - place.wrap = <span class="date">|</span> |
2066 | - |
2067 | - date.wrap = <span class="date">|</span> |
2068 | - |
2069 | - volume.wrap = <span class="volume">(|)</span> |
2070 | - |
2071 | - id.wrap = <span class="catid">[|]</span> |
2072 | - |
2073 | - pid.wrap = <span class="uri">|</span> |
2074 | - |
2075 | - idSpacer ( |
2076 | -, |
2077 | -) |
2078 | - |
2079 | - navigation.wrap = <td id="navcontainer"><div id="nav"><div id="navtop"></div><a id="skip2nav"></a>|<div id="navend"></div></div></td> |
2080 | - |
2081 | - image.wrap = | |
2082 | - |
2083 | - double.wrap = <td>|</td> |
2084 | - |
2085 | - _DEFAULT_PI_VARS { |
2086 | - |
2087 | - image = 1 |
2088 | - |
2089 | - zoom = default |
2090 | - |
2091 | - debug = 0 |
2092 | - |
2093 | - double = 0 |
2094 | - |
2095 | - } |
2096 | - |
2097 | -} |
2098 | \ No newline at end of file |
2099 | |
2100 | === modified file 'slub_dfgviewer/pi1/static/setup.txt' |
2101 | --- slub_dfgviewer/pi2/static/setup.txt 2011-03-07 15:24:39 +0000 |
2102 | +++ slub_dfgviewer/pi1/static/setup.txt 2012-06-15 13:45:23 +0000 |
2103 | @@ -1,18 +1,18 @@ |
2104 | -plugin.tx_slubdfgviewer_pi2 { |
2105 | - |
2106 | - templateFile = {$plugin.tx_slubdfgviewer_pi2.templateFile} |
2107 | - |
2108 | - debug = {$plugin.tx_slubdfgviewer_pi2.debug} |
2109 | - |
2110 | - favicon = {$plugin.tx_slubdfgviewer_pi2.favicon} |
2111 | - |
2112 | - multiVolumePic = {$plugin.tx_slubdfgviewer_pi2.multiVolumePic} |
2113 | - |
2114 | - stylesheet = {$plugin.tx_slubdfgviewer_pi2.stylesheet} |
2115 | - |
2116 | - print = {$plugin.tx_slubdfgviewer_pi2.print} |
2117 | - |
2118 | - iefix = {$plugin.tx_slubdfgviewer_pi2.iefix} |
2119 | +plugin.tx_slubdfgviewer_pi1 { |
2120 | + |
2121 | + templateFile = {$plugin.tx_slubdfgviewer_pi1.templateFile} |
2122 | + |
2123 | + debug = {$plugin.tx_slubdfgviewer_pi1.debug} |
2124 | + |
2125 | + favicon = {$plugin.tx_slubdfgviewer_pi1.favicon} |
2126 | + |
2127 | + multiVolumePic = {$plugin.tx_slubdfgviewer_pi1.multiVolumePic} |
2128 | + |
2129 | + stylesheet = {$plugin.tx_slubdfgviewer_pi1.stylesheet} |
2130 | + |
2131 | + print = {$plugin.tx_slubdfgviewer_pi1.print} |
2132 | + |
2133 | + iefix = {$plugin.tx_slubdfgviewer_pi1.iefix} |
2134 | |
2135 | iefix.condition = lt IE 7 |
2136 | |
2137 | |
2138 | === removed directory 'slub_dfgviewer/pi2' |