Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/dotlrn-init.sql,v diff -u -r1.26 -r1.27 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-init.sql 30 May 2002 22:04:58 -0000 1.26 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-init.sql 13 Jun 2002 04:34:56 -0000 1.27 @@ -83,6 +83,17 @@ storage => 'generic' ); + bar := acs_attribute.create_attribute( + object_type => 'dotlrn_community', + attribute_name => 'header_logo_alt_text', + datatype => 'integer', + pretty_name => 'Header Logo Alt Text', + pretty_plural => 'Header Logo Alt Text', + min_n_values => 0, + max_n_values => 1, + storage => 'generic' + ); + -- create the dotlrn_class community type foo := dotlrn_community_type.new( community_type => 'dotlrn_class_instance', Index: openacs-4/packages/dotlrn/www/community-image.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-image.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community-image.vuh 13 Jun 2002 04:34:56 -0000 1.1 @@ -0,0 +1,27 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + + Virtual URL handler for community header images + + @author arjun@openforce.net + @version $Id: community-image.vuh,v 1.1 2002/06/13 04:34:56 arjun Exp $ +} { + revision_id:integer +} + +cr_write_content -revision_id $revision_id Index: openacs-4/packages/dotlrn/www/dotlrn-default-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-default-master.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/dotlrn-default-master.adp 3 Jun 2002 07:39:00 -0000 1.7 +++ openacs-4/packages/dotlrn/www/dotlrn-default-master.adp 13 Jun 2002 04:34:56 -0000 1.8 @@ -26,8 +26,6 @@ %> -<% set dotlrn_url [dotlrn::get_url] %> - @@ -52,7 +50,7 @@ - SloanSpaceLogo + @header_img_alt_text@
@text@
Index: openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-default-master.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl 10 Jun 2002 20:26:18 -0000 1.13 +++ openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl 13 Jun 2002 04:35:22 -0000 1.14 @@ -46,7 +46,9 @@ set user_id [ad_get_user_id] set community_id [dotlrn_community::get_community_id] +set dotlrn_url [dotlrn::get_url] + if {[dotlrn::user_p -user_id $user_id]} { set portal_id [dotlrn::get_portal_id -user_id $user_id] } @@ -199,13 +201,17 @@ set title "SloanSpace" -# the ColorHack and fonthack! +# the ColorHack and FontHack and LogoHack! set color_hack "#cc0000" set color_hack_name "red" set header_font "" set header_font_size "medium" set header_font_color "black" +set header_logo_item_id "" +set header_img_url "$dotlrn_url/graphics/logowhite.gif" +set header_img_alt_text "Header Logo" + if {[empty_string_p [dotlrn_community::get_parent_community_id -package_id [ad_conn package_id]]]} { set parent_comm_p 0 } else { @@ -249,6 +255,26 @@ -attribute_name header_font_color ] + # logo hack + set header_logo_item_id [dotlrn_community::get_attribute \ + -community_id $community_id \ + -attribute_name header_logo_item_id + ] + + if {![empty_string_p $header_logo_item_id]} { + + set header_img_url "community-image?revision_id=$header_logo_item_id" + } + + set header_logo_alt_text [dotlrn_community::get_attribute \ + -community_id $community_id \ + -attribute_name header_logo_alt_text + ] + + if {![empty_string_p $header_logo_alt_text]} { + set header_img_alt_text $header_logo_alt_text + } + # The header text is the name of the community set text [dotlrn_community::get_community_header_name $community_id]