Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorcmedia
    • CommentTimeNov 30th 2009
     
    Hello,

    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...

    Thank you.
    • CommentAuthorchewbears
    • CommentTimeDec 2nd 2009
     
    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.

    LMK if you need more guidance.
    • CommentAuthorcmedia
    • CommentTimeDec 4th 2009
     
    <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>

    mhhhh... i guess i mistake something :D

    sorry i'm 0 in php...

    Thank you for your help.