Files/WhatsNew

From EPrints Documentation
Jump to: navigation, search

The last inserted papers listed in home page

Many users ask to have the last inserted papers in the home page. The number of papers every day is too huge to simply insert all the papers of the day. So the selection is done in this way: "Give me the last 8 paper from a fixed date sort by date and by eprint number". If in a day there are more than 8 paper approved, the system shows the eprints with the higher numbers. The key lines of the SSI are:

my $year        = '2006-02-16-';
#change $n to modify the window size
my $n           = 8;
my $searchexp = new EPrints::SearchExpression(
       session => $session,
       dataset => $ds,
       custom_order => '-datestamp/-eprintid' );

The SSI is written starting from code of Aneesh Joy (NCSI, IISC). You can download the code from http://eprints.rclis.org/fixsoft/whatsnew.pl.gz