Index: openacs-4/packages/photo-album/tcl/photo-album-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-callback-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/photo-album/tcl/photo-album-callback-procs.tcl 10 Nov 2005 14:02:35 -0000 1.2 @@ -0,0 +1,75 @@ +ad_library { + Library of callbacks implementations for photo-album +} + + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl album {} { + callback implementation + } { + return "album" + } + +ad_proc -callback application-track::getGeneralInfo -impl album {} { + callback implementation + } { + db_1row my_query { + select count(p.pa_album_id) as result + from pa_albums p, cr_items cr,acs_objects a,dotlrn_communities_all d + where d.community_id = :comm_id + and cr.live_revision = p.pa_album_id + and a.object_id = cr.parent_id + and apm_package__parent_id(a.context_id) = d.package_id + + } + + return "$result" + } + + +ad_proc -callback application-track::getSpecificInfo -impl album {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + + select p.pa_photo_id as id,p.story as story,p.photographer as photographer + from pa_photos p, dotlrn_communities com,acs_objects ac,acs_objects ac2,acs_objects ac1 + where com.community_id=:class_instance_id + and ac.object_id = p.pa_photo_id + and ac.context_id = ac1.object_id + and ac1.context_id = ac2.object_id + and ac2.context_id + IN (select ac1.context_id + from pa_albums p, dotlrn_communities com,acs_objects ac,acs_objects ac1 + where com.community_id=:class_instance_id + and ac.object_id = p.pa_album_id + and ac.context_id = ac1.object_id + ) + + } + set my_elements { + photo_id { + label "Photo_id" + display_col id + html {align center} + } + p_story { + label "Story" + display_col story + html {align center} + } + p_photographer { + label "photographer" + display_col photographer + html {align center} + } + + } + + return "OK" + } \ No newline at end of file Index: openacs-4/packages/wp-slim/tcl/wp-slim-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/tcl/wp-slim-callback-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/tcl/wp-slim-callback-procs.tcl 10 Nov 2005 14:03:03 -0000 1.2 @@ -0,0 +1,76 @@ +ad_library { + Library of callbacks implementations for wp-slim +} + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl presentation {} { + callback implementation + } { + return "presentation" + } + +ad_proc -callback application-track::getGeneralInfo -impl presentation {} { + callback implementation + } { + db_1row my_query { + select count(c.presentation_id) as result + from cr_wp_presentations c,dotlrn_communities com,acs_objects a + where com.community_id=:comm_id + and apm_package__parent_id(a.context_id) = com.package_id + and a.object_id = c.presentation_id + } + + + + return "$result" + } + + + + + +ad_proc -callback application-track::getSpecificInfo -impl presentation {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select com.community_id as id,com.pretty_name as name,c.presentation_id as p_id,c.pres_title as title + from cr_wp_presentations c,dotlrn_communities com,acs_objects a + where com.community_id=:class_instance_id + and apm_package__parent_id(a.context_id) = com.package_id + and a.object_id = c.presentation_id + } + + + + set my_elements { + id { + label "Community_id" + display_col id + html {align center} + } + name { + label "Name" + display_col name + html {align center} + } + p_id { + label "Presentation_id" + display_col p_id + html {align center} + } + title { + label "Title" + display_col title + html {align center} + } + } + + + + return "OK" + } \ No newline at end of file