From f13b769823b6bd8bc9006e12970bec48969cb695 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 10 Feb 2007 12:35:27 +0000 Subject: [PATCH] Add "Highest rated". git-svn-id: http://svn.simon-cozens.org/memories/trunk@24 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Memories/Photo.pm | 1 + templates/nav | 2 +- templates/recent.rss | 2 +- templates/rhs | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Memories/Photo.pm b/Memories/Photo.pm index 5af62e9..e5cb9a0 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -14,6 +14,7 @@ BEGIN { my %order_by = ( recent => "uploaded", popular => "hit_count", + rated => "rating/(1+rated)", interesting => INTERESTINGNESS_ALGORITHM, random => "rand()" ); diff --git a/templates/nav b/templates/nav index f42bb06..9d8ead0 100644 --- a/templates/nav +++ b/templates/nav @@ -2,7 +2,7 @@ + + + -- 2.39.2
-[% FOR photo = request.recent_uploads %] +[% FOR photo = request.recent %] [%photo.title|html%] diff --git a/templates/recent.rss b/templates/recent.rss index 51be582..311187c 100644 --- a/templates/recent.rss +++ b/templates/recent.rss @@ -4,7 +4,7 @@ Memories photostream [%base%] Recent photos from [%base %] -[% FOR photo = request.recent_uploads %] +[% FOR photo = request.recent %] [%photo.title|html%] [%photo.shot.strftime("%a, %d %b %Y %H:%M:%S %z") %] diff --git a/templates/rhs b/templates/rhs index ab576dc..76c9ad7 100644 --- a/templates/rhs +++ b/templates/rhs @@ -20,6 +20,9 @@ Most popular
Highest rated
Most interesting