Index: openacs-4/packages/acs-content-repository/tcl/image-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/image-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 27 Aug 2006 20:34:37 -0000 1.2 +++ openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 29 Aug 2006 16:39:17 -0000 1.3 @@ -367,3 +367,19 @@ -item_path ${item_id}_${size_name} \ -root_folder_id $item_id] } + +ad_proc -public image::get_resized_item_id { + -item_id + {-size_name "thumbnail"} +} { + Get the item id of a related resized image, usually the thumbnail size + + @param item_id Item_id of the original image + + @return item_id of the resized image, empty string if it doeesn't exist + + @author Dave Bauer (dave@solutiongrove.com) + @creation-date 2006-08-29 +} { + return [db_string get_resized_item_id "" -default ""] +} \ No newline at end of file Index: openacs-4/packages/acs-content-repository/tcl/image-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/image-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-content-repository/tcl/image-procs.xql 29 Aug 2006 16:39:17 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + + + + + + + + select child_id + from cr_child_rels + where parent_id=:item_id + and relation_tag = 'image-' || :size_name + + + \ No newline at end of file