Diff for /loncom/interface/lonrss.pm between versions 1.39 and 1.47.8.1

version 1.39, 2008/12/08 23:16:46 version 1.47.8.1, 2010/01/03 21:21:25
Line 60  sub displayfeedname { Line 60  sub displayfeedname {
 # no, construct a name  # no, construct a name
     my $name=$filterfilename;       my $name=$filterfilename; 
     if ($name=~/^CourseBlog/) {      if ($name=~/^CourseBlog/) {
           if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Community') {
               $name = &mt('Community Blog'); 
           }
         $name=&mt('Course Blog');          $name=&mt('Course Blog');
  if ($env{'course.'.$env{'request.course.id'}.'.description'}) {   if ($env{'course.'.$env{'request.course.id'}.'.description'}) {
     $name.=' '.$env{'course.'.$env{'request.course.id'}.'.description'};      $name.=' '.$env{'course.'.$env{'request.course.id'}.'.description'};
Line 306  sub handler { Line 309  sub handler {
     my ($blocked,$blocktext,$disabled,$disabletext);      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 (&Apache::lonnet::usertools_access($uname,$udom,'blog')) {
         if ($disabled) {              $disabled = 0;
           } else {
               $disabled = 1;
             if ($html) {              if ($html) {
                 $disabletext = '<h2>'.&mt('No user blog available') .'</h2>'.                  $disabletext = '<h2>'.&mt('No user blog available') .'</h2>'.
                                &mt('This is a result of one of the following:').'<ul>'.                                 &mt('This is a result of one of the following:').'<ul>'.
Line 320  sub handler { Line 325  sub handler {
         }          }
     }      }
     if ($html) {      if ($html) {
  my $title = $displayfeedname?$displayfeedname  # my $title = $displayfeedname?$displayfeedname:"Available RSS Feeds and Blogs";
                                     :"Available RSS Feeds and Blogs";          my $title = "My Space";
  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,
   'force_register' =>    'domain'         => $udom,
       $env{'form.register'}}).    'force_register' => $env{'form.register'}}).
   &changed_js());    &changed_js());
     } else { # render RSS      } else { # render RSS
         my $server = &Apache::lonnet::absolute_url();          my $server = &Apache::lonnet::absolute_url();
Line 341  sub handler { Line 347  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 && !&disabled) {      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 387  sub handler { Line 393  sub handler {
  }   }
 # Add a new feed  # Add a new feed
         if (($html) && ($edit)) {          if (($html) && ($edit)) {
       $r->print('<h4>' . &mt('New RSS Feed or Blog'). '</h4>');
     $r->print('<form method="post" name="makenewfeed">');      $r->print('<form method="post" name="makenewfeed">');
             $r->print(&mt('Name for New Feed').": <input type='text' size='40' name='namenewblog' />");              $r->print(&mt('Name').": <input type='text' size='40' name='namenewblog' />");
     $r->print('<input type="submit" value="'.&mt('Start a New Feed').'" />');      $r->print('<input type="submit" value="'.&mt('New Feed').'" />');
     $r->print('</form>');      $r->print('</form>');
  }   }
         if ($displayfeedname) { # this is an existing feed          if ($displayfeedname) { # this is an existing feed
Line 506  sub handler { Line 513  sub handler {
    'private' => 'private',     'private' => 'private',
    'hidden' => 'hidden',     'hidden' => 'hidden',
    'delete' => 'delete',     'delete' => 'delete',
    'store' => 'Save changes',     'store' => 'Select',
    'title' => 'Title',     'title' => 'Title',
    'link' => 'Link',     'link' => 'Link',
    'description' => 'Description',     'description' => 'Description',
Line 586  ENDEDIT Line 593  ENDEDIT
     if ($html) {      if ($html) {
  $r->print('</ul>');   $r->print('</ul>');
  if ($edit) {   if ($edit) {
     $r->print('<input type="hidden" name="newid" value="'.$newid.'"/><input type="submit" value="'.&mt('Save Marked Changes').'" />'.      $r->print('<input type="hidden" name="newid" value="'.$newid.'"/><input type="submit" value="'.&mt('Save Selected').'" />'.
       ($displayoption eq 'hidden'?'<input type="submit" name="advertisethisblog" value="'.&mt('Advertise this Feed').'" />':        ($displayoption eq 'hidden'?'<input type="submit" name="advertisethisblog" value="'.&mt('Advertise this Feed').'" />':
        '<input type="submit" name="hidethisblog" value="'.&mt('Hide this Feed').'" />'));         '<input type="submit" name="hidethisblog" value="'.&mt('Hide this Feed').'" />'));
  }   }

Removed from v.1.39  
changed lines
  Added in v.1.47.8.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>