--- loncom/interface/lonrss.pm	2007/07/27 00:17:17	1.37
+++ loncom/interface/lonrss.pm	2008/12/08 23:16:46	1.39
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # RSS Feeder
 #
-# $Id: lonrss.pm,v 1.37 2007/07/27 00:17:17 albertel Exp $
+# $Id: lonrss.pm,v 1.39 2008/12/08 23:16:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -106,8 +106,8 @@ sub advertisefeeds {
 	    }
 	} else {
 	    $feeds.='<li><b>'.$feednames{$feed}.
-		'</b><br />'.($edit?&mt('Edit'):'HTML').': <a href="'.$htmlurl.'"><tt>'.$htmlurl.'</tt></a>'.
-		'<br />'.&mt('Public RSS/podcast (subscribe to)').': <a href="'.$feedurl.'"><tt>'.$feedurl.'</tt></a></li>';
+		'</b><br />'.($edit?&mt('Edit'):'HTML').': <a href="'.$htmlurl.'"><tt>'.$feednames{$feed}.' HTML</tt></a>'.
+		'<br />'.&mt('Public RSS/podcast (subscribe to)').': <a href="'.$feedurl.'"><tt>'.$feednames{$feed}.' RSS/Podcast</tt></a></li>';
 	}
     }
     if ($feeds) {
@@ -303,9 +303,21 @@ sub handler {
     my $filterfeedname=&filterfeedname($filename);
     my $feedname=&feedname($filename);
     my ($displayfeedname,$displayoption)=&displayfeedname($filename,$uname,$udom);
-    my ($blocked,$blocktext);
+    my ($blocked,$blocktext,$disabled,$disabletext);
     if (!&Apache::lonnet::is_course($udom,$uname)) {
         ($blocked,$blocktext) = &blocking_blogdisplay($uname,$udom,$html,$filterfeedname);
+        $disabled = &Apache::lonnet::usertools_access($uname,$udom,'blog');
+        if ($disabled) {
+            if ($html) {
+                $disabletext = '<h2>'.&mt('No user blog available') .'</h2>'.
+                               &mt('This is a result of one of the following:').'<ul>'.
+                               '<li>'.&mt('The administrator of this domain has disabled blog functionality for this specific user.').'</li>'.
+                               '<li>'.&mt('The domain has been configured to disable, by default, blog functionality for all users in the domain.').'</li>'.
+                               '</ul>';
+            } else {
+                $disabletext = &mt('No user blog available');
+            }
+        }
     }
     if ($html) {
 	my $title = $displayfeedname?$displayfeedname
@@ -329,7 +341,7 @@ sub handler {
     my $newid = &get_new_feed_id();
 # Is this user for real?
     my $homeserver=&Apache::lonnet::homeserver($uname,$udom);
-    if ($html && !$blocked) {
+    if ($html && !$blocked && !&disabled) {
 # Any new feeds or renaming of feeds?
 	if ($edit) {
 # Hide a feed?
@@ -361,6 +373,9 @@ sub handler {
     } elsif ($blocked) {
         $r->print($blocktext);
         $r->print(($html?&Apache::loncommon::end_page():'</channel></rss>'."\n"));
+    } elsif ($disabled) {
+        $r->print($disabletext);
+        $r->print(($html?&Apache::loncommon::end_page():'</channel></rss>'."\n"));
     } else { # is indeed a user
 # Course or user?
 	my $name='';