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

Last change on this file since 1444 was 1444, checked in by davidb, 24 years ago

Icon support for Word, PDF, and Midi file types.

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