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

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

Added macros for powerpoint icon to languages that already have the other
file icons.

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