source: trunk/protemix/macros/base.dm@ 3168

Last change on this file since 3168 was 3168, checked in by sjboddie, 20 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 9.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_ {<span style="background: #FFFF77">}
19_endhighlight_ {</span>}
20
21#######################################################################
22# page content
23#
24# these should always be overridden for each page/collection
25#######################################################################
26
27_content_ {<p><h2>oops</h2>
28_textdefaultcontent_}
29_pagetitle_ {_textdefaulttitle_}
30_imagethispage_ {}
31_iconcollection_ {}
32_collectionname_ {}
33
34_imagecollection_ {<img src="_httpcollection_/images/protemixlogo.gif">}
35
36#######################################################################
37# these width macros are read in by the server when calculating
38# width of navigation bar etc. There should be one for each
39# classification that this receptionist supports, one for the
40# search button, and the _pagewidth_ macro which is the total width
41# of the page
42#######################################################################
43
44# width of tabs when displaying tables of contents
45_tabwidth_ {25}
46
47_pagewidth_ {537}
48# defaultwidth is the width buttons default to if not included in this list
49_defaultwidth_ {87}
50_searchwidth_ {_widthtsrchx_}
51_Titlewidth_ {_widthttitlx_}
52
53#######################################################################
54# Macros whose values are set from within the server at runtime. These
55# are here only for reference and to set default values if required.
56#######################################################################
57
58# _win32_ will be set to 1 if we're on windows
59_win32_ {}
60
61_navigationbar_ {}
62_widthtspace_ {2}
63
64# all cgi args are set as _cgiargX_ macros - those I've put here
65# are those that need to default to something
66_cgiargd_ {}
67_cgiargcl_ {}
68
69# set from within the query action
70_hselection_ {}
71_jselection_ {}
72_nselection_ {}
73#granularity selection for mgpp
74_gselection_ {}
75
76#######################################################################
77# flashy rollover image macro
78#
79#######################################################################
80
81# imagescript should always be included in html header if there are
82# flashy images on the page
83_imagescript_ {
84var loaded = new Array();
85function gbutton (image, onimage) \{
86 if (image && image.src && (image.out == null || typeof(image.out) == typeof(void(0)))) \{
87 s = image.src;
88 image.out = new Image();
89 image.out.src = s;
90 image.over = new Image();
91 image.over.src = onimage;
92 loaded[image.name] = image;
93 \}
94\}
95
96function roll (imagename, over) \{
97 if (document.images) \{
98 if (over) i = "over";
99 else i = "out";
100 image = loaded[imagename];
101 if (image) image.src = eval("image."+i+".src");
102 \}
103\}
104}
105
106# gsimage should be used to define an instance of a flashy image
107# parameters are:
108# 1. the url to go to when the button is clicked
109# 2. the url of the "off" image
110# 3. the url of the "on" image
111# 4. the name of the image (must be unique)
112# 5. image alt text
113_gsimage_ {<a href="_1_" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img
114name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border=0 alt="_5_"></a>}
115
116#######################################################################
117# navigation bar images
118#
119#######################################################################
120
121# the spacer image - the width of this is set from server
122_imagespacer_ {<img
123src="_httpicontspace_" width="_widthtspace_" height="_heighttspace_">}
124
125# image macros for all the classifications currently supported by
126# this receptionist.
127
128_imagesearch_ {_If_("_cgiargu_" ne "1",_imagesearch2_,_iconnosearch_)}
129_imagesearch2_ {_gsimage_(_httpquery_,_httpicontsrchof_,_httpicontsrchon_,srch,_textimagesearch_)}
130_imageTitle_ {_gsimage_(_httpbrowseTitle_,_httpiconttitlof_,_httpiconttitlon_,titles,_textimageTitle_)}
131
132#######################################################################
133# java images/scripts
134#######################################################################
135
136# the _javalinks_ macros are the flashy image links at the top right of
137# the page.
138
139_javalinks_ {}
140
141
142#######################################################################
143# general web macros
144#######################################################################
145
146_mailaddr_ {greenstone@cs.waikato.ac.nz}
147
148_gsdltop_ {_top}
149
150#######################################################################
151# http macros
152#
153# These contain the url without any quotes
154#######################################################################
155
156_httpcollimg_ {_httpcollection_/index/assoc}
157_httpdocimg_ {_httpcollimg_/_thisOID_}
158
159_httpcollection_ {_httpprefix_/collect/_cgiargc_}
160
161_httppagex_ {_gwcgi_?e=_compressedoptions_&a=p&p=_1_}
162_httppageabout_ {_httppagex_(about)}
163_httppagehome_ {_httppageabout_}
164
165_httpcurrentdocument_ {_gwcgi_?e=_compressedoptions_&cl=_cgiargcl_&d=_cgiargd_}
166_httpquery_ {_gwcgi_?e=_compressedoptions_&a=q}
167_httpBrowse_ {_gwcgi_?e=_compressedoptions_&a=br}
168
169# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
170# may occasionally be altered by the server however
171_httpdocument_ {_gwcgi_?e=_compressedoptions_&a=d}
172_httpdoc_ {_gwcgi_?e=_compressedoptions_&a=d}
173
174_httpextlink_ {_gwcgi_?e=_compressedoptions_&a=extlink}
175_httpbuild_ {_gwcgi_?e=_compressedoptions_&a=bc}
176
177_httpiconchalk_ {_httpimg_/chalk.gif}
178_widthchalk_ {2000}
179_heightchalk_ {10}
180
181_httpicondivb_ {_httpimg_/divb.gif}
182_widthdivb_ {_pagewidth_}
183_heightdivb_ {17}
184
185_httpicongsdl_ {_httpimg_/gsdl.gif}
186_widthgsdl_ {140}
187_heightgsdl_ {77}
188
189_httpiconitext_ {_httpimg_/itext.gif}
190_widthitext_ {16}
191_heightitext_ {21}
192
193_httpiconibtext_ {_httpimg_/ibtext.gif}
194_widthibtext_ {16}
195_heightibtext_ {21}
196
197_httpiconless_ {_httpimg_/less.gif}
198_widthless_ {30}
199_heightless_ {16}
200
201_httpiconmore_ {_httpimg_/more.gif}
202_widthmore_ {30}
203_heightmore_ {16}
204
205_httpiconspacer_ {_httpimg_/spacer.gif}
206_widthspacer_ {42}
207_heightspacer_ {4}
208
209_httpicontabspace_ {_httpimg_/tabspace.gif}
210_widthtabspace_ {23}
211_heighttabspace_ {1}
212
213_httpicontspace_ {_httpimg_/tspace.gif}
214_heighttspace_ {17}
215
216_httpiconhhome_ {_httpimg_/h\_home.gif}
217_widthhhome_ {200}
218_heighthhome_ {57}
219
220_httpiconarrrght_ {_httpimg_/arrrght.gif}
221_widtharrrght_ {23}
222_heightarrrght_ {15}
223
224_httpiconopenbook_ {_httpimg_/openbook.gif}
225_widthopenbook_ {28}
226_heightopenbook_ {23}
227
228_httpiconaopenbk_ {_httpimg_/aopenbk.gif}
229_widthaopenbk_ {28}
230_heightaopenbk_ {23}
231
232_httpiconopenfldr_ {_httpimg_/openfldr.gif}
233_widthopenfldr_ {23}
234_heightopenfldr_ {15}
235
236_httpiconaopenfdr_ {_httpimg_/aopenfdr.gif}
237_widthaopenfdr_ {23}
238_heightaopenfdr_ {15}
239
240_httpiconbook_ {_httpimg_/book.gif}
241_widthbook_ {18}
242_heightbook_ {11}
243
244_httpiconabook_ {_httpimg_/abook.gif}
245_widthabook_ {18}
246_heightabook_ {11}
247
248_httpiconbshelf_ {_httpimg_/bshelf.gif}
249_widthbshelf_ {20}
250_heightbshelf_ {16}
251
252_httpiconabshelf_ {_httpimg_/abshelf.gif}
253_widthabshelf_ {20}
254_heightabshelf_ {16}
255
256_httpiconsmtext_ {_httpimg_/smtext.gif}
257_widthsmtext_ {23}
258_heightsmtext_ {15}
259
260_httpiconasmtext_ {_httpimg_/asmtext.gif}
261_widthasmtext_ {23}
262_heightasmtext_ {15}
263
264_httpiconclsdfldr_ {_httpimg_/clsdfldr.gif}
265_widthclsdfldr_ {23}
266_heightclsdfldr_ {15}
267
268_httpiconaclsdfdr_ {_httpimg_/aclsdfdr.gif}
269_widthaclsdfdr_ {23}
270_heightaclsdfdr_ {15}
271
272_httpiconipdf_ {_httpimg_/ipdf.gif}
273_widthipdf_ {26}
274_heightipdf_ {26}
275
276#######################################################################
277# Icons
278#
279# Must not include links (so they can be used as links). If you want to
280# include links use _image
281#######################################################################
282
283_iconnext_{<img src="_httpiconmore_" align=absbottom
284width=_widthmore_ height=_heightmore_ border=0 alt="_texticonnext_">}
285
286_iconprev_{<img src="_httpiconless_" align=absbottom
287width=_widthless_ height=_heightless_ border=0 alt="_texticonprev_">}
288
289_icontabsearchgreen_ {<img
290src="_httpicontsrchgr_" width=_widthtsrchx_ border=0>}
291
292_icontabTitlegreen_ {<img
293src="_httpiconttitlgr_" width=_widthttitlx_ border=0>}
294
295_iconblankbar_ {<center><img src="_httpicondivb_" width=_widthdivb_ height=_heightdivb_></center>}
296
297_icontext_ {<img border=0 align=absmiddle src="_httpiconitext_" width=_widthitext_ height=_heightitext_ alt="_texticontext_">}
298
299_iconblanktext_ {<img border=0 align=absmiddle src="_httpiconibtext_" width=_widthibtext_ height=_heightibtext_>}
300
301_iconclosedbook_ {<img src="_httpiconbook_" width=_widthbook_ height=_heightbook_ border=0 alt="_texticonclosedbook_">}
302
303_icondoc_ {<img border=0 align=absmiddle src="_httpiconimsword_" width=_widthimsword_ height=_heightimsword_ alt="_texticonmsword_">}
304
305_iconpdf_ {<img border=0 align=absmiddle src="_httpiconipdf_" width=_widthipdf_ height=_heightipdf_ alt="_texticonpdf_">}
306
307#######################################################################
308# Image links
309#
310# These might include a link (not like an _icon_
311#######################################################################
312
313_imagehome_ {_If_("_cgiargu_" ne "1",_imagehome2_)}
314_imagehome2_ {_gsimage_(_httppagehome_,_httpiconchomeof_,_httpiconchomeon_,homer,_textimagehome_)}
Note: See TracBrowser for help on using the repository browser.