source: trunk/gsdl/macros/base.dm@ 3533

Last change on this file since 3533 was 3533, checked in by jrm21, 21 years ago

added images and macros for "volume" metadata and buttons

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 17.7 KB
Line 
1#######################################################################
2# GLOBAL MACROS
3#######################################################################
4
5package Global
6
7##########
8
9# not sure exactly what this is used for but it seems it needs to default
10# to something
11_optsite_ {}
12
13
14##########
15
16_htmlextra_ {}
17
18#_starthighlight_ {<b><u>}
19#_endhighlight_ {</u></b>}
20
21_starthighlight_ {<span style="background: #FFFF77">}
22_endhighlight_ {</span>}
23
24#######################################################################
25# page content
26#
27# these should always be overridden for each page/collection
28#######################################################################
29
30_content_ {<p><h2>oops</h2>
31_textdefaultcontent_}
32_pagetitle_ {_textdefaulttitle_}
33_imagethispage_ {}
34_iconcollection_ {}
35_collectionname_ {}
36
37_imagecollection_ {_If_("_iconcollection_" ne "",
38<a href="_httppageabout_"><img src="_iconcollection_" border=0></a>,
39_imagecollectionv_}
40_imagecollection_ [v=1] {_imagecollectionv_}
41_imagecollectionv_ {_If_(_collectionname_,<br><br><h2><a href="_httppageabout_">_collectionname_</a></h2>)}
42
43#######################################################################
44# these width macros are read in by the server when calculating
45# width of navigation bar etc. There should be one for each
46# classification that this receptionist supports, one for the
47# search button, and the _pagewidth_ macro which is the total width
48# of the page
49#######################################################################
50
51# width of tabs when displaying tables of contents
52_tabwidth_ {25}
53
54_pagewidth_ {537}
55# defaultwidth is the width buttons default to if not included in this list
56# but you need to define a _METAwidth_ tag as the server tests that it exists!
57_defaultwidth_ {87}
58_searchwidth_ {_widthtsrchx_}
59_Titlewidth_ {_widthttitlx_}
60_Listwidth_ {_widthtlistx_}
61_Creatorwidth_ {_widthtauthx_}
62_Serieswidth_ {_widthtserx_}
63_Datewidth_ {_widthtdatex_}
64_Subjectwidth_ {_widthtsubjx_}
65_Towidth_ {_widthttox_}
66_Fromwidth_ {_widthtfromx_}
67_Organizationwidth_ {_widthtorgx_}
68_Howtowidth_ {_widththowx_}
69_Topicwidth_ {_widthttopicx_}
70_Browsewidth_ {_widthtbrwsex_}
71_Peoplewidth_ {_widthtpeopx_}
72_Languagewidth_ {_widthtlangx_}
73_Acronymwidth_ {_widthtacrox_}
74_Phrasewidth_ {_widthtphrsex_}
75_Artistwidth_ {_widthtartstx_}
76_Sourcewidth_ {_widthtsrcx_}
77_Keywordwidth_ {_widthtkwx_}
78_Volumewidth_ {_widthtvolx_}
79
80#######################################################################
81# Macros whose values are set from within the server at runtime. These
82# are here only for reference and to set default values if required.
83#######################################################################
84
85# _win32_ will be set to 1 if we're on windows
86_win32_ {}
87
88_navigationbar_ {}
89_widthtspace_ {2}
90
91# all cgi args are set as _cgiargX_ macros - those I've put here
92# are those that need to default to something
93_cgiargd_ {}
94_cgiargcl_ {}
95
96# set from within the query action
97_hselection_ {}
98_jselection_ {}
99_nselection_ {}
100#granularity selection for mgpp
101_gselection_ {}
102
103#######################################################################
104# flashy rollover image macro
105#
106#######################################################################
107
108# imagescript should always be included in html header if there are
109# flashy images on the page
110_imagescript_ {
111var loaded = new Array();
112function gbutton (image, onimage) \{
113 if (image && image.src && (image.out == null || typeof(image.out) == typeof(void(0)))) \{
114 s = image.src;
115 image.out = new Image();
116 image.out.src = s;
117 image.over = new Image();
118 image.over.src = onimage;
119 loaded[image.name] = image;
120 \}
121\}
122
123function roll (imagename, over) \{
124 if (document.images) \{
125 if (over) i = "over";
126 else i = "out";
127 image = loaded[imagename];
128 if (image) image.src = eval("image."+i+".src");
129 \}
130\}
131}
132
133# gsimage should be used to define an instance of a flashy image
134# parameters are:
135# 1. the url to go to when the button is clicked
136# 2. the url of the "off" image
137# 3. the url of the "on" image
138# 4. the name of the image (must be unique)
139# 5. image alt text
140_gsimage_ {<a href="_1_" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img
141name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border=0 alt="_5_"></a>}
142
143_gsimage_ [v=1] {<a href="_1_">_5_</a><br>}
144
145#######################################################################
146# navigation bar images
147#
148#######################################################################
149
150# the spacer image - the width of this is set from server
151_imagespacer_ {<img
152src="_httpicontspace_" width="_widthtspace_" height="_heighttspace_">}
153_imagespacer_[v=1] {<br>
154}
155
156# image macros for all the classifications currently supported by
157# this receptionist.
158
159_imagesearch_ {_If_("_cgiargu_" ne "1",_imagesearch2_,_iconnosearch_)}
160_imagesearch2_ {_gsimage_(_httpquery_,_httpicontsrchof_,_httpicontsrchon_,srch,_textimagesearch_)}
161_imageTitle_ {_gsimage_(_httpbrowseTitle_,_httpiconttitlof_,_httpiconttitlon_,titles,_textimageTitle_)}
162_imageCreator_ {_gsimage_(_httpbrowseCreator_,_httpicontauthof_,_httpicontauthon_,authors,_textimageCreator_)}
163_imageSeries_ {_gsimage_(_httpbrowseSeries_,_httpicontserof_,_httpicontseron_,series,_textimageSeries_)}
164_imageDate_ {_gsimage_(_httpbrowseDate_,_httpicontdateof_,_httpicontdateon_,dates,_textimageDate_)}
165_imageSubject_ {_gsimage_(_httpbrowseSubject_,_httpicontsubjof_,_httpicontsubjon_,subjects,_textimageSubject_)}
166_imageTo_ {_gsimage_(_httpbrowseTo_,_httpiconttoof_,_httpiconttoon_,to,_textimageTo_)}
167_imageFrom_ {_gsimage_(_httpbrowseFrom_,_httpicontfromof_,_httpicontfromon_,from,_textimageFrom_)}
168_imageOrganization_ {_gsimage_(_httpbrowseOrganization_,_httpicontorgof_,_httpicontorgon_,org,_textimageOrganization_)}
169_imageHowto_ {_gsimage_(_httpbrowseHowto_,_httpiconthowof_,_httpiconthowon_,how,_textimageHowto_)}
170_imageTopic_ {_gsimage_(_httpbrowseTopic_,_httpiconttopicof_,_httpiconttopicon_,topic,_textimageTopic_)}
171_imageBrowse_ {_gsimage_(_httpbrowseBrowse_,_httpicontbrwseof_,_httpicontbrwseon_,browse,_textimageBrowse_}
172_imageBrowseMeta_ {_gsimage_(_httpBrowseMeta_,_httpicontbrowsof_,_httpicontbrowson_,browsemeta,_textimageBrowse_)}
173_imagePeople_ {_gsimage_(_httpbrowsePeople_,_httpicontpeopof_,_httpicontpeopon_,people,_textimagePeople_)}
174_imageLanguage_ {_gsimage_(_httpbrowseLanguage_,_httpicontlangof_,_httpicontlangon_,language,_textimageLanguage_)}
175_imageAcronym_ {_gsimage_(_httpbrowseAcronym_,_httpicontacroof_,_httpicontacroon_,acronym,_textimageAcronym_)}
176_imagePhrase_ {_gsimage_(_httpbrowsePhrase_,_httpicontphrseof_,_httpicontphrseon_,phrase,_textimagePhrase_)}
177_imageArtist_ {_gsimage_(_httpbrowseArtist_,_httpicontartstof_,_httpicontartston_,artist,_textimageArtist_)}
178_imageSource_ {_gsimage_(_httpbrowseSource_,_httpicontsrcof_,_httpicontsrcon_,source,_textimageSource_)}
179_imageKeyword_ {_gsimage_(_httpbrowseKeyword_,_httpicontkwof_,_httpicontkwon_,kw,_textimageKeyword_)}
180_imageVolume_ {_gsimage_(_httpbrowseVolume_,_httpicontvolof_,_httpicontvolon_,volume,_textimageVolume_)}
181
182#######################################################################
183# java images/scripts
184#######################################################################
185
186# the _javalinks_ macros are the flashy image links at the top right of
187# the page.
188
189_javalinks_ {_imagehome__imagehelp__imagepref_}
190_javalinks_ [v=1] {
191_imagehome_<br>
192_imagehelp_<br>
193_imagepref_<br>
194}
195
196
197#######################################################################
198# general web macros
199#######################################################################
200
201_mailaddr_ {[email protected]}
202
203_gsdltop_ {_top}
204
205#######################################################################
206# http macros
207#
208# These contain the url without any quotes
209#######################################################################
210
211_httpcollimg_ {_httpcollection_/index/assoc}
212_httpdocimg_ {_httpcollimg_/_thisOID_}
213
214_httpcollection_ {_httpprefix_/collect/_cgiargc_}
215
216_httppagex_ {_gwcgi_?e=_compressedoptions_&a=p&p=_1_}
217_httppagestatus_ {_gwcgi_?e=_compressedoptions_&a=status&p=frameset}
218_httppagecollector_ {_gwcgi_?e=_compressedoptions_&a=collector&p=intro}
219_httppageabout_ {_httppagex_(about)}
220#_httppagehome_ {_httppagex_(home)}
221###_httppagehome_ {http://www.nzdl.org/cgi-bin/dblibrary?a=p&p=home}
222_httppagehome_ {_gwcgi_?a=p&p=home&l=_cgiargl_&w=_cgiargw_}
223_httppagehelp_ {_httppagex_(help)}
224_httppagepref_ {_httppagex_(preferences)}
225_httppagedocs_ {_httppagex_(docs)}
226_httpclearhistory_ {_gwcgi_?e=_compressedoptions_&a=dh}
227
228_httpgreenstone_ {_httppagex_(gsdl)}
229_httpdownload_ {http://www.nzdl.org/download}
230_httppublications_ {_httpdownload_/greenstone/publications}
231
232_httpcurrentdocument_ {_gwcgi_?e=_compressedoptions_&cl=_cgiargcl_&d=_cgiargd_}
233_httpquery_ {_gwcgi_?e=_compressedoptions_&a=q}
234_httpBrowse_ {_gwcgi_?e=_compressedoptions_&a=br}
235
236# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
237# may occasionally be altered by the server however
238_httpdocument_ {_gwcgi_?e=_compressedoptions_&a=d}
239_httpdoc_ {_gwcgi_?e=_compressedoptions_&a=d}
240
241_httpextlink_ {_gwcgi_?e=_compressedoptions_&a=extlink}
242_httpbuild_ {_gwcgi_?e=_compressedoptions_&a=bc}
243
244_httpiconchalk_ {_httpimg_/chalk.gif}
245_widthchalk_ {2000}
246_heightchalk_ {10}
247
248_httpicondivb_ {_httpimg_/divb.gif}
249_widthdivb_ {_pagewidth_}
250_heightdivb_ {17}
251
252_httpicongsdl_ {_httpimg_/gsdl.gif}
253_widthgsdl_ {140}
254_heightgsdl_ {77}
255
256_httpiconitext_ {_httpimg_/itext.gif}
257_widthitext_ {16}
258_heightitext_ {21}
259
260_httpiconibtext_ {_httpimg_/ibtext.gif}
261_widthibtext_ {16}
262_heightibtext_ {21}
263
264_httpiconimpegvideo_ {_httpimg_/impegvid.gif}
265_widthimpegvideo_ {29}
266_heightimpegvideo_ {32}
267
268_httpiconiqtvideo_ {_httpimg_/iqtvideo.gif}
269_widthiqtvideo_ {29}
270_heightiqtvideo_ {32}
271
272_httpiconirmvideo_ {_httpimg_/irmvideo.gif}
273_widthirmvideo_ {29}
274_heightirmvideo_ {32}
275
276_httpiconless_ {_httpimg_/less.gif}
277_widthless_ {30}
278_heightless_ {16}
279
280_httpiconmore_ {_httpimg_/more.gif}
281_widthmore_ {30}
282_heightmore_ {16}
283
284_httpiconspacer_ {_httpimg_/spacer.gif}
285_widthspacer_ {42}
286_heightspacer_ {4}
287
288_httpicontabspace_ {_httpimg_/tabspace.gif}
289_widthtabspace_ {23}
290_heighttabspace_ {1}
291
292_httpicontspace_ {_httpimg_/tspace.gif}
293_heighttspace_ {17}
294
295_httpiconwarning_ {_httpimg_/warning.gif}
296_widthwarning_ {30}
297_heightwarning_ {29}
298
299_httpiconhhome_ {_httpimg_/h\_home.gif}
300_widthhhome_ {200}
301_heighthhome_ {57}
302
303_httpiconarrrght_ {_httpimg_/arrrght.gif}
304_widtharrrght_ {23}
305_heightarrrght_ {15}
306
307_httpiconopenbook_ {_httpimg_/openbook.gif}
308_widthopenbook_ {28}
309_heightopenbook_ {23}
310
311_httpiconaopenbk_ {_httpimg_/aopenbk.gif}
312_widthaopenbk_ {28}
313_heightaopenbk_ {23}
314
315_httpiconopenfldr_ {_httpimg_/openfldr.gif}
316_widthopenfldr_ {23}
317_heightopenfldr_ {15}
318
319_httpiconaopenfdr_ {_httpimg_/aopenfdr.gif}
320_widthaopenfdr_ {23}
321_heightaopenfdr_ {15}
322
323_httpiconbook_ {_httpimg_/book.gif}
324_widthbook_ {18}
325_heightbook_ {11}
326
327_httpiconabook_ {_httpimg_/abook.gif}
328_widthabook_ {18}
329_heightabook_ {11}
330
331_httpiconbshelf_ {_httpimg_/bshelf.gif}
332_widthbshelf_ {20}
333_heightbshelf_ {16}
334
335_httpiconabshelf_ {_httpimg_/abshelf.gif}
336_widthabshelf_ {20}
337_heightabshelf_ {16}
338
339_httpiconsmtext_ {_httpimg_/smtext.gif}
340_widthsmtext_ {23}
341_heightsmtext_ {15}
342
343_httpiconasmtext_ {_httpimg_/asmtext.gif}
344_widthasmtext_ {23}
345_heightasmtext_ {15}
346
347_httpiconclsdfldr_ {_httpimg_/clsdfldr.gif}
348_widthclsdfldr_ {23}
349_heightclsdfldr_ {15}
350
351_httpiconaclsdfdr_ {_httpimg_/aclsdfdr.gif}
352_widthaclsdfdr_ {23}
353_heightaclsdfdr_ {15}
354
355_httpiconimidi_ {_httpimg_/imidi.gif}
356_widthimidi_ {16}
357_heightimidi_ {21}
358
359_httpiconimsword_ {_httpimg_/imsword.gif}
360_widthimsword_ {26}
361_heightimsword_ {26}
362
363_httpiconipdf_ {_httpimg_/ipdf.gif}
364_widthipdf_ {26}
365_heightipdf_ {26}
366
367_httpiconips_ {_httpimg_/ips.gif}
368_widthips_ {25}
369_heightips_ {32}
370
371_httpiconippt_ {_httpimg_/ippt.gif}
372_widthippt_ {32}
373_heightippt_ {30}
374
375_httpiconirtf_ {_httpimg_/irtf.gif}
376_widthirtf_ {29}
377_heightirtf_ {32}
378
379_httpiconixls_ {_httpimg_/iexcel.gif}
380_widthixls_ {32}
381_heightixls_ {30}
382
383#######################################################################
384# Icons
385#
386# Must not include links (so they can be used as links). If you want to
387# include links use _image
388#######################################################################
389
390_iconnext_{<img src="_httpiconmore_" align=absbottom
391width=_widthmore_ height=_heightmore_ border=0 alt="_texticonnext_">}
392_iconnext_[v=1] {_texticonnext_}
393
394_iconprev_{<img src="_httpiconless_" align=absbottom
395width=_widthless_ height=_heightless_ border=0 alt="_texticonprev_">}
396_iconprev_[v=1] {_texticonprev_}
397
398_icontabsearchgreen_ {<img
399src="_httpicontsrchgr_" width=_widthtsrchx_ border=0>}
400_icontabsearchgreen_[v=1] {_texticontabsearchgreen_}
401
402_icontabListgreen_ {<img
403src="_httpicontlistgr_" width=_widthtlistx_ border=0>}
404_icontablistgreen_ [v=1] {_texticontablistgreen_}
405
406_icontabTitlegreen_ {<img
407src="_httpiconttitlgr_" width=_widthttitlx_ border=0>}
408_icontabTitlegreen_[v=1] {_texticontabtitlegreen_}
409
410_icontabCreatorgreen_ {<img
411src="_httpicontauthgr_" width=_widthtauthx_ border=0>}
412_icontabCreatorgreen_[v=1] {_texticontabauthorgreen_}
413
414_icontabSeriesgreen_ {<img
415src="_httpicontsergr_" width=_widthtserx_ border=0>}
416_icontabSeriesgreen_[v=1] {_texticontabseriesgreen_}
417
418_icontabDategreen_ {<img
419src="_httpicontdategr_" width=_widthtdatex_ border=0>}
420_icontabDategreen_[v=1] {_texticontabdategreen_}
421
422_icontabSubjectgreen_ {<img
423src="_httpicontsubjgr_" width=_widthtsubjx_ border=0>}
424_icontabSubjectgreen_[v=1] {_texticontabsubjectgreen_}
425
426_icontabTogreen_ {<img
427src="_httpiconttogr_" width=_widthttox_ border=0>}
428_icontabTogreen_[v=1] {_texticontabtogreen_}
429
430_icontabFromgreen_ {<img
431src="_httpicontfromgr_" width=_widthtfromx_ border=0>}
432_icontabFromgreen_[v=1] {_texticontabfromgreen_}
433
434_icontabHowtogreen_ {<img
435src="_httpiconthowgr_" width=_widththowx_ border=0>}
436_icontabHowtogreen_[v=1] {_texticontabhowgreen_}
437
438_icontabTopicgreen_ {<img
439src="_httpiconttopicgr_" width=_widthttopicx_ border=0>}
440_icontabTopicgreen_[v=1] {_texticontabtopicgreen_}
441
442_icontabBrowsegreen_ {<img
443src="_httpicontbrwsegr_" width=_widthtbrwsex_ border=0>}
444_icontabBrowsegreen_[v=1] {_texticontabbrwsegreen_}
445
446_icontabOrganizationgreen_ {<img
447src="_httpicontorggr_" width=_widthtorgx_ border=0>}
448_icontabOrganizationgreen_[v=1] {_texticontaborggreen_}
449
450_icontabPeoplegreen_ {<img
451src="_httpicontpeopgr_" width=_widthtpeopx_ border=0>}
452_icontabPeoplegreen_[v=1] {_texticontabPeoplegreen_}
453
454_icontabLanguagegreen_ {<img
455src="_httpicontlanggr_" width=_widthtlangx_ border=0>}
456_icontabLanguagegreen_[v=1] {_texticontabLanguagegreen_}
457
458_icontabAcronymgreen_ {<img
459src="_httpicontacrogr_" width=_widthtacrox_ border=0>}
460_icontabAcronymgreen_[v=1] {_texticontabAcronymgreen_}
461
462_icontabPhrasegreen_ {<img
463src="_httpicontphrsegr_" width=_widthtphrsex_ border=0>}
464_icontabPhrasegreen_[v=1] {_texticontabPhrasegreen_}
465
466_icontabArtistgreen_ {<img
467src="_httpicontartstgr_" width=_widthtartstx_ border=0>}
468_icontabArtistgreen_[v=1] {_texticontabArtistgreen_}
469
470_icontabSourcegreen_ {<img
471src="_httpicontsrcgr_" width=_widthtsrcx_ border=0>}
472_icontabSourcegreen_[v=1] {_texticontabSourcegreen_}
473
474_icontabKeywordgreen_ {<img
475src="_httpicontkwgr_" width=_widthtkwx_ border=0>}
476_icontabKeywordgreen_[v=1] {_texticontabKeywordgreen_}
477
478_icontabVolumegreen_ {<img
479src="_httpicontvolgr_" width=_widthtvolx_border=0>}
480_icontabVolumegreen_[v=1] {_texticontabVolumegreen_}
481
482
483_iconblankbar_ {<center><img src="_httpicondivb_" width=_widthdivb_ height=_heightdivb_></center>}
484_iconblankbar_[v=1] {<br><hr><br>}
485
486_icontext_ {<img border=0 align=absmiddle src="_httpiconitext_" width=_widthitext_ height=_heightitext_ alt="_texticontext_">}
487_icontext_[v=1] {_texticontext_}
488
489_iconblanktext_ {<img border=0 align=absmiddle src="_httpiconibtext_" width=_widthibtext_ height=_heightibtext_>}
490_iconblanktext_[v=1] {}
491
492_iconclosedbook_ {<img src="_httpiconbook_" width=_widthbook_ height=_heightbook_ border=0 alt="_texticonclosedbook_">}
493_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
494_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
495
496_icondoc_ {<img border=0 align=absmiddle src="_httpiconimsword_" width=_widthimsword_ height=_heightimsword_ alt="_texticonmsword_">}
497_iconmsword_[v=1] {_texticonmsword_}
498
499_iconmidi_ {<img border=0 align=absmiddle src="_httpiconimidi_" width=_widthimidi_ height=_heightimidi_ alt="_texticonmidi_">}
500_iconmidi_[v=1] {_texticonmidi_}
501
502_iconpdf_ {<img border=0 align=absmiddle src="_httpiconipdf_" width=_widthipdf_ height=_heightipdf_ alt="_texticonpdf_">}
503_iconpdf_[v=1] {_texticonpdf_}
504
505_iconps_ {<img border=0 align=absmiddle src="_httpiconips_" width=_widthips_ height=_heightips_ alt="_texticonps_">}
506_iconps_[v=1] {_texticonps_}
507
508_iconppt_ {<img border=0 align=absmiddle src="_httpiconippt_" width=_widthippt_ height=_heightippt_ alt="_texticonppt_">}
509_iconppt_[v=1] {_texticonppt_}
510
511_iconrtf_ {<img border=0 align=absmiddle src="_httpiconirtf_" width=_widthirtf_ height=_heightirtf_ alt="_texticonrtf_">}
512_iconrtf_[v=1] {_texticonrtf_}
513
514_iconxls_ {<img border=0 align=absmiddle src="_httpiconixls_" width=_widthixls_ height=_heightixls_ alt="_texticonxls_">}
515_iconxls_[v=1] {_texticonxls_}
516
517_iconnosearch_ {<img src="_httpimg_/nosearch.gif">}
518
519#######################################################################
520# Image links
521#
522# These might include a link (not like an _icon_
523#######################################################################
524
525_imagehome_ {_If_("_cgiargu_" ne "1",_imagehome2_)}
526_imagehome2_ {_gsimage_(_httppagehome_,_httpiconchomeof_,_httpiconchomeon_,homer,_textimagehome_)}
527
528_imagehelp_ {_gsimage_(_httppagehelp_,_httpiconchelpof_,_httpiconchelpon_,help,_textimagehelp_)}
529
530_imagepref_ {_If_("_cgiargu_" ne "1",_imagepref2_)}
531_imagepref2_ {_gsimage_(_httppagepref_,_httpiconcprefof_,_httpiconcprefon_,pref,_textimagepref_)}
532
533_imagegreenstone_ {<img src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" border="0" alt="_textimagegreenstone_" hspace=0>}
534_imagegreenstone_[v=1] {_textimagegreenstone_}
Note: See TracBrowser for help on using the repository browser.