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()
break;
case 'img':
$output.= "
- <div style=\"display: table-cell;\">
- <div style=\"display: table-row; text-align: center;\">
- <a href=\"javascript:Tags('del', ". $tag .");\" title=\"". $this->tags[$tag] ."\">
- <img src=\"". $this->cfg->web_path ."/phpfspot_img.php?tagidx=". $tag ."\" />
- </a>
- </div>
- <div style=\"display: table-row; text-align: center;\">
- <a href=\"javascript:Tags('del', ". $tag .");\" title=\"". $this->tags[$tag] ."\">
- <img src=\"". $this->cfg->web_path ."/resources/underbar.png\" />
- </a>
- </div>
+ <div class=\"tagresulttag\">
+ <a href=\"javascript:Tags('del', ". $tag .");\" title=\"". $this->tags[$tag] ."\">
+ <img src=\"". $this->cfg->web_path ."/phpfspot_img.php?tagidx=". $tag ."\" />
+ </a>
</div>
";
break;
} // 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()
else
$style = "";
- $select = "<a href=\"javascript:showPhotoIndex(". (($i*$photo_per_page)-$photo_per_page) .");\"";
+ $start_with = ($i*$photo_per_page)-$photo_per_page;
+
+ if($this->is_user_friendly_url()) {
+ $select = "<a href=\"". $this->cfg->web_path ."/tag/205/". $start_with ."\"";
+ }
+ else {
+ $select = "<a href=\"". $this->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 ."</a> ";
{
if(preg_match('/\/photoview\/|\/photo\/|\/tag\//', $request_uri)) {
- unset($_SESSION['start_action']);
- unset($_SESSION['selected_tags']);
-
$options = explode('/', $request_uri);
switch($options[1]) {
case 'photoview':
if(is_numeric($options[2])) {
+ $this->session_cleanup();
+ //unset($_SESSION['start_action']);
+ //unset($_SESSION['selected_tags']);
$_GET['mode'] = 'showp';
return $this->showPhoto($options[2]);
}
$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;
$this->resetTagSearch();
$this->resetNameSearch();
$this->resetDateSearch();
+ $this->resetTags();
} // session_cleanup()