Index: trunk/gsdl/etc/main.cfg
===================================================================
--- trunk/gsdl/etc/main.cfg	(revision 1758)
+++ trunk/gsdl/etc/main.cfg	(revision 1759)
@@ -1,4 +1,60 @@
+# This is the main configuration file for configuring
+# your Greenstone receptionist (i.e. the bit responsible
+# for the way things are displayed).
+
+# Email address of the webmaster of this Greenstone installation
 maintainer      greenstone@cs.waikato.ac.nz
 
+# Outgoing (SMTP) mail server for this Greenstone installation.
+# This will default to mail.maintainer-domain if it's not set
+# (i.e. if maintainer is greenstone@cs.waikato.ac.nz then MailServer
+# will default to mail.cs.waikato.ac.nz). If MailServer doesn't
+# resolve to a valid SMTP server then the EmailEvents and
+# EmailUserEvents options (see below) won't be functional. Likewise,
+# turning off EmailEvents and EmailUserEvents will remove any 
+# reliance on MailServer.
+#MailServer mail.cs.waikato.ac.nz
+
+# Set status to "disabled" if you don't want the Maintenance and
+# Administration facility to be available.
+status          enabled
+
+# Set collector to "disabled" if you don't want the "collector"
+# end-user collection building facility to be available.
+collector       enabled
+
+# Set logcgiargs to true to keep a log of usage information in
+# $GSDLHOME/etc/usage.txt.
+logcgiargs      false
+
+# Set usecookies to true to use cookies to identify users (cookie 
+# information will be written to the usage log if logcgiargs is
+# true).
+usecookies      false
+
+# Log any events that Greenstone deems important in 
+# $GSDLHOME/etc/events.txt. 
+# The only events that are currently implemented come from the 
+# collector (e.g. someone just built/deleted the following collection)
+# LogEvents may take values of:
+# AllEvents: All important events
+# CollectorEvents: Just those events originating from the collector
+#                  (e.g. someone just built a collection)
+# Disabled: Don't log events
+LogEvents       AllEvents
+
+# Email the maintainer whenever any event occurs. EmailEvents
+# takes the same values as LogEvents.
+# Note that perl must be installed for EmailEvents or
+# EmailUserEvents to work.
+EmailEvents     AllEvents
+
+# In some cases it may be appropriate to email the user about a
+# certain event (e.g. notification from the collector that a collection
+# was built successfully)
+EmailUserEvents true
+
+
+# The list of display macro files used by this receptionist
 macrofiles      tip.dm style.dm base.dm query.dm help.dm pref.dm \
                 about.dm document.dm status.dm authen.dm \
@@ -8,11 +64,40 @@
 		port.dm home.dm collect.dm phind.dm
 
-status          enabled
-usecookies      false
-logcgiargs      false
+# Define any additional page parameters to be used by the above macro files
+# (the current default page parameters are c (collection) and l (language)
+
+# Define v (version -- text or graphic) page parameter and give it a default
+# value of 0 (0 = text version off)
 pageparam       v 0
+
+# Set the precedence given to the page parameters. This effects which macro 
+# will be selected for display when there are multiple versions of the same 
+# macro with different page parameters.
+# e.g. Given a macroprecedence of "c,v,l" and the following macro definitions:
+# _content_ []
+# _content_ [l=en]
+# _content_ [c=demo]
+# _content_ [v=1]
+# _content_ [l=fr,v=1,c=hdl]
+# If the corresponding cgi arguments were set to l=en&v=1&c=hdl then the
+# _content_[v=1] macro would be selected for display. It would be selected 
+# ahead of the _content_[l=en] macro because "v" has a higher precedence 
+# than "l". The _content_[l=fr,v=1,c=hdl] macro would not be selected 
+# because one of the page parameters is completely wrong ("l").
 macroprecedence c,v,l
+
+
+# Define any additional cgi arguments. Most cgi arguments are built into
+# Greenstone but it's possible to define them here (or set defaults for
+# existing built-in cgi arguments).
+
+# define the "v" cgi argument (to correspond to the "v" page parameter defined
+# above).
 cgiarg          shortname=v longname=version multiplechar=false argdefault=0 \
                 defaultstatus=weak savedarginfo=must
 
+# set a default value for the built-in "a" cgi argument
 cgiarg          shortname=a argdefault=p
