home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / server / netbrilliant / nb110.exe / DATA1.CAB / Data_files / scripts / mercata.cham < prev    next >
Encoding:
Text File  |  2000-10-30  |  1.8 KB  |  70 lines

  1. infocenter Mercata {
  2. action:
  3.   Init;       // Required for all infocenters.
  4.  
  5.   Search;     // Required for NetBrilliant.
  6.   
  7. field:
  8.   URL;       // All these are required for NetBrilliant.
  9.   Title;
  10.   Price;
  11.   Bids;
  12.   Ends;
  13.  
  14.   nextpage;  // Required - this is where the value for whether
  15.              // or not there is another page of data goes.
  16. }
  17.  
  18. Mercata::Init
  19. {
  20.   // Set initialization parameters.
  21.   // NetBrilliant will access these to learn about this
  22.   // infocenter.
  23.  
  24.   Category = "Auctions";
  25.   Bitmap = "images\auctions.bmp";
  26.   IndexOrder = 0;
  27.   IDNumber = 0;            // For convenience, make the same as the IndexOrder
  28.   SiteName = "Mercata";
  29.  
  30.   // These are the column titles in the search results
  31.   // window.  If a field is not covered here, it will
  32.   // not appear in the window.
  33.  
  34.   FieldName.Title = "Item";
  35.   FieldName.Price = "Price";
  36.   FieldName.Bids = "Bids";
  37.   FieldName.Ends = "Ending time (PDT)";
  38. }
  39.  
  40. // Searches Mercata.com
  41. Mercata::Search
  42. {
  43.   // QueryURL is the formatting parameter for constructing
  44.   // the query URL.  Members include "base", "term", "midterm",
  45.   // and "end"
  46.  
  47.   QueryURL.base = "http://www.mercata.com/cgi-bin/mercata/mercata/v2/pages/search.jsp?search_text=";
  48.   QueryURL.term = "<term>";
  49.   QueryURL.midterm = "+";
  50.   QueryURL.page = "&p=<page>";
  51.  
  52.   ParseSpec.entrystart = "<td width=\"70%\">";
  53.  
  54.   ParseSpec.termstart.URL = "href=\"details.jsp?";
  55.   ParseSpec.termstart.URL.prepend = "http://www.mercata.com/cgi-bin/mercata/mercata/v2/pages/";
  56.   ParseSpec.termend.URL = "\">";
  57.  
  58.   ParseSpec.termstart.Title = "";
  59.   ParseSpec.termstart.Title.offset = 2;
  60.   ParseSpec.termend.Title = "</a>";
  61.  
  62.   ParseSpec.termstart.Price = "Price:";
  63.   ParseSpec.termstart.Price.offset = 6;
  64.   ParseSpec.termend.Price = "</b>";
  65.   
  66.   ParseSpec.nextpage = "Next</a>";
  67. }
  68.  
  69.   
  70.