Tried by adding the following function in BxDolSharedMedia.php, and added '$oNew->PhotoSearchByTags();' in browsephoto.php, it shows a form on left-head of the page. But tag search doesn't work, no matter what I put in the textbox and search, still show all photos. How to fix this?
function PhotoSearchByTags()
{
ob_start();
?>
<div class="search_by_tag">
<form method="GET" action="<?= $_SERVER['PHP_SELF'] ?>">
<input type="text" class="input_by_tag" name="Tags" id="Tags" />
<br />
<input type="submit" value="<?= _t( '_Fetch' ) ?>" />
</form>
</div>
<?php
$searchTags=$_POST['Tags'];
$aWhere = array();
$aWhere[] = '1';
$aWhere[] = "`{$this->sMainTable}`.`{$this->aTableFields['medTags']}` like '%$searchTags%'";
$aSqlQuery['sqlWhere'] = "WHERE " . implode( ' AND ', $aWhere ).$sAddon." AND `Approved`= 'true'";
$iTotalNum = db_value( "SELECT COUNT( * ) FROM `{$this->sMainTable}` {$aSqlQuery['sqlWhere']}" );
if (!$iTotalNum)
return false;
}