Hello, I have tried to copy the code and recreate it using the theme's own code, but I have come to a snag.
I have created this code:
<?php if (getOption('Allow_search')) { ?>
<script type="text/javascript" src="<?php echo html_encode(getGalleryIndexURL()); ?>zp-core/js/admin.js"></script>
<div class="search-box">
<form method="post" action="<?php echo html_encode(getGalleryIndexURL()); ?>page/search/" class="search_form" id="gallery_search">
<script type="text/javascript">
// <!-- <![CDATA[
var within = 0;
function search_(way) {
within = way;
if (way) {
$('#search_submit').attr('title', 'Search');
} else {
lastsearch = '';
$('#search_submit').attr('title', 'Search');
}
$('#s').val('');
}
$('#gallery_search').submit(function() {
if (within) {
var newsearch = $.trim($('#s').val());
if (newsearch.substring(newsearch.length - 1) == ',') {
newsearch = newsearch.substr(0, newsearch.length - 1);
}
if (newsearch.length > 0) {
$('#s').val('() AND (' + newsearch + ')');
} else {
$('#s').val('');
}
}
return true;
});
// ]]> -->
</script>
<input type="text" value="Search..." name="s" id="s" onfocus="defaultInput(this,'Search...')" onblur="clearInput(this,'Search...')">
<input hidden id="SEARCH_desc" name="SEARCH_desc" checked="checked">
<input hidden id="SEARCH_exifdescription" name="SEARCH_exifdescription" checked="checked">
<input hidden id="SEARCH_tags" name="SEARCH_tags" checked="checked">
<input hidden id="SEARCH_title" name="SEARCH_title" checked="checked">
<input type="submit" id="search_submit" class="search_submit" value="" style="visibility:hidden; float:right;">
</form>
</div>
<?php } ?>
It goes to the search page on submission, but doesn't actually send over the search criteria.
Any ideas?
Thanks for the help anyway!