Changeset 1759
- Timestamp:
- 2000-12-07T13:06:32+13:00 (23 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/etc/main.cfg
r1725 r1759 1 # This is the main configuration file for configuring 2 # your Greenstone receptionist (i.e. the bit responsible 3 # for the way things are displayed). 4 5 # Email address of the webmaster of this Greenstone installation 1 6 maintainer [email protected] 2 7 8 # Outgoing (SMTP) mail server for this Greenstone installation. 9 # This will default to mail.maintainer-domain if it's not set 10 # (i.e. if maintainer is [email protected] then MailServer 11 # will default to mail.cs.waikato.ac.nz). If MailServer doesn't 12 # resolve to a valid SMTP server then the EmailEvents and 13 # EmailUserEvents options (see below) won't be functional. Likewise, 14 # turning off EmailEvents and EmailUserEvents will remove any 15 # reliance on MailServer. 16 #MailServer mail.cs.waikato.ac.nz 17 18 # Set status to "disabled" if you don't want the Maintenance and 19 # Administration facility to be available. 20 status enabled 21 22 # Set collector to "disabled" if you don't want the "collector" 23 # end-user collection building facility to be available. 24 collector enabled 25 26 # Set logcgiargs to true to keep a log of usage information in 27 # $GSDLHOME/etc/usage.txt. 28 logcgiargs false 29 30 # Set usecookies to true to use cookies to identify users (cookie 31 # information will be written to the usage log if logcgiargs is 32 # true). 33 usecookies false 34 35 # Log any events that Greenstone deems important in 36 # $GSDLHOME/etc/events.txt. 37 # The only events that are currently implemented come from the 38 # collector (e.g. someone just built/deleted the following collection) 39 # LogEvents may take values of: 40 # AllEvents: All important events 41 # CollectorEvents: Just those events originating from the collector 42 # (e.g. someone just built a collection) 43 # Disabled: Don't log events 44 LogEvents AllEvents 45 46 # Email the maintainer whenever any event occurs. EmailEvents 47 # takes the same values as LogEvents. 48 # Note that perl must be installed for EmailEvents or 49 # EmailUserEvents to work. 50 EmailEvents AllEvents 51 52 # In some cases it may be appropriate to email the user about a 53 # certain event (e.g. notification from the collector that a collection 54 # was built successfully) 55 EmailUserEvents true 56 57 58 # The list of display macro files used by this receptionist 3 59 macrofiles tip.dm style.dm base.dm query.dm help.dm pref.dm \ 4 60 about.dm document.dm status.dm authen.dm \ … … 8 64 port.dm home.dm collect.dm phind.dm 9 65 10 status enabled 11 usecookies false 12 logcgiargs false 66 # Define any additional page parameters to be used by the above macro files 67 # (the current default page parameters are c (collection) and l (language) 68 69 # Define v (version -- text or graphic) page parameter and give it a default 70 # value of 0 (0 = text version off) 13 71 pageparam v 0 72 73 # Set the precedence given to the page parameters. This effects which macro 74 # will be selected for display when there are multiple versions of the same 75 # macro with different page parameters. 76 # e.g. Given a macroprecedence of "c,v,l" and the following macro definitions: 77 # _content_ [] 78 # _content_ [l=en] 79 # _content_ [c=demo] 80 # _content_ [v=1] 81 # _content_ [l=fr,v=1,c=hdl] 82 # If the corresponding cgi arguments were set to l=en&v=1&c=hdl then the 83 # _content_[v=1] macro would be selected for display. It would be selected 84 # ahead of the _content_[l=en] macro because "v" has a higher precedence 85 # than "l". The _content_[l=fr,v=1,c=hdl] macro would not be selected 86 # because one of the page parameters is completely wrong ("l"). 14 87 macroprecedence c,v,l 88 89 90 # Define any additional cgi arguments. Most cgi arguments are built into 91 # Greenstone but it's possible to define them here (or set defaults for 92 # existing built-in cgi arguments). 93 94 # define the "v" cgi argument (to correspond to the "v" page parameter defined 95 # above). 15 96 cgiarg shortname=v longname=version multiplechar=false argdefault=0 \ 16 97 defaultstatus=weak savedarginfo=must 17 98 99 # set a default value for the built-in "a" cgi argument 18 100 cgiarg shortname=a argdefault=p 101 102 # set a default value for the built-in "p" cgi argument 103 cgiarg shortname=p argdefault=home -
trunk/gsdl/macros/home.dm
r1592 r1759 38 38 ####################################################################### 39 39 40 40 41 _imagecollector_ {_gsimage_(_httppagecollector_,_httpimg_/ccolof.gif,_httpimg_/ccolon.gif,col,The Collector)} 41 42 _imageadmin_ {_gsimage_(_httppagestatus_,_httpimg_/cadminof.gif,_httpimg_/cadminon.gif,admin,Administration Page)} … … 58 59 <p>_iconblankbar_ 59 60 </center> 61 _If_("_textgocollector__textgoadmin_" != "", 60 62 <p><table> 61 <tr valign=middle> 62 <td>_imagecollector_</td> 63 <td>Helps you create new collections, modify or add to existing ones, or 64 delete collections</td> 65 </tr> 66 <tr valign=middle> 67 <td>_imageadmin_</td> 68 <td>Allows you to add new users, summarizes the collections in the system, 69 gives technical information on the Greenstone installation</td> 70 </tr> 63 _textgocollector_ 64 _textgoadmin_ 71 65 </table> 72 66 <center> 73 67 <p>_iconblankbar_ 74 </center> 68 </center>) 75 69 76 70 <p><center><h2>_textprojhead_</h2></center> … … 102 96 } 103 97 98 99 # the _textgocollector_ and _textgoadmin_ macros may be overridden 100 # to be empty from within the receptionist if the collector or admin 101 # facilities are disabled 102 _textgocollector_ { 103 <tr valign=middle> 104 <td>_imagecollector_</td> 105 <td>Helps you create new collections, modify or add to existing ones, or 106 delete collections</td> 107 </tr> 108 } 109 110 _textgoadmin_ { 111 <tr valign=middle> 112 <td>_imageadmin_</td> 113 <td>Allows you to add new users, summarizes the collections in the system, 114 gives technical information on the Greenstone installation</td> 115 </tr> 116 } -
trunk/gsdl/src/recpt/collectoraction.cpp
r1679 r1759 45 45 46 46 recpt = NULL; 47 disabled = true; 47 48 do_mkcol = false; 48 49 gsdlosc = NULL; … … 220 221 if (pathc != NULL) delete pathc; 221 222 } 223 224 225 void collectoraction::configure (const text_t &key, const text_tarray &cfgline) { 226 if ((key == "collector") && (cfgline.size() == 1) && 227 (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) { 228 disabled = false; 229 } else { 230 // call the parent class to deal with the things which 231 // are not dealt with here 232 action::configure (key, cfgline); 233 } 234 } 235 222 236 223 237 bool collectoraction::init (ostream & /*logout*/) { … … 965 979 ostream &logout) { 966 980 981 // make sure the collector is enabled 982 if (disabled) { 983 textout << outconvert 984 << "<html>\n" 985 << "<head>\n" 986 << "<title>Collector disabled</title>\n" 987 << "</head>\n" 988 << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" " 989 << "alink=\"#cc9900\" vlink=\"#666633\">\n" 990 << "<h2>Facility disabled</h2>\n" 991 << "Sorry, the Collector end-user collection building facility is currently disabled\n" 992 << "\n</body>\n" 993 << "</html>\n"; 994 return true; 995 } 996 967 997 text_t &collector_page = args["cp"]; 968 998 text_t &collection = args["bc1dirname"]; -
trunk/gsdl/src/recpt/collectoraction.h
r1679 r1759 35 35 protected: 36 36 37 bool disabled; 37 38 receptionist *recpt; 38 39 char *gsdlosc; … … 86 87 virtual ~collectoraction (); 87 88 89 void configure (const text_t &key, const text_tarray &cfgline); 90 88 91 bool init (ostream &logout); 89 92 -
trunk/gsdl/src/recpt/pageaction.cpp
r1667 r1759 31 31 pageaction::pageaction () { 32 32 33 status_disabled = true; 34 collector_disabled = true; 33 35 recpt = NULL; 34 36 … … 97 99 bool first = true; 98 100 while (collist_here != collist_end) { 99 100 101 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 101 102 … … 117 118 118 119 if (!response.docInfo[0].metadata["iconcollectionsmall"].values[0].empty()) 119 120 121 120 collectionname = "<img width=150 border=1 src=\"" 121 + response.docInfo[0].metadata["iconcollectionsmall"].values[0] 122 + "\" alt=\"" + alt + "\">"; 122 123 else if (!response.docInfo[0].metadata["iconcollection"].values[0].empty()) 123 124 collectionname = "<img width=150 border=1 src=\"" … … 126 127 else collectionname = alt; 127 128 } 128 129 129 if ((count%3 == 0) && (!first)) 130 130 homeextra += "</tr><tr valign=top>\n"; … … 145 145 } 146 146 } 147 148 147 collist_here ++; 149 148 } … … 162 161 homeextra += "</tr></table></center>\n"; 163 162 disp.setmacro ("homeextra", "home", homeextra); 164 165 163 } 166 164 … … 208 206 // _textreadingdocs_ collection it is (e.g. html collection, bibliographic collection etc.) 209 207 // _texthelpreadingdocs_ 208 209 // _textgocollector_ set to "" if collector is disabled in main.cfg 210 // _textgoadmin_ set to "" if status is disabled in main.cfg 210 211 211 212 … … 231 232 } 232 233 233 if (arg_p == "home") set_homeextra_macro (disp, protos, logout); 234 if (arg_p == "home") { 235 set_homeextra_macro (disp, protos, logout); 236 if (status_disabled) disp.setmacro ("textgoadmin", "home", ""); 237 if (collector_disabled) disp.setmacro ("textgocollector", "home", ""); 238 } 234 239 235 240 else if (arg_p == "preferences") { … … 433 438 return true; 434 439 } 440 441 void pageaction::configure (const text_t &key, const text_tarray &cfgline) { 442 if ((key == "status") && (cfgline.size() == 1) && 443 (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) { 444 status_disabled = false; 445 } else if ((key == "collector") && (cfgline.size() == 1) && 446 (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) { 447 collector_disabled = false; 448 } else { 449 // call the parent class to deal with the things which 450 // are not dealt with here 451 action::configure (key, cfgline); 452 } 453 } -
trunk/gsdl/src/recpt/pageaction.h
r1285 r1759 64 64 ostream &logout); 65 65 66 void configure (const text_t &key, const text_tarray &cfgline); 67 66 68 protected: 67 69 void set_homeextra_macro (displayclass &disp, recptprotolistclass *protos, 68 70 ostream &logout); 71 72 bool status_disabled; 73 bool collector_disabled; 69 74 70 75 }; -
trunk/gsdl/src/recpt/statusaction.cpp
r1285 r1759 903 903 // make sure the status function is enabled 904 904 if (disabled) { 905 output_errorpage (outconvert, textout, logout, 906 "The status action is disabled. " 907 "See the documentation (what documentation!) on how " 908 "to enable it."); 905 textout << outconvert 906 << "<html>\n" 907 << "<head>\n" 908 << "<title>Status disabled</title>\n" 909 << "</head>\n" 910 << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" " 911 << "alink=\"#cc9900\" vlink=\"#666633\">\n" 912 << "<h2>Facility disabled</h2>\n" 913 << "Sorry, the Maintenance and Administration facility is currently disabled\n" 914 << "\n</body>\n" 915 << "</html>\n"; 909 916 return true; 910 917 }
Note:
See TracChangeset
for help on using the changeset viewer.