Changeset 1804


Ignore:
Timestamp:
2000-12-18T17:17:57+13:00 (23 years ago)
Author:
paynter
Message:

Changed phind classifier so that its HTML is generated by documentaction,
instead of pageaction. This ensures that the macros it requires are set
properly and makes it consistant with the other classifiers. But what a
waste of my time it was.

Location:
trunk/gsdl
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/document.dm

    r1696 r1804  
    55#######################################################################
    66
    7 _classificationlinks_ {}
    87_imagethispage_ {}
    98_httpprevarrow_ {}
    109_httpnextarrow_ {}
    1110_pagetitle_ {}
     11_phindclassifier_ {}
    1212
    1313#######################################################################
     
    1919_navigationbar_
    2020<p>
    21 _classificationlinks_
     21_phindclassifier_
    2222</center>
    2323}
     
    6262_textnumpages_ {&nbsp;<i>(_1_ _pages_)</i>}
    6363_parentarrow_ {}
     64
     65
     66#######################################################################
     67# the phind applet
     68#
     69# The phind applet is only required on phind classifier pages.
     70# Consequently, the _phindclassifier_ macro is not usually set.  On screens
     71# where it is required, _phindclassifier_ resolves to _phindapplet_, and
     72# the following macro is loaded into the web page.
     73#######################################################################
     74
     75_phindapplet_ {
     76<APPLET CODEBASE="_httpprefix_/src/phind/client" CODE="Phind.class" WIDTH=500 HEIGHT=400>
     77  <PARAM NAME=library      VALUE="_gwcgi_">
     78  <PARAM NAME=phindcgi     VALUE="phindcgi">
     79  <PARAM NAME=backdrop     VALUE="_httpimg_/phindbg1.jpg">
     80  <PARAM NAME=collection   VALUE="_cgiargc_">
     81  <PARAM NAME=orientation  VALUE="vertical">
     82  <PARAM NAME=depth        VALUE="2">
     83  <PARAM NAME=fontsize     VALUE="12">
     84  <PARAM NAME=blocksize    VALUE="10">
     85  The Phind java applet.
     86</APPLET>
     87}
    6488
    6589
  • trunk/gsdl/src/recpt/documentaction.cpp

    r1610 r1804  
    605605      text_t classtop;
    606606      get_top (arg_cl, classtop);
     607      metadata.insert ("childtype");
     608
    607609      if (get_info (classtop, collection, metadata, false, collectproto, response, logout)) {
    608610     
     
    623625      disp.setmacro ("pagetitle", "document", "_text" + title + "page_");
    624626      disp.setmacro ("imagethispage", "document", "_icon" + title + "page_");
     627    }
     628
     629        // Add a macro to display the phind classifier (if appropriate)
     630    text_t &childtype = response.docInfo[0].metadata["childtype"].values[0];
     631    if (childtype == "Phind") {
     632      disp.setmacro ("phindclassifier", "document", "_phindapplet_");
    625633    }
    626634      }
  • trunk/gsdl/src/recpt/phindbrowserclass.cpp

    r1643 r1804  
    4141}
    4242
    43 // redirect to Phind web page
    44 // I don't really understand what I'm doing here.  Oh well.
     43// display a document
    4544void phindbrowserclass::processOID (cgiargsclass &args, recptproto *collectproto,
    4645                   ostream &logout) {
     
    5958
    6059  if (err != noError || response.docInfo[0].OID.empty()) return;
    61 
    62   // redirect to html page
    63   args["a"] = "p";
    64   args["p"] = "phind";
    65   args["hp"] = response.docInfo[0].OID;
    6660}
Note: See TracChangeset for help on using the changeset viewer.