Ignore:
Timestamp:
2004-06-16T09:48:55+12:00 (20 years ago)
Author:
mdewsnip
Message:

"I'm feeling lucky" functionality (a la Google). An extra argument ("ifl") can be specified to a query -- in this case, the user will be taken directly to the first matching document.

You can add a checkbox to the query form to get this functionality:

<input type=checkbox name="ifl">I'm feeling lucky!

This functionality is also very useful to go directly from some key value (eg. a unique file name) to a document, from within format statements. This removes the need to know the HASH ID of the target document.

File:
1 edited

Legend:

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

    r7509 r7594  
    848848
    849849    contentout << text_t2ascii << "Content-type: " << response_data << "\n\n";
    850   } else {
     850  }
     851  else if (response == undecided_location) {
     852    // Wait until later to output the target location
     853    // Used for the "I'm feeling lucky" functionality
     854  }
     855  else {
    851856    // unknown response
    852857    logout << "Error: get_cgihead_info returned an unknown response type.\n";
Note: See TracChangeset for help on using the changeset viewer.