+
+# set a default value for the built-in "p" cgi argument
+cgiarg          shortname=p argdefault=home
Index: trunk/gsdl/macros/home.dm
===================================================================
--- trunk/gsdl/macros/home.dm	(revision 1758)
+++ trunk/gsdl/macros/home.dm	(revision 1759)
@@ -38,4 +38,5 @@
 #######################################################################
 
+
 _imagecollector_ {_gsimage_(_httppagecollector_,_httpimg_/ccolof.gif,_httpimg_/ccolon.gif,col,The Collector)}
 _imageadmin_ {_gsimage_(_httppagestatus_,_httpimg_/cadminof.gif,_httpimg_/cadminon.gif,admin,Administration Page)}
@@ -58,19 +59,12 @@
 <p>_iconblankbar_
 </center>
+_If_("_textgocollector__textgoadmin_" != "",
 <p><table>
-<tr valign=middle>
-<td>_imagecollector_</td>
-<td>Helps you create new collections, modify or add to existing ones, or
-delete collections</td>
-</tr>
-<tr valign=middle>
-<td>_imageadmin_</td>
-<td>Allows you to add new users, summarizes the collections in the system,
-gives technical information on the Greenstone installation</td>
-</tr>
+_textgocollector_
+_textgoadmin_
 </table>
 <center>
 <p>_iconblankbar_
-</center>
+</center>)
 
 <p><center><h2>_textprojhead_</h2></center>
@@ -102,2 +96,21 @@
 }
 
+
+# the _textgocollector_ and _textgoadmin_ macros may be overridden
+# to be empty from within the receptionist if the collector or admin
+# facilities are disabled
+_textgocollector_ {
+<tr valign=middle>
+<td>_imagecollector_</td>
+<td>Helps you create new collections, modify or add to existing ones, or
+delete collections</td>
+</tr>
+}
+
+_textgoadmin_ {
+<tr valign=middle>
+<td>_imageadmin_</td>
+<td>Allows you to add new users, summarizes the collections in the system,
+gives technical information on the Greenstone installation</td>
+</tr>
+}
Index: trunk/gsdl/src/recpt/collectoraction.cpp
===================================================================
--- trunk/gsdl/src/recpt/collectoraction.cpp	(revision 1758)
+++ trunk/gsdl/src/recpt/collectoraction.cpp	(revision 1759)
@@ -45,4 +45,5 @@
 
   recpt = NULL;
+  disabled = true;
   do_mkcol = false;
   gsdlosc = NULL;
@@ -220,4 +221,17 @@
   if (pathc != NULL) delete pathc;
 }
+
+
+void collectoraction::configure (const text_t &key, const text_tarray &cfgline) {
+  if ((key == "collector") && (cfgline.size() == 1) && 
+      (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) {
+    disabled = false;
+  } else {
+    // call the parent class to deal with the things which
+    // are not dealt with here
+    action::configure (key, cfgline);
+  }
+}
+
 
 bool collectoraction::init (ostream & /*logout*/) {
@@ -965,4 +979,20 @@
 				 ostream &logout) {
 
+  // make sure the collector is enabled
+  if (disabled) {
+    textout << outconvert 
+	    << "<html>\n"
+	    << "<head>\n"
+	    << "<title>Collector disabled</title>\n"
+	    << "</head>\n"
+	    << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" "
+	    << "alink=\"#cc9900\" vlink=\"#666633\">\n"
+	    << "<h2>Facility disabled</h2>\n" 
+	    << "Sorry, the Collector end-user collection building facility is currently disabled\n"
+	    << "\n</body>\n"
+	    << "</html>\n";
+    return true;
+  }
+
   text_t &collector_page = args["cp"];
   text_t &collection = args["bc1dirname"];
Index: trunk/gsdl/src/recpt/collectoraction.h
===================================================================
--- trunk/gsdl/src/recpt/collectoraction.h	(revision 1758)
+++ trunk/gsdl/src/recpt/collectoraction.h	(revision 1759)
@@ -35,4 +35,5 @@
 protected:
 
+  bool disabled;
   receptionist *recpt;
   char *gsdlosc;
@@ -86,4 +87,6 @@
   virtual ~collectoraction ();
 
+  void configure (const text_t &key, const text_tarray &cfgline);
+
   bool init (ostream &logout);
 
Index: trunk/gsdl/src/recpt/pageaction.cpp
===================================================================
--- trunk/gsdl/src/recpt/pageaction.cpp	(revision 1758)
+++ trunk/gsdl/src/recpt/pageaction.cpp	(revision 1759)
@@ -31,4 +31,6 @@
 pageaction::pageaction () {
 
+  status_disabled = true;
+  collector_disabled = true;
   recpt = NULL;
 
@@ -97,5 +99,4 @@
 	bool first = true;
 	while (collist_here != collist_end) {
-	  
 	  ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout);
 	  
@@ -117,7 +118,7 @@
 		
 		if (!response.docInfo[0].metadata["iconcollectionsmall"].values[0].empty())
-		    collectionname = "<img width=150 border=1 src=\""
-		      + response.docInfo[0].metadata["iconcollectionsmall"].values[0]
-		      + "\" alt=\"" + alt + "\">";
+		  collectionname = "<img width=150 border=1 src=\""
+		    + response.docInfo[0].metadata["iconcollectionsmall"].values[0]
+		    + "\" alt=\"" + alt + "\">";
 		else if (!response.docInfo[0].metadata["iconcollection"].values[0].empty())
 		  collectionname = "<img width=150 border=1 src=\""
@@ -126,5 +127,4 @@
 		else collectionname = alt;
 	      }
-		
 	      if ((count%3 == 0) && (!first))
 		homeextra += "</tr><tr valign=top>\n";
@@ -145,5 +145,4 @@
 	    }
 	  }
