photo_album::search::photo::datasource (private)

 photo_album::search::photo::datasource photo_id

Defined in packages/photo-album/tcl/photo-album-search-procs.tcl

return the indexable content for an album. can index a revision_id or a cr_item.item_id for photo_album

Parameters:
photo_id (required)
the item_id or revision id to index.
Author:
Jeff Davis davis@xarg.net
Created:
2004-06-01

Testcases:
No testcase defined.
Source code:
    # get the item_id if we got a revision_id
    set item_id [db_string item_id {select item_id from cr_revisions where revision_id = :photo_id} -default $photo_id]

    photo_album::photo::get -photo_id $item_id -array photo

    # get the base url
    set base [photo_album::photo::package_url -photo_id $item_id]
    set full "[ad_url]$base"

    set ::lev [info level]
    namespace eval ::template { 
        variable parse_level 
        lappend parse_level $::lev
    }
    set body [template::adp_include /packages/photo-album/lib/one-photo [list &photo "photo" base $base style feed]]
    namespace eval ::template { 
        variable parse_level 
        template::util::lpop parse_level
    }


    return [list object_id $photo_id  title $photo(title)  mime "text/html"  keywords {}  storage_type text  content $body  syndication [list link "${full}photo/photo_id=$item_id"  description "$photo(description) $photo(caption)"  author $photo(username)  category photos  guid "[ad_url]/o/$item_id"  pubDate $photo(created_ansi)]  ]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: