$current_tags = substr($current_tags, 0, strlen($current_tags)-1);
}
- $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi&tags=". $current_tags;
+ $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi";
+ if($current_tags != "") {
+ $extern_link.= "&tags=". $current_tags;
+ }
$this->tmpl->assign('extern_link', $extern_link);
$this->tmpl->assign('count', $count);
var selected_tags = document.getElementById("selected_tags");
selected_tags.innerHTML = "Loading...";
selected_tags.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_selected_tags'));
+
+ // if no tags are currently selected, return false from here
+ if(selected_tags.innerHTML == "")
+ return false;
+
+ return true;
+
}
function showPhotoIndex(begin_with)
document.getElementsByName('searchfor')[0].value = '';
}
+function init_phpfspot()
+{
+ refreshAvailableTags();
+
+ if(refreshSelectedTags()) {
+ showPhotoIndex();
+ }
+}
+
var startup = 1;
+
{include file="header.tpl"}
- <body onload="refreshAvailableTags(); refreshSelectedTags();">
+ <body onload="init_phpfspot();">
<div id="frame">
<table>
<tr>
{/if}
</td>
<td class="index_header" style="text-align: right;">
- <a href="{$extern_link}">Extern</a>
+ {if $extern_link }
+ <a href="{$extern_link}">Extern</a>
+ {/if}
<img src="resources/photo_index.png" alt="photo index" />
</td>
</tr>