I changed lines between line 1612 and 1671
function search() {
global $mkportals, $DB, $mklib, $Skin, $mklib_board;
$maintit = "{$mklib->lang['ga_searchf']}";
$cselect.= "<option value='3'>{$mklib->lang['ga_autore']}</option>\n";
$cselect.= "<option value='1'>{$mklib->lang['ga_title']}</option>\n";
//$cselect.= "<option value='2'>{$mklib->lang['ga_des']}</option>\n";
$content .= "
<tr>
<td>
<form action=\"index.php?ind=gallery&op=result_search\" name=\"search\" method=\"post\">
<table width=\"100%\" border=\"0\">
<tr>
<td>{$mklib->lang['ga_searchin']}</td>
<td>
<select class=\"bgselect\" name=\"campo\" size=\"1\">
{$cselect}
</select>
</td>
</tr>
<tr>
<td width=\"20%\">{$mklib->lang['ga_searchtext']}</td>
<td width=\"80%\"><input type=\"text\" name=\"testo\" size=\"52\" class=\"bgselect\" /></td>
</tr>
<tr>
<td colspan=\"2\"><input type=\"submit\" value=\"{$mklib->lang['ga_searchstart']}\" class=\"mkbutton\" /></td>
</tr>
</table>
</form>
</td>
</tr>
";
// Link Navigation bar
$navbar = "<a href=\"index.php?ind=gallery\">{$mklib->lang['ga_mkpgal']}</a>{$mklib->lang['bc_sep']}<a href=\"#\">{$mklib->lang['ga_searchf']}</a>";
// Link Navigation bar
$stat = $this->retrieve_stat();
$toolbar = "";
$utonline = $mklib_board->get_active_users("gallery");
$output = $this->tpl->gallery_show($navbar, $maintit, $content, $submit, $stat, $toolbar, $show_pages, $utonline);
$blocks = $Skin->view_block("{$mklib->lang['ga_imggal']}", $output);
$mklib->printpage("1", "1", $mklib->sitename.$mklib->lang['tt_sep'].$mklib->lang['ga_imggal'].$mklib->lang['tt_sep'].$mklib->lang['ga_searchstart'], $blocks);
}
function result_search() {
global $mkportals, $DB, $mklib, $Skin, $mklib_board;
//$campo = $mkportals->input['campo']; //deprecated
$testo = $mkportals->input['testo'];
$campo = "titolo"; //This is a database table row name - Do not translate!
if (intval($mkportals->input['campo']) == 3) {
$campo = "descrizione"; //This is a database table row name - Do not translate!
$campo = "autore"; //This is a database table row name - Do not translate!
}
if (!$testo) {
$message = "{$mklib->lang['ga_reqstring']}";
$mklib->error_page($message);
exit;
}
This is the search section.
I add this line
$cselect.= "<option value='3'>{$mklib->lang['ga_autore']}</option>\n";
and add this line
$campo = "autore"; //This is a database table row name - Do not translate!
Now i can can search on posters name ans search on title.
Search on discription is not working any more.