Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
foreach ($terms as $term) {
$query .= "
`path` LIKE '%".mysql_escape_string($term)."%' OR
`description` LIKE '%".mysql_escape_string($term)."%' OR
`comment` LIKE '%".mysql_escape_string($term)."%' OR
`caption` LIKE '%".mysql_escape_string($term)."%' OR ";
}
and edit it to read:foreach ($terms as $term) {
$multi_term = explode("+",$term);
if (count($multi_term)>1) {
array_map('mysql_real_escape_string',$multi_term);
$path_combine = implode("%' AND `path` LIKE '%",$multi_term);
$desc_combine = implode("%' AND `description` LIKE '%",$multi_term);
$comm_combine = implode("%' AND `comment` LIKE '%",$multi_term);
$capt_combine = implode("%' AND `caption` LIKE '%",$multi_term);
$query .= "
`path` LIKE '%$path_combine%' OR
`description` LIKE '%$desc_combine%' OR
`comment` LIKE '%$comm_combine%' OR
`caption` LIKE '%$capt_combine%' OR ";
} else {
$query .= "
`path` LIKE '%".mysql_real_escape_string($term)."%' OR
`description` LIKE '%".mysql_real_escape_string($term)."%' OR
`comment` LIKE '%".mysql_real_escape_string($term)."%' OR
`caption` LIKE '%".mysql_real_escape_string($term)."%' OR ";
}
}
foreach ($terms as $term) {
$multi_term = explode("+",$term);
if (count($multi_term)>1) {
array_map('mysql_real_escape_string',$multi_term);
$desc_combine = implode("%' AND `description` LIKE '%",$multi_term);
$capt_combine = implode("%' AND `caption` LIKE '%",$multi_term);
$query .= "
`description` LIKE '%$desc_combine%' OR
`caption` LIKE '%$capt_combine%' OR ";
} else {
$query .= "
`path` LIKE '%".mysql_real_escape_string($term)."%' OR
`description` LIKE '%".mysql_real_escape_string($term)."%' OR
`comment` LIKE '%".mysql_real_escape_string($term)."%' OR
`caption` LIKE '%".mysql_real_escape_string($term)."%' OR ";
}
}
foreach ($terms as $term) {
$term = mysql_real_escape_string($term);
$multi_term = explode("+",$term);
if (count($multi_term)>1) {
$path = implode("%' AND `path` LIKE '%",$multi_term);
$description = implode("%' AND `description` LIKE '%",$multi_term);
$comment = implode("%' AND `comment` LIKE '%",$multi_term);
$caption = implode("%' AND `caption` LIKE '%",$multi_term);
} else {
$path = $description = $comment = $caption = $term;
}
$query .= "
`path` LIKE '%$path%' OR
`description` LIKE '%$description%' OR
`comment` LIKE '%$comment%' OR
`caption` LIKE '%$caption%' OR ";
}
Posted By: thebluebusthanks a lot.Just follow the same direction as mike gave you in that discussion and remove the lines that you don't want it to search. I've tested mine on my site and it seems to work great. Hopefully it works as well on yours! :)
my site currently only search captions and descriptions using this mod
http://plogger.org/forum/discussion/1788/search-not-to-use-filename/#Item_3
i'll give yours a shot later! :)
1 to 12 of 12