From b4bca043ac01c1889b526302a9be619d98832df0 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 22 Apr 2009 05:31:29 +0000 Subject: Added method to determine proportion of current thumb_size to the default, 150. Use this in the the default theme, or any other, to reduce the size of CSS widths and heights in albums, including .gItem. --- core/controllers/albums.php | 10 ++++++++++ themes/default/views/page.html.php | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/core/controllers/albums.php b/core/controllers/albums.php index adf59c02..b580bcca 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -63,6 +63,7 @@ class Albums_Controller extends Items_Controller { $template->set_global("children", $album->viewable()->children($page_size, $offset)); $template->set_global("children_count", $children_count); $template->set_global("parents", $album->parents()); + $template->set_global("thumb_proportion", $this->thumb_proportion()); $template->content = new View("album.html"); $album->view_count++; @@ -209,4 +210,13 @@ class Albums_Controller extends Items_Controller { print album::get_edit_form($album); } + + /** + * Proportion of the current thumb_size's to default + * @return int + */ + public function thumb_proportion() { + return module::get_var("core", "thumb_size", 150) / 150; + } + } diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 893e6f9b..e9672dcb 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -13,6 +13,7 @@ + page_type ?> " type="image/x-icon" /> " @@ -27,6 +28,19 @@ " media="screen,print,projection" /> + page_type == 'album'): ?> + + + + + + -- cgit v1.2.3