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

Last change on this file since 2976 was 2945, checked in by sjboddie, 22 years ago

The "l" and "w" (interface language and encoding) arguments are now
preserved when moving from one collection to another through the home
page. A nicer way to do this would be to add the ability to define
certain arguments as being "collection specific" (since there are many
arguments whose values we don't want to retain when moving between
collections) and let all the rest be retained (rather than making a
special case of "l" and "w"). For now this rather inelegant solution
will do the trick though.

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