]> git.decadent.org.uk Git - memories.git/commitdiff
Add "Highest rated".
authorSimon Cozens <simon@simon-cozens.org>
Sat, 10 Feb 2007 12:35:27 +0000 (12:35 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Sat, 10 Feb 2007 12:35:27 +0000 (12:35 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@24 041978f6-d955-411f-a9d7-1d8545c9c3c7

Memories/Photo.pm
templates/nav
templates/recent.rss
templates/rhs

index 5af62e9dd57af4dea02cac11fea01a196bc613e0..e5cb9a0d51cad0d9c73f743ed312bf2f14459868 100644 (file)
@@ -14,6 +14,7 @@ BEGIN {
 my %order_by = (
      recent => "uploaded",
      popular => "hit_count",
+     rated => "rating/(1+rated)",
      interesting => INTERESTINGNESS_ALGORITHM,
      random => "rand()"
 );
index f42bb061cf824d99fabec8e4cb6cf283308f4886..9d8ead02fc415c0dd50bd50d453ec72fc9742d5e 100644 (file)
@@ -2,7 +2,7 @@
 <table width="100%"><tr><td align="left">
 <a href="[%base%]"><img src="[%base%]/static/memories.png"/></a>
 </td><td align="right">
-[% FOR photo = request.recent_uploads %]
+[% FOR photo = request.recent %]
         <a href="[%base%]/photo/view/[%photo.id%]">
         <img src="[% photo.thumb_url |uri%]" alt="[%photo.title|html%]"/>
         </a>
index 51be5822a059653579812f2dcdb1ad5331981f19..311187cd5eade2d31a3e8bd016711da9dc1fe40c 100644 (file)
@@ -4,7 +4,7 @@
         <title>Memories photostream</title>
         <link>[%base%]</link>
         <description>Recent photos from [%base %]</description>
-[% FOR photo = request.recent_uploads %]
+[% FOR photo = request.recent %]
     <item>
         <title>[%photo.title|html%]</title>
         <pubDate>[%photo.shot.strftime("%a, %d %b %Y %H:%M:%S %z") %]</pubDate>
index ab576dc0f0d649fdd3532ad9b58649a013958944..76c9ad7048819264b5699fe0893f1031d8291300 100644 (file)
@@ -20,6 +20,9 @@
 <td><a href="[%base%]/photo/popular">Most popular</a></td>
 </tr>
 <tr>
+<td><a href="[%base%]/photo/rated">Highest rated</a></td>
+</tr>
+<tr>
 <td><a href="[%base%]/photo/interesting">Most interesting</a></td>
 </tr>
 <tr>