From bb3bcfbb5f2627788d4ee498ddbd3b7024a2d326 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Tue, 1 Jan 2008 11:36:44 +0100 Subject: [PATCH 1/1] default theme, make sort-select box a template function --- phpfspot.class.php | 23 ++++++++++++++++------- themes/default/templates/search.tpl | 4 ++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index 80f02ed..40b6551 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -191,9 +191,9 @@ class PHPFSPOT { if(isset($_SESSION['from_date']) && isset($_SESSION['to_date'])) $this->tmpl->assign('date_search_enabled', true); + $this->tmpl->register_function("sort_select_list", array(&$this, "smarty_sort_select_list"), false); $this->tmpl->assign('from_date', $this->get_calendar('from')); $this->tmpl->assign('to_date', $this->get_calendar('to')); - $this->tmpl->assign('sort_field', $this->get_sort_field()); $this->tmpl->assign('content_page', 'welcome.tpl'); $this->tmpl->show("index.tpl"); @@ -1929,20 +1929,29 @@ class PHPFSPOT { /** * returns a select-dropdown box to select photo index sort parameters */ - private function get_sort_field() + public function smarty_sort_select_list($params, &$smarty) { $output = ""; + return $output; - } // get_sort_field() + } // smarty_sort_select_list() /** * returns the currently selected sort order diff --git a/themes/default/templates/search.tpl b/themes/default/templates/search.tpl index 760a265..e12a099 100644 --- a/themes/default/templates/search.tpl +++ b/themes/default/templates/search.tpl @@ -25,7 +25,7 @@ { else } { /if } - consider date-search + consider date-range @@ -46,7 +46,7 @@ Sort-Order: - {$sort_field} + { sort_select_list } -- 2.25.1