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

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

Initial revision

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