version 1.37, 2007/07/27 00:17:17
|
version 1.40, 2008/12/10 21:46:58
|
Line 106 sub advertisefeeds {
|
Line 106 sub advertisefeeds {
|
} |
} |
} else { |
} else { |
$feeds.='<li><b>'.$feednames{$feed}. |
$feeds.='<li><b>'.$feednames{$feed}. |
'</b><br />'.($edit?&mt('Edit'):'HTML').': <a href="'.$htmlurl.'"><tt>'.$htmlurl.'</tt></a>'. |
'</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>'.$feedurl.'</tt></a></li>'; |
'<br />'.&mt('Public RSS/podcast (subscribe to)').': <a href="'.$feedurl.'"><tt>'.$feednames{$feed}.' RSS/Podcast</tt></a></li>'; |
} |
} |
} |
} |
if ($feeds) { |
if ($feeds) { |
Line 303 sub handler {
|
Line 303 sub handler {
|
my $filterfeedname=&filterfeedname($filename); |
my $filterfeedname=&filterfeedname($filename); |
my $feedname=&feedname($filename); |
my $feedname=&feedname($filename); |
my ($displayfeedname,$displayoption)=&displayfeedname($filename,$uname,$udom); |
my ($displayfeedname,$displayoption)=&displayfeedname($filename,$uname,$udom); |
my ($blocked,$blocktext); |
my ($blocked,$blocktext,$disabled,$disabletext); |
if (!&Apache::lonnet::is_course($udom,$uname)) { |
if (!&Apache::lonnet::is_course($udom,$uname)) { |
($blocked,$blocktext) = &blocking_blogdisplay($uname,$udom,$html,$filterfeedname); |
($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) { |
if ($html) { |
my $title = $displayfeedname?$displayfeedname |
my $title = $displayfeedname?$displayfeedname |
:"Available RSS Feeds and Blogs"; |
:"Available RSS Feeds and Blogs"; |
my $rss_link = &Apache::lonrss::rss_link($uname,$udom); |
my $rss_link = &Apache::lonrss::rss_link($uname,$udom); |
|
my @brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}]; |
$r->print(&Apache::loncommon::start_page($title,$rss_link, |
$r->print(&Apache::loncommon::start_page($title,$rss_link, |
{'domain' => $udom, |
{'bread_crumbs' => @brcrumb, |
|
'domain' => $udom, |
'force_register' => |
'force_register' => |
$env{'form.register'}}). |
$env{'form.register'}}). |
&changed_js()); |
&changed_js()); |
Line 329 sub handler {
|
Line 343 sub handler {
|
my $newid = &get_new_feed_id(); |
my $newid = &get_new_feed_id(); |
# Is this user for real? |
# Is this user for real? |
my $homeserver=&Apache::lonnet::homeserver($uname,$udom); |
my $homeserver=&Apache::lonnet::homeserver($uname,$udom); |
if ($html && !$blocked) { |
if ($html && !$blocked && !&disabled) { |
# Any new feeds or renaming of feeds? |
# Any new feeds or renaming of feeds? |
if ($edit) { |
if ($edit) { |
# Hide a feed? |
# Hide a feed? |
Line 361 sub handler {
|
Line 375 sub handler {
|
} elsif ($blocked) { |
} elsif ($blocked) { |
$r->print($blocktext); |
$r->print($blocktext); |
$r->print(($html?&Apache::loncommon::end_page():'</channel></rss>'."\n")); |
$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 |
} else { # is indeed a user |
# Course or user? |
# Course or user? |
my $name=''; |
my $name=''; |