summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php20
-rw-r--r--templates/photo_index.tpl1
2 files changed, 20 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 0a59d96..191e066 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -47,8 +47,19 @@ class PHPFSPOT {
$this->tmpl->assign('searchfor', $_SESSION['searchfor']);
$this->tmpl->assign('page_title', $this->cfg->page_title);
$this->tmpl->assign('current_condition', $_SESSION['tag_condition']);
+
+ switch($_GET['mode']) {
+ case 'showpi':
+ if(isset($_GET['tags'])) {
+ $_SESSION['selected_tags'] = split(',', $_GET['tags']);
+ }
+ break;
+ }
+
+ $this->tmpl->assign('content_page', 'welcome.tpl');
$this->tmpl->show("index.tpl");
+
} // show()
private function get_tags()
@@ -418,7 +429,14 @@ class PHPFSPOT {
if($end_with < $count)
$this->tmpl->assign("next_url", "javascript:showPhotoIndex(". $next_start .");");
}
-
+
+ $current_tags = "";
+ foreach($_SESSION['selected_tags'] as $tag)
+ $current_tags.= $tag .",";
+ $current_tags = substr($current_tags, 0, strlen($current_tags)-1);
+ $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi&tags=". $current_tags;
+
+ $this->tmpl->assign('extern_link', $extern_link);
$this->tmpl->assign('count', $count);
$this->tmpl->assign('width', $this->cfg->thumb_width);
$this->tmpl->assign('images', $images);
diff --git a/templates/photo_index.tpl b/templates/photo_index.tpl
index 6d109d0..61f54d4 100644
--- a/templates/photo_index.tpl
+++ b/templates/photo_index.tpl
@@ -18,6 +18,7 @@
{/if}
</td>
<td class="index_header" style="text-align: right;">
+ <a href="{$extern_link}">Extern</a>
<img src="resources/photo_index.png" alt="photo index" />
</td>
</tr>