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

Last change on this file since 2992 was 2992, checked in by jrm21, 22 years ago

Added macros for Excel icon and text. Also added a mention of xlhtml to the
GPL packages we use.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 17.1 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_httpiconimidi_ {_httpimg_/imidi.gif}
351_widthimidi_ {16}
352_heightimidi_ {21}
353
354_httpiconimsword_ {_httpimg_/imsword.gif}
355_widthimsword_ {26}
356_heightimsword_ {26}
357
358_httpiconipdf_ {_httpimg_/ipdf.gif}
359_widthipdf_ {26}
360_heightipdf_ {26}
361
362_httpiconips_ {_httpimg_/ips.gif}
363_widthips_ {25}
364_heightips_ {32}
365
366_httpiconippt_ {_httpimg_/ippt.gif}
367_widthippt_ {32}
368_heightippt_ {30}
369
370_httpiconirtf_ {_httpimg_/irtf.gif}
371_widthirtf_ {29}
372_heightirtf_ {32}
373
374_httpiconixls_ {_httpimg_/iexcel.gif}
375_widthixls_ {32}
376_heightixls_ {30}
377
378#######################################################################
379# Icons
380#
381# Must not include links (so they can be used as links). If you want to
382# include links use _image
383#######################################################################
384
385_iconnext_{<img src="_httpiconmore_" align=absbottom
386width=_widthmore_ height=_heightmore_ border=0 alt="_texticonnext_">}
387_iconnext_[v=1] {_texticonnext_}
388
389_iconprev_{<img src="_httpiconless_" align=absbottom
390width=_widthless_ height=_heightless_ border=0 alt="_texticonprev_">}
391_iconprev_[v=1] {_texticonprev_}
392
393_icontabsearchgreen_ {<img
394src="_httpicontsrchgr_" width=_widthtsrchx_ border=0>}
395_icontabsearchgreen_[v=1] {_texticontabsearchgreen_}
396
397_icontabListgreen_ {<img
398src="_httpicontlistgr_" width=_widthtlistx_ border=0>}
399_icontablistgreen_ [v=1] {_texticontablistgreen_}
400
401_icontabTitlegreen_ {<img
402src="_httpiconttitlgr_" width=_widthttitlx_ border=0>}
403_icontabTitlegreen_[v=1] {_texticontabtitlegreen_}
404
405_icontabCreatorgreen_ {<img
406src="_httpicontauthgr_" width=_widthtauthx_ border=0>}
407_icontabCreatorgreen_[v=1] {_texticontabauthorgreen_}
408
409_icontabSeriesgreen_ {<img
410src="_httpicontsergr_" width=_widthtserx_ border=0>}
411_icontabSeriesgreen_[v=1] {_texticontabseriesgreen_}
412
413_icontabDategreen_ {<img
414src="_httpicontdategr_" width=_widthtdatex_ border=0>}
415_icontabDategreen_[v=1] {_texticontabdategreen_}
416
417_icontabSubjectgreen_ {<img
418src="_httpicontsubjgr_" width=_widthtsubjx_ border=0>}
419_icontabSubjectgreen_[v=1] {_texticontabsubjectgreen_}
420
421_icontabTogreen_ {<img
422src="_httpiconttogr_" width=_widthttox_ border=0>}
423_icontabTogreen_[v=1] {_texticontabtogreen_}
424
425_icontabFromgreen_ {<img
426src="_httpicontfromgr_" width=_widthtfromx_ border=0>}
427_icontabFromgreen_[v=1] {_texticontabfromgreen_}
428
429_icontabHowtogreen_ {<img
430src="_httpiconthowgr_" width=_widththowx_ border=0>}
431_icontabHowtogreen_[v=1] {_texticontabhowgreen_}
432
433_icontabTopicgreen_ {<img
434src="_httpiconttopicgr_" width=_widthttopicx_ border=0>}
435_icontabTopicgreen_[v=1] {_texticontabtopicgreen_}
436
437_icontabBrowsegreen_ {<img
438src="_httpicontbrwsegr_" width=_widthtbrwsex_ border=0>}
439_icontabBrowsegreen_[v=1] {_texticontabbrwsegreen_}
440
441_icontabOrganizationgreen_ {<img
442src="_httpicontorggr_" width=_widthtorgx_ border=0>}
443_icontabOrganizationgreen_[v=1] {_texticontaborggreen_}
444
445_icontabPeoplegreen_ {<img
446src="_httpicontpeopgr_" width=_widthtpeopx_ border=0>}
447_icontabPeoplegreen_[v=1] {_texticontabPeoplegreen_}
448
449_icontabLanguagegreen_ {<img
450src="_httpicontlanggr_" width=_widthtlangx_ border=0>}
451_icontabLanguagegreen_[v=1] {_texticontabLanguagegreen_}
452
453_icontabAcronymgreen_ {<img
454src="_httpicontacrogr_" width=_widthtacrox_ border=0>}
455_icontabAcronymgreen_[v=1] {_texticontabAcronymgreen_}
456
457_icontabPhrasegreen_ {<img
458src="_httpicontphrsegr_" width=_widthtphrsex_ border=0>}
459_icontabPhrasegreen_[v=1] {_texticontabPhrasegreen_}
460
461_icontabArtistgreen_ {<img
462src="_httpicontartstgr_" width=_widthtartstx_ border=0>}
463_icontabArtistgreen_[v=1] {_texticontabArtistgreen_}
464
465_icontabSourcegreen_ {<img
466src="_httpicontsrcgr_" width=_widthtsrcx_ border=0>}
467_icontabSourcegreen_[v=1] {_texticontabsourcegreen_}
468
469
470_iconblankbar_ {<center><img src="_httpicondivb_" width=_widthdivb_ height=_heightdivb_></center>}
471_iconblankbar_[v=1] {<br><hr><br>}
472
473_icontext_ {<img border=0 align=absmiddle src="_httpiconitext_" width=_widthitext_ height=_heightitext_ alt="_texticontext_">}
474_icontext_[v=1] {_texticontext_}
475
476_iconblanktext_ {<img border=0 align=absmiddle src="_httpiconibtext_" width=_widthibtext_ height=_heightibtext_>}
477_iconblanktext_[v=1] {}
478
479_iconclosedbook_ {<img src="_httpiconbook_" width=_widthbook_ height=_heightbook_ border=0 alt="_texticonclosedbook_">}
480_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
481_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
482
483_icondoc_ {<img border=0 align=absmiddle src="_httpiconimsword_" width=_widthimsword_ height=_heightimsword_ alt="_texticonmsword_">}
484_iconmsword_[v=1] {_texticonmsword_}
485
486_iconmidi_ {<img border=0 align=absmiddle src="_httpiconimidi_" width=_widthimidi_ height=_heightimidi_ alt="_texticonmidi_">}
487_iconmidi_[v=1] {_texticonmidi_}
488
489_iconpdf_ {<img border=0 align=absmiddle src="_httpiconipdf_" width=_widthipdf_ height=_heightipdf_ alt="_texticonpdf_">}
490_iconpdf_[v=1] {_texticonpdf_}
491
492_iconps_ {<img border=0 align=absmiddle src="_httpiconips_" width=_widthips_ height=_heightips_ alt="_texticonps_">}
493_iconps_[v=1] {_texticonps_}
494
495_iconppt_ {<img border=0 align=absmiddle src="_httpiconippt_" width=_widthippt_ height=_heightippt_ alt="_texticonppt_">}
496_iconppt_[v=1] {_texticonppt_}
497
498_iconrtf_ {<img border=0 align=absmiddle src="_httpiconirtf_" width=_widthirtf_ height=_heightirtf_ alt="_texticonrtf_">}
499_iconrtf_[v=1] {_texticonrtf_}
500
501_iconxls_ {<img border=0 align=absmiddle src="_httpiconixls_" width=_widthixls_ height=_heightixls_ alt="_texticonxls_">}
502_iconxls_[v=1] {_texticonxls_}
503
504_iconnosearch_ {<img src="_httpimg_/nosearch.gif">}
505
506#######################################################################
507# Image links
508#
509# These might include a link (not like an _icon_
510#######################################################################
511
512_imagehome_ {_If_("_cgiargu_" ne "1",_imagehome2_)}
513_imagehome2_ {_gsimage_(_httppagehome_,_httpiconchomeof_,_httpiconchomeon_,homer,_textimagehome_)}
514
515_imagehelp_ {_gsimage_(_httppagehelp_,_httpiconchelpof_,_httpiconchelpon_,help,_textimagehelp_)}
516
517_imagepref_ {_If_("_cgiargu_" ne "1",_imagepref2_)}
518_imagepref2_ {_gsimage_(_httppagepref_,_httpiconcprefof_,_httpiconcprefon_,pref,_textimagepref_)}
519
520_imagegreenstone_ {<img src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" border="0" alt="_textimagegreenstone_" hspace=0>}
521_imagegreenstone_[v=1] {_textimagegreenstone_}
Note: See TracBrowser for help on using the repository browser.