X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=d2bb907009a9a29d98809247f7699b1aecb65425;hp=f64e9ff2ef70f7d7195b5f811205cd72512660d0;hb=4eb1005353a0d5cb65b329338d7bcccb07e2e677;hpb=3d867f5190b42114820df35143a46c8bc8521404 diff --git a/phpfspot.class.php b/phpfspot.class.php index f64e9ff..d2bb907 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -223,6 +223,11 @@ class PHPFSPOT { if(isset($_SESSION['begin_with']) && $this->cfg->thumbs_per_page == 0) unset($_SESSION['begin_with']); + // if user-friendly-url's are enabled, set also a flag for the template handler + if($this->is_user_friendly_url()) { + $this->tmpl->assign('user_friendly_url', 'true'); + } + } // __construct() public function __destruct() @@ -311,8 +316,8 @@ class PHPFSPOT { $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('search_from_date', $this->get_calendar('from')); + $this->tmpl->assign('search_to_date', $this->get_calendar('to')); $this->tmpl->assign('preset_selected_tags', $this->getSelectedTags()); $this->tmpl->assign('preset_available_tags', $this->getAvailableTags()); @@ -867,7 +872,7 @@ class PHPFSPOT { } // resetTags() /** - * returns the value for the autocomplet tag-search + * returns the value for the autocomplete tag-search * @return string */ public function get_xml_tag_list() @@ -1294,7 +1299,16 @@ class PHPFSPOT { else $style = ""; - $select = "is_user_friendly_url()) { + $select = "cfg->web_path ."/tag/205/". $start_with ."\""; + } + else { + $select = "cfg->web_path ."/index.php?mode=showpi tags=". $current_tags ." begin_with=". $begin_with ."\""; + } + $select.= " onclick=\"showPhotoIndex(". $start_with ."); return false;\""; + if($style != "") $select.= $style; $select.= ">". $i ." "; @@ -3133,6 +3147,8 @@ class PHPFSPOT { $this->session_cleanup(); $_GET['tags'] = $options[2]; $_SESSION['selected_tags'] = Array($options[2]); + if(isset($options[3]) && is_numeric($options[3])) + $_SESSION['begin_with'] = $options[3]; return $this->showPhotoIndex(); } break;