Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
+ * feature, user-friendly URL's (with Apache's mod_rewrite).
* feature, display tag-selection with preview-icons in photo index.
* feature, support for Nikon's NEF RAW photo format (via dcraw and ImageMagick).
* feature, auto-scroll in photo index if thumbnails are out of sight.
* feature, display tag-selection with preview-icons in photo index.
* feature, support for Nikon's NEF RAW photo format (via dcraw and ImageMagick).
* feature, auto-scroll in photo index if thumbnails are out of sight.
$this->tmpl->assign('from_date', $this->get_calendar('from'));
$this->tmpl->assign('to_date', $this->get_calendar('to'));
$this->tmpl->assign('from_date', $this->get_calendar('from'));
$this->tmpl->assign('to_date', $this->get_calendar('to'));
+ $this->tmpl->assign('preset_selected_tags', $this->getSelectedTags());
+ $this->tmpl->assign('preset_available_tags', $this->getAvailableTags());
+
- $this->tmpl->assign('preset_selected_tags', $this->getSelectedTags());
- $this->tmpl->assign('preset_available_tags', $this->getAvailableTags());
- $this->tmpl->assign('content_page', $this->tmpl->fetch('welcome.tpl'));
+ if(isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags']))
+ $this->tmpl->assign('initial_content', $this->showPhotoIndex());
+ else
+ $this->tmpl->assign('initial_content', $this->tmpl->fetch('welcome.tpl'));
- $this->tmpl->assign('content_page', $content);
+ $this->tmpl->assign('initial_content', $content);
$this->tmpl->show("index.tpl");
$this->tmpl->show("index.tpl");
$b = '88';
if(isset($this->tags[$key])) {
$b = '88';
if(isset($this->tags[$key])) {
- $output.= "<a href=\"javascript:Tags('add', ". $key .");\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] ."</a>, ";
+ if($this->is_user_friendly_url())
+ $output.= "<a href=\"". $this->cfg->web_path ."/tag/". $key ."\" onclick=\"Tags('add', ". $key ."); return false;\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] ."</a>, ";
+ else
+ $output.= "<a href=\"". $this->cfg->web_path ."/index.php?mode=showpi\" onclick=\"Tags('add', ". $key ."); return false;\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] ."</a>, ";
}
$output = substr($output, 0, strlen($output)-2);
}
$output = substr($output, 0, strlen($output)-2);
*
* this function provides all the necessary information
* for the photo index template.
*
* this function provides all the necessary information
* for the photo index template.
*/
public function showPhotoIndex()
{
*/
public function showPhotoIndex()
{
break;
case 'tag':
if(is_numeric($options[2])) {
break;
case 'tag':
if(is_numeric($options[2])) {
- $_GET['mode'] = 'showpi';
- $_SESSION['selected_tags'] = Array($options[2]);
$_GET['tags'] = $options[2];
$_GET['tags'] = $options[2];
+ $_SESSION['selected_tags'] = Array($options[2]);
return $this->showPhotoIndex();
}
break;
return $this->showPhotoIndex();
}
break;
<!-- content column -->
<div id="content" class="content">
<!-- content column -->
<div id="content" class="content">