Hello,
The current code used to find related gallery items is located below. Curious if we can add an argument where if the results show up as nothing, it does a search for within the picture descriptions instead.
function Gallery_FindRelated($title, $score = false)
{
global $db_prefix;
$result = db_query("SELECT ID_PICTURE, MATCH(title) AGAINST('$title') AS score
FROM {$db_prefix}gallery_title_cache
WHERE MATCH(title) AGAINST('$title')
ORDER BY MATCH(title) AGAINST('$title') DESC", __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc($result))
{
if ($score == false)
$data[] = $row['ID_PICTURE'];
else
$data[] = array($row['ID_PICTURE'], $row['score']);
}
return $data;
}
Is that possible?