Topic: How extend search script?
Hi
I have some problems with extending search.php to find some more things.
I have add new column to pun_posts table and a <select> button with some <option> inside...
therefore I want to search forum for topics which are marked in that column...
how can I do that?
I've add this lines after 278 line in search.php
/ If it's a search for posts by a specific color
if ($color)
{
switch ($db_type)
{
case 'pgsql':
$result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE color = \''.$color.'\'') or error('Unable to fetch color', __FILE__, __LINE__, $db->error());
break;
default:
$result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE color = \''.$color.'\'') or error('Unable to fetch color', __FILE__, __LINE__, $db->error());
break;
}
if ($db->num_rows($result))
{
while ($row = $db->fetch_row($result))
$search_ids = array();
while ($row = $db->fetch_row($result))
$search_ids[] = $row[0];
//echo $search_ids;
//echo $row;
$db->free_result($result);
}
}