-	  
 	  collist_here ++;
 	}
@@ -162,5 +161,4 @@
   homeextra += "</tr></table></center>\n";
   disp.setmacro ("homeextra", "home", homeextra); 
-
 }
 
@@ -208,4 +206,7 @@
   // _textreadingdocs_     collection it is (e.g. html collection, bibliographic collection etc.)
   // _texthelpreadingdocs_ 
+
+  // _textgocollector_     set to "" if collector is disabled in main.cfg
+  // _textgoadmin_         set to "" if status is disabled in main.cfg
 
   
@@ -231,5 +232,9 @@
   }
 
-  if (arg_p == "home") set_homeextra_macro (disp, protos, logout);
+  if (arg_p == "home") {
+    set_homeextra_macro (disp, protos, logout);
+    if (status_disabled) disp.setmacro ("textgoadmin", "home", "");
+    if (collector_disabled) disp.setmacro ("textgocollector", "home", "");
+  }
 
   else if (arg_p == "preferences") {
@@ -433,2 +438,16 @@
   return true;
 }
+
+void pageaction::configure (const text_t &key, const text_tarray &cfgline) {
+  if ((key == "status") && (cfgline.size() == 1) && 
+      (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) {
+    status_disabled = false;
+  } else if ((key == "collector") && (cfgline.size() == 1) && 
+	     (cfgline[0] == "true" || cfgline[0] == "on" || cfgline[0] == "enabled")) {
+    collector_disabled = false;
+  } else {
+    // call the parent class to deal with the things which
+    // are not dealt with here
+    action::configure (key, cfgline);
+  }
+}
Index: trunk/gsdl/src/recpt/pageaction.h
===================================================================
--- trunk/gsdl/src/recpt/pageaction.h	(revision 1758)
+++ trunk/gsdl/src/recpt/pageaction.h	(revision 1759)
@@ -64,7 +64,12 @@
 		  ostream &logout);
 
+  void configure (const text_t &key, const text_tarray &cfgline);
+
 protected:
   void set_homeextra_macro (displayclass &disp, recptprotolistclass *protos, 
 			    ostream &logout);
+
+  bool status_disabled;
+  bool collector_disabled;
 
 };
Index: trunk/gsdl/src/recpt/statusaction.cpp
===================================================================
--- trunk/gsdl/src/recpt/statusaction.cpp	(revision 1758)
+++ trunk/gsdl/src/recpt/statusaction.cpp	(revision 1759)
@@ -903,8 +903,15 @@
   // make sure the status function is enabled
   if (disabled) {
-    output_errorpage (outconvert, textout, logout, 
-		      "The status action is disabled. "
-		      "See the documentation (what documentation!) on how "
-		      "to enable it.");
+    textout << outconvert 
+	    << "<html>\n"
+	    << "<head>\n"
+	    << "<title>Status disabled</title>\n"
+	    << "</head>\n"
+	    << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" "
+	    << "alink=\"#cc9900\" vlink=\"#666633\">\n"
+	    << "<h2>Facility disabled</h2>\n" 
+	    << "Sorry, the Maintenance and Administration facility is currently disabled\n"
+	    << "\n</body>\n"
+	    << "</html>\n";
     return true;
   }
