Menu

#9 photo keywords

open
nobody
None
5
2003-04-03
2003-04-03
Anonymous
No

It would be nice to have the ability to assign keywords to
each photo (or topic) which could be searched in
addition to descriptions. This way, searches could be
made more powerful while mainting the descriptive
nature of the 'descriptions.'
-bailey
mojognome@bigfoot.com

Discussion

  • Nobody/Anonymous

    Logged In: NO

    FWIW, I put keywords in the descriptions surrounded by
    colons. For example: Christmas dinner 1995 (:christmas:
    :mom: :dad:)

    Then if you want to search for keywords, include the colons.
    I also made a simple script to find all the keywords in a
    page called keywords.php.

    It's a hack, but might get you going until keywords get in
    proper.

    <?php

    $keywords = array();
    $fp = fopen("pictures.txt", "r");
    while($fp && !feof($fp))
    {
    $buffer = fgets($fp, 4096);
    preg_match_all("/:([^:]*):/", $buffer, $matches);
    foreach($matches[1] as $keyword)
    {
    ++$keywords[$keyword];
    }
    }
    fclose($fp);

    ksort($keywords);
    foreach ($keywords as $keyword => $count)
    {
    print "<a
    href='/mypics/photos.php?action=search&search=:$keyword:'>";
    print "$keyword</a> ($count picture" . ($count == 1 ? "" :
    "s") . ")<br>\n";
    }
    ?>

     
  • Nobody/Anonymous

    Logged In: NO

    This is a good idea! I have been looking for ages for a script
    that will search keywords as opposed to descriptions. You
    will require a many-to-many join in the database to avoid
    redundant keywords. GREAT IDEA!!!!!!

     
  • Nobody/Anonymous

    Logged In: NO

    i would be very glad, if the comments, whicht can be posted
    by the viewers of the photos, were sorted in the other
    direction - newest up and oldest down.

    anyway, thx for the tool!

    karsten

     
  • Matthew Kendall

    Matthew Kendall - 2006-07-09

    Logged In: YES
    user_id=33581

    Search now searches comments as well as descriptions, so
    you could put keywords in a comments if you like.

     

Log in to post a comment.

MongoDB Logo MongoDB