auto-move browser window up when displaying single photo and the user has scrolled...
[phpfspot.git] / phpfspot.class.php
index 8646ff1d0b06f8bd7d9f8629f86a40b715f479bf..85d276e104d29a09a792cae3b5f59d004f83017c 100644 (file)
@@ -116,7 +116,7 @@ class PHPFSPOT {
          $_SESSION['tag_condition'] = 'or';
 
       if(!isset($_SESSION['sort_order']))
-         $_SESSION['sort_order'] = 'date_asc';
+         $_SESSION['sort_order'] = 'date_desc';
 
       if(!isset($_SESSION['searchfor_tag']))
          $_SESSION['searchfor_tag'] = '';
@@ -520,6 +520,8 @@ class PHPFSPOT {
 
       $this->tmpl->show("single_photo.tpl");
 
+      print "<script language=\"JavaScript\">self.location.hash = '#image';</script>\n";
+
    } // showPhoto()
 
    /**