Index: openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 31 Oct 2001 20:42:07 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 2 Nov 2006 06:37:43 -0000 1.3 @@ -6,12 +6,21 @@ @cvs-id $Id$ } { user_id:integer + {size ""} } if { ![db_0or1row get_item_id ""] } { ad_return_error "Couldn't find portrait" "Couldn't find a portrait for User $user_id" return } -cr_write_content -item_id $item_id +if {[empty_string_p $size]} { + cr_write_content -item_id $item_id +} else { + set thumbnail_id [image::get_resized_item_id -item_id $item_id -size_name $size] + if {[empty_string_p $thumbnail_id]} { + set thumbnail_id [image::resize -item_id $item_id -size_name $size] + } + cr_write_content -item_id $thumbnail_id +} Index: openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/Attic/portrait-thumbnail-bits.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl 2 Nov 2006 06:37:43 -0000 1.2 @@ -8,6 +8,10 @@ user_id:integer } +# NB: this really doesn't work! You can now pass a &size= parameter +# into portrait-bits.tcl. sizes as per image::get_convert_to_sizes + + set column portrait_thumbnail set file_type [db_string -default "" unused "select portrait_file_type