is a way to make the search work for albums searching the keyword in the album description and providing as result a list of albums where in the description exist the searched keyword?
This will be useful for all like me who use plogger to publish albums with description, with thumb linked directly to the big image... without images with any description...
Your going to have to go into plog-functions.php and function plogger_init_search
Look at
$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);
You will add a line for your album description field name.
so pretend it was named album_desc
You would add
$album_desc = implode("%' AND `caption` LIKE '%",$multi_term);
also you will have to edit this section
`path` LIKE '%$path%' OR `description` LIKE '%$description%' OR `comment` LIKE '%$comment%' OR `caption` LIKE '%$caption%' OR
You will have to do the same as above. Add a line for your field.
<code> 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 "; }</code>
I find this:
i have to do this?
<code> foreach ($terms as $term) { $term = mysql_real_escape_string($term); $multi_term = explode('+', $term); if (count($multi_term)>1) { $album_desc = implode("%' AND `caption` 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 "; }</code>