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

Last change on this file since 3177 was 3177, checked in by sjboddie, 21 years ago

* empty log message *

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