--- loncom/interface/loncommon.pm 2004/09/24 22:07:34 1.214 +++ loncom/interface/loncommon.pm 2004/09/29 19:13:20 1.215 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.214 2004/09/24 22:07:34 albertel Exp $ +# $Id: loncommon.pm,v 1.215 2004/09/29 19:13:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -611,8 +611,9 @@ sub help_open_topic { # Add the graphic my $title = &mt('Online Help'); + my $helpicon=&lonhttpdurl("/adm/help/gif/smallHelp.gif"); $template .= <<"ENDTEMPLATE"; - (Help: $topic) + (Help: $topic) ENDTEMPLATE if ($text ne '') { $template.='' }; return $template; @@ -670,6 +671,7 @@ sub help_open_menu { "". "
$text"; } + my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif"); $template .= <<"ENDTEMPLATE"; - (Help Menu) + (Help Menu) ENDTEMPLATE if ($component_help) { if (!$text) { @@ -743,8 +745,9 @@ sub help_open_bug { # Add the graphic my $title = &mt('Report a Bug'); + my $bugicon=&lonhttpdurl("/adm/lonMisc/smallBug.gif"); $template .= <<"ENDTEMPLATE"; - (Bug: $topic) + (Bug: $topic) ENDTEMPLATE if ($text ne '') { $template.='
' }; return $template; @@ -787,8 +790,9 @@ sub help_open_faq { # Add the graphic my $title = &mt('View the FAQ'); + my $faqicon=&lonhttpdurl("/adm/lonMisc/smallFAQ.gif"); $template .= <<"ENDTEMPLATE"; - (FAQ: $topic) + (FAQ: $topic) ENDTEMPLATE if ($text ne '') { $template.='' }; return $template; @@ -2415,10 +2419,8 @@ sub domainlogo { my $domain = &determinedomain(shift); # See if there is a logo if (-e '/home/httpd/html/adm/lonDomLogos/'.$domain.'.gif') { - my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; - if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } - return ''.$domain.''; + my $logo=&lonhttpdurl("/adm/lonDomLogos/$domain.gif"); + return ''.$domain.''; } elsif(exists($Apache::lonnet::domaindescription{$domain})) { return $Apache::lonnet::domaindescription{$domain}; } else { @@ -3699,6 +3701,13 @@ sub icon { return $iconname; } +sub lonhttpdurl { + my ($url)=@_; + my $lonhttpd_port=$Apache::lonnet::perlvar{'lonhttpdPort'}; + if (!defined($lonhttpd_port)) { $lonhttpd_port='8080'; } + return 'http://'.$ENV{'SERVER_NAME'}.':'.$lonhttpd_port.$url; +} + sub connection_aborted { my ($r)=@_; $r->print(" ");$r->rflush();