Ignore:
Timestamp:
2000-12-07T13:06:32+13:00 (23 years ago)
Author:
sjboddie
Message:

Made a start on tidying up the main.cfg configuration file and adding a
few more options to it. Some of the options I've added to the file but
have yet to implement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/pageaction.cpp

    r1667 r1759  
    3131pageaction::pageaction () {
    3232
     33  status_disabled = true;
     34  collector_disabled = true;
    3335  recpt = NULL;
    3436
     
    9799    bool first = true;
    98100    while (collist_here != collist_end) {
    99      
    100101      ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout);
    101102     
     
    117118       
    118119        if (!response.docInfo[0].metadata["iconcollectionsmall"].values[0].empty())
    119             collectionname = "<img width=150 border=1 src=\""
    120               + response.docInfo[0].metadata["iconcollectionsmall"].values[0]
    121               + "\" alt=\"" + alt + "\">";
     120          collectionname = "<img width=150 border=1 src=\""
     121            + response.docInfo[0].metadata["iconcollectionsmall"].values[0]
     122            + "\" alt=\"" + alt + "\">";
    122123        else if (!response.docInfo[0].metadata["iconcollection"].values[0].empty())
    123124          collectionname = "<img width=150 border=1 src=\""
     
    126127        else collectionname = alt;
    127128          }
    128        
    129129          if ((count%3 == 0) && (!first))
    130130        homeextra += "</tr><tr valign=top>\n";
     
    145145        }
    146146      }
    147      
    148147      collist_here ++;
    149148    }
     
    162161  homeextra += "</tr></table></center>\n";
    163162  disp.setmacro ("homeextra", "home", homeextra);
    164 
    165163}
    166164
     
    208206  // _textreadingdocs_     collection it is (e.g. html collection, bibliographic collection etc.)
    209207  // _texthelpreadingdocs_
     208
     209  // _textgocollector_     set to "" if collector is disabled in main.cfg
     210  // _textgoadmin_         set to "" if status is disabled in main.cfg
    210211
    211212 
     
    231232  }
    232233
    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  }
    234239
    235240  else if (arg_p == "preferences") {
     
    433438  return true;
    434439}
     440
     441void 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}
Note: See TracChangeset for help on using the changeset viewer.