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

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

* empty log message *

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