root/main/trunk/greenstone2/macros/base.dm @ 25674

Revision 25674, 13.6 KB (checked in by sjm84, 7 years ago)

Defining _httpsamepagelink_ to be empty so that pages will work like they did before

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1# this file must be UTF-8 encoded
2#######################################################################
3# GLOBAL MACROS
4#######################################################################
5
6package Global
7
8##########
9
10_optsite_ {}
11
12
13##########
14
15_htmlextra_ {}
16
17# now defined in nav_css/nav_ns4 macro files
18#_starthighlight_ {<b><u>}
19#_endhighlight_ {</u></b>}
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
35package Global
36 
37
38_imagecollection_ {_If_("_iconcollection_" ne "",
39<a href="_httppageabout_"><img class="icon" src="_iconcollection_" alt="_collectionname_" title="_collectionname_"></a>,
40_imagecollectionv_)}
41_imagecollection_ [v=1] {_imagecollectionv_}
42_imagecollectionv_ {_If_(_collectionname_,<p class="collectiontitle"><a class="collectiontitle" href="_httppageabout_">_collectionname_</a></p>)}
43
44#######################################################################
45# these width macros are read in by the server when calculating
46# width of navigation bar etc. There should be one for each
47# classification that this receptionist supports, one for the
48# search button, and the _pagewidth_ macro which is the total width
49# of the page
50#######################################################################
51
52# width of tabs when displaying tables of contents
53_tabwidth_ {25}
54
55             
56#_pagewidth_ {537}
57_pagewidth_ {_If_(_cgiargtalkback_ eq 1,480,537)}
58
59# defaultwidth is the width buttons default to if not included in this list
60_defaultwidth_ {87}
61_searchwidth_ {_widthtsrchx_}
62
63#######################################################################
64# Macros whose values are set from within the server at runtime. These
65# are here only for reference and to set default values if required.           
66#######################################################################
67
68# _win32_ will be set to 1 if we're on windows
69_win32_ {}
70
71# all cgi args are set as _cgiargX_ macros - those I've put here
72# are those that need to default to something
73_cgiargd_ {}
74_cgiargcl_ {}
75
76# set from within the query action
77_hselection_ {}
78_jselection_ {}
79_nselection_ {}
80#level (granularity) selection for mgpp
81_gselection_ {}
82#level selection for form searching - dont have paragraph
83_gformselection_ {_gselection_}
84_fqfselection_ {}
85# sort field for lucene
86_sfselection_ {}
87# sort field for sql
88_sqlsfselection_ {}
89
90#######################################################################
91# navigation bar
92#
93#######################################################################
94# Most of the stuff to do with navigation bars is now defined in nav_css.dm
95# and nav_ns4.dm
96
97_dynamicclassifiernavbarentries_ {}
98_navigationbar_ {}
99_widthtspace_ {2}
100
101_navlinktitle_ {_If_("_label_1__" eq "\_label_1_\_",_1_,_label_1__)}
102_navlinkalt_ {_If_("_textdescr_1__" ne "\_textdescr_1_\_", _textdescr_1__, _If_("_text_1__" eq "\_text_1_\_",_textdescrdefault_(_1_),_textdescrdefault_(_text_1__)) }
103
104#######################################################################
105# global navigation links
106#######################################################################
107
108# _globallinks_ is now defined in nav_css and nav_ns4 macro files
109
110#######################################################################
111# general web macros
112#######################################################################
113
114_gsdltop_ {_top}
115
116#######################################################################
117# http macros
118#
119# These contain the url without any quotes
120#######################################################################
121
122# _httpprefix_ and _httpweb_ defined by the server
123_httpimages_ {_httpweb_/images}
124_httpscript_ {_httpweb_/script}
125_httpstyle_ {_httpweb_/style}
126_httpflash_ {_httpweb_/flash}
127_httpjava_ {_httpweb_/java}
128
129# old macros, for backwards compatibility
130_httpimg_ {_httpimages_}
131
132# collection versions of the same directories
133_httpcimages_ {_httpcollection_/images}
134_httpcscript_ {_httpcollection_/script}
135_httpcstyle_ {_httpcollection_/style}
136_httpcflash_ {_httpcollection_/flash}
137_httpcjava_ {_httpcollection_/java}
138
139_httpassocdir_ {_httpcollection_/index/assoc}
140_httpdocimg_ {_httpassocdir_/_thisOID_}
141# old macros, for backwards compatibility
142_httpcollimg_  {_httpcollection_/index/assoc}
143
144_httpcollection_ {_httpprefix_/collect/_cgiargc_}
145
146_httppagex_ {_gwcgi_?e=_compressedoptions_&amp;a=p&amp;p=_1_}
147_httppagestatus_ {_gwcgi_?e=_compressedoptions_&amp;a=status&amp;p=frameset}
148_httppagetranslator_ {_gwcgi_?e=_compressedoptions_&amp;a=gti&amp;p=home}
149_httppagecollector_ {_gwcgi_?e=_compressedoptions_&amp;a=collector&amp;p=intro}
150_httppagedepositor_ {_gwcgi_?e=_compressedoptions_&amp;a=depositor&amp;p=select}
151_httppagegli_ {_httppagex_(gli)}
152_httppageabout_ {_httppagex_(about)}
153#_httppagehome_ {_httppagex_(home)}
154###_httppagehome_ {http://www.nzdl.org/cgi-bin/dblibrary?a=p&amp;p=home}
155_httppagehome_ {_gwcgi_?a=p&amp;p=home&amp;l=_cgiargl_&amp;w=_cgiargw_}
156_httppagehelp_ {_httppagex_(help)}
157_httppagepref_ {_httppagex_(preferences)}
158_httppagedocs_ {_httppagex_(docs)}
159_httpclearhistory_ {_gwcgi_?e=_compressedoptions_&amp;a=dh}
160
161_httpgreenstone_ {_httppagex_(gsdl)}
162_httpdownload_ {http://www.nzdl.org/download}
163_httppublications_ {_httpdownload_/greenstone/publications}
164
165_httpcurrentdocument_ {_gwcgi_?e=_compressedoptions_&amp;cl=_cgiargcl_&amp;d=_cgiargd_}
166_httpquery_    {_gwcgi_?e=_compressedoptions_&amp;a=_If_("_cgiargqt_" eq "2",sqlq,q)}
167_httpsqlquery_ {_gwcgi_?e=_compressedoptions_&amp;a=sqlq&amp;qt=2}
168_httpBrowse_ {_gwcgi_?e=_compressedoptions_&amp;a=br}
169
170# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
171# may occasionally be altered by the server however
172_httpdocument_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
173_httpdoc_  {_gwcgi_?e=_compressedoptions_&amp;a=d}
174
175_httpdocumenthandle_ {_httpprefix_handle/_1_/_2_}
176
177#httpsamepagelink is for Greenstone 3 (which uses RESTful urls),
178#leaving it empty for Greenstone 2 operates correctly, as it doesn't use RESTful urls.
179_httpsamepagelink_ {}
180_httpextlink_ {_gwcgi_?e=_compressedoptions_&amp;a=extlink}
181_httpbuild_ {_gwcgi_?e=_compressedoptions_&amp;a=bc}
182
183# this is obsolete now (still used by collector). done by stylesheet instead
184_httpiconchalk_ {_httpimg_/chalk.gif}
185_widthchalk_ {2000}
186_heightchalk_ {10}
187
188_httpicondivb_ {_httpimg_/divb.gif}
189# these sizes are obsolete, now done in style sheet
190_widthdivb_ {_pagewidth_}
191_heightdivb_ {17}
192
193_httpicongsdl_ {_httpimg_/gsdl.gif}
194_widthgsdl_ {140}
195_heightgsdl_ {77}
196
197_httpiconitext_ {_httpimg_/itext.gif}
198_widthitext_ {16}
199_heightitext_ {21}
200
201_httpiconiworld_ {_httpimg_/iworld.gif}
202_widthiworld_ {16}
203_heightiworld_ {21}
204
205_httpiconiunknown_ {_httpimg_/iunknown.gif}
206_widthiunknown_ {16}
207_heightiunknown_ {21}
208
209_httpiconibtext_ {_httpimg_/ibtext.gif}
210_widthibtext_ {16}
211_heightibtext_ {21}
212
213_httpiconimpegvideo_ {_httpimg_/impegvid.gif}
214_widthimpegvideo_ {29}
215_heightimpegvideo_ {32}
216
217_httpiconiqtvideo_ {_httpimg_/iqtvideo.gif}
218_widthiqtvideo_ {29}
219_heightiqtvideo_ {32}
220
221_httpiconirmvideo_ {_httpimg_/irmvideo.gif}
222_widthirmvideo_ {29}
223_heightirmvideo_ {32}
224
225_httpiconless_ {_httpimg_/less.gif}
226_widthless_ {30}
227_heightless_ {16}
228
229_httpiconmore_ {_httpimg_/more.gif}
230_widthmore_ {30}
231_heightmore_ {16}
232
233_httpiconspacer_ {_httpimg_/spacer.gif}
234_widthspacer_ {42}
235_heightspacer_ {4}
236
237_httpicontabspace_ {_httpimg_/tabspace.gif}
238_widthtabspace_ {23}
239_heighttabspace_ {1}
240
241_httpicontspace_ {_httpimg_/bg_green.png}
242_heighttspace_ {17}
243
244_httpiconwarning_ {_httpimg_/warning.gif}
245_widthwarning_ {30}
246_heightwarning_ {29}
247
248_widthhhome_ {200}
249_heighthhome_ {57}
250
251_httpiconarrrght_ {_httpimg_/arrrght.gif}
252_widtharrrght_ {23}
253_heightarrrght_ {15}
254
255_httpiconopenbook_ {_httpimg_/openbook.gif}
256_widthopenbook_ {28}
257_heightopenbook_ {23}
258
259_httpiconaopenbk_ {_httpimg_/aopenbk.gif}
260_widthaopenbk_ {28}
261_heightaopenbk_ {23}
262
263_httpiconopenfldr_ {_httpimg_/openfldr.gif}
264_widthopenfldr_ {23}
265_heightopenfldr_ {15}
266
267_httpiconaopenfdr_ {_httpimg_/aopenfdr.gif}
268_widthaopenfdr_ {23}
269_heightaopenfdr_ {15}
270
271_httpiconbook_ {_httpimg_/book.gif}
272_widthbook_ {18}
273_heightbook_ {11}
274
275_httpiconabook_ {_httpimg_/abook.gif}
276_widthabook_ {18}
277_heightabook_ {11}
278
279_httpiconbshelf_ {_httpimg_/bshelf.gif}
280_widthbshelf_ {20}
281_heightbshelf_ {16}
282
283_httpiconabshelf_ {_httpimg_/abshelf.gif}
284_widthabshelf_ {20}
285_heightabshelf_ {16}
286
287_httpiconsmtext_ {_httpimg_/smtext.gif}
288_widthsmtext_ {23}
289_heightsmtext_ {15}
290
291_httpiconasmtext_ {_httpimg_/asmtext.gif}
292_widthasmtext_ {23}
293_heightasmtext_ {15}
294
295_httpiconclsdfldr_ {_httpimg_/clsdfldr.gif}
296_widthclsdfldr_ {23}
297_heightclsdfldr_ {15}
298
299_httpiconaclsdfdr_ {_httpimg_/aclsdfdr.gif}
300_widthaclsdfdr_ {23}
301_heightaclsdfdr_ {15}
302
303_httpiconimidi_ {_httpimg_/imidi.gif}
304_widthimidi_ {16}
305_heightimidi_ {21}
306
307_httpiconimsword_ {_httpimg_/imsword.gif}
308_widthimsword_ {26}
309_heightimsword_ {26}
310
311_httpiconimp3_ {_httpimg_/imp3.gif}
312_widthimp3_ {25}
313_heightimp3_ {20}
314
315_httpiconiogg_ {_httpimg_/iogg.gif}
316_widthiogg_ {32}
317_heightiogg_ {30}
318
319_httpiconipdf_ {_httpimg_/ipdf.gif}
320_widthipdf_ {26}
321_heightipdf_ {26}
322
323_httpiconips_ {_httpimg_/ips.gif}
324_widthips_ {25}
325_heightips_ {32}
326
327_httpiconippt_ {_httpimg_/ippt.gif}
328_widthippt_ {32}
329_heightippt_ {30}
330
331_httpiconirtf_ {_httpimg_/irtf.gif}
332_widthirtf_ {29}
333_heightirtf_ {32}
334
335_httpiconixls_ {_httpimg_/iexcel.gif}
336_widthixls_ {32}
337_heightixls_ {30}
338
339_httpiconspace_ {_httpimg_/space.gif}
340
341#######################################################################
342# Icons
343#
344# Must not include links (so they can be used as links). If you want to
345# include links use _image
346#######################################################################
347
348_iconnext_{<img src="_httpiconmore_" align="absbottom"
349width="_widthmore_" height="_heightmore_" border="0" alt="_texticonnext_" title="_texticonnext_">}
350_iconnext_[v=1] {_texticonnext_}
351
352_iconprev_{<img src="_httpiconless_" align="absbottom"
353width="_widthless_" height="_heightless_" border="0" alt="_texticonprev_" title="_texticonprev_">}
354_iconprev_[v=1] {_texticonprev_}
355
356_icontext_ {<img class="icon" src="_httpiconitext_" width="_widthitext_" height="_heightitext_" alt="_texticontext_" title="_texticontext_">}
357_icontext_[v=1] {_texticontext_}
358
359_iconworld_ {<img class="icon" src="_httpiconiworld_" width="_widthiworld_" height="_heightiworld_" alt="_texticonworld_" title="_texticonworld_">}
360_iconworld_[v=1] {_texticonworld_}
361
362_iconunknown_ {<img class="icon" src="_httpiconiunknown_" width="_widthiunknown_" height="_heightiunknown_" alt="_texticonunknown_" title="_texticonunknown_">}
363_iconunknown_[v=1] {_texticonunknown_}
364
365_iconblanktext_ {<img class="icon" src="_httpiconibtext_" width="_widthibtext_" height="_heightibtext_">}
366_iconblanktext_[v=1] {}
367
368_iconclosedbook_ {<img class="icon" src="_httpiconbook_" width="_widthbook_" height="_heightbook_" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
369_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
370_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
371
372_icondoc_ {<img class="icon" src="_httpiconimsword_" width="_widthimsword_" height="_heightimsword_" alt="_texticonmsword_" title="_texticonmsword_">}
373_icondoc_[v=1] {_texticonmsword_}
374
375_iconmp3_ {<img class="icon" src="_httpiconimp3_" width="_widthimp3_" height="_heightimp3_" alt="_texticonmp3_" title="_texticonmp3_">}
376_iconmp3_[v=1] {_texticonmp3_}
377
378_iconmidi_ {<img class="icon" src="_httpiconimidi_" width="_widthimidi_" height="_heightimidi_" alt="_texticonmidi_" title="_texticonmidi_">}
379_iconmidi_[v=1] {_texticonmidi_}
380
381_iconogg_ {<img class="icon" src="_httpiconiogg_" width="_widthiogg_" height="_heightiogg_" alt="_texticonogg_" title="_texticonogg_">}
382_iconogg_[v=1] {_texticonogg_}
383
384_iconpdf_ {<img class="icon" src="_httpiconipdf_" width="_widthipdf_" height="_heightipdf_" alt="_texticonpdf_" title="_texticonpdf_">}
385_iconpdf_[v=1] {_texticonpdf_}
386
387_iconps_ {<img class="icon" src="_httpiconips_" width="_widthips_" height="_heightips_" alt="_texticonps_" title="_texticonps_">}
388_iconps_[v=1] {_texticonps_}
389
390_iconppt_ {<img class="icon" src="_httpiconippt_" width="_widthippt_" height="_heightippt_" alt="_texticonppt_" title="_texticonppt_">}
391_iconppt_[v=1] {_texticonppt_}
392
393_iconrmvideo_ {<img class="icon" src="_httpiconirmvideo_" width="_widthirmvideo_" height="_heightirmvideo_" alt="_texticonrmvideo_" title="_texticonrmvideo_">}
394_iconrmvideo_[v=1] {_texticonrmvideo_}
395
396_iconrtf_ {<img class="icon" src="_httpiconirtf_" width="_widthirtf_" height="_heightirtf_" alt="_texticonrtf_" title="_texticonrtf_">}
397_iconrtf_[v=1] {_texticonrtf_}
398
399_iconxls_ {<img class="icon" src="_httpiconixls_" width="_widthixls_" height="_heightixls_" alt="_texticonxls_" title="_texticonxls_">}
400_iconxls_[v=1] {_texticonxls_}
401
402_icondocx_ {_icondoc_}
403_icondocx_[v=1] {_icondoc_}
404
405_iconpptx_ {_iconppt_}
406_iconpptx_[v=1] {_iconppt_}
407
408_iconxlsx_ {_iconxls_}
409_iconxlsx_[v=1] {_iconxls_}
410
411
412#######################################################################
413# Image links
414#
415# These might include a link (not like an _icon_
416#######################################################################
417
418
419_imagegreenstone_ {<img class="icon" src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" alt="_textdescrgreenstone_" title="_textdescrgreenstone_">}
420
421_imagegreenstone_[v=1] {_textdescrgreenstone_}
422
423###########################################################################
424# Metadata formatting stuff
425#
426#
427###########################################################################
428package format
429
430# _1_ is Year, _2_ is month, _3_ is day
431_date_ {_If_("_3_" ne "",_3_ )_If_("_2_" ne "",_textmonth_2__ )_If_("_1_" ne "",_1_)}
432
Note: See TracBrowser for help on using the browser.