[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64, Sat Oct 8 14:14:47 2005 UTC revision 1.65, Tue Oct 11 17:14:48 2005 UTC
# Line 1104  Line 1104 
1104  title       : the title. This is usually what is seen by the user in the pull down menu  title       : the title. This is usually what is seen by the user in the pull down menu
1105  description : a more complete description that is often seen is rss viewers but not always  description : a more complete description that is often seen is rss viewers but not always
1106  link        : link to the item that was added/edited  link        : link to the item that was added/edited
1107  All other keys are treated as optional RSS arguments and written to the file. At most, 10 recent entries are stored in the rss file.  All other keys are treated as optional RSS arguments and written to the file.
1108    
1109    At most, $max_entries recent entries are stored in the rss file, and this is currently 50.
1110    
1111  RSS files are quite simple, and contain some standard header information, and then individual items surrounded by an <item> </item> tag. Note that there is also an initial title/description/link set that describes the file.  RSS files are quite simple, and contain some standard header information, and then individual items surrounded by an <item> </item> tag. Note that there is also an initial title/description/link set that describes the file.
1112    
# Line 1114  Line 1116 
1116  sub rss_feed {  sub rss_feed {
1117   shift if UNIVERSAL::isa($_[0],__PACKAGE__);   shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1118   my ($files, $args)=@_;   my ($files, $args)=@_;
1119    
1120     # how many entries to store in the file
1121     my $max_entries=50;
1122    
1123   foreach my $a (keys %$args) {if ($a =~ /^-(.*)/) {my $b=$1; $args->{$b}=$args->{$a}; delete $args->{$a}}}   foreach my $a (keys %$args) {if ($a =~ /^-(.*)/) {my $b=$1; $args->{$b}=$args->{$a}; delete $args->{$a}}}
1124    
1125   my $filepath=$FIG_Config::fig."/CGI/Html/rss";   my $filepath=$FIG_Config::fig."/CGI/Html/rss";
# Line 1159  Line 1165 
1165    if ($qw eq "link")    if ($qw eq "link")
1166    {    {
1167     $args->{$qw} =~ /^(.*?\.cgi.)(.*)$/;     $args->{$qw} =~ /^(.*?\.cgi.)(.*)$/;
    print STDERR "Got ->>$1<<- and ->>$2<<-\n";  
1168     $args->{$qw} = $1.uri_escape($2) if ($1 && $2);     $args->{$qw} = $1.uri_escape($2) if ($1 && $2);
1169    }    }
1170    
# Line 1193  Line 1198 
1198       $itemcount++;       $itemcount++;
1199       $initem=1;       $initem=1;
1200      }      }
1201      if (/\<\/item\>/) {$initem=0; next if ($itemcount > 9)}      if (/\<\/item\>/) {$initem=0; next if ($itemcount > $max_entries)}
1202      next if ($initem && $itemcount > 9);      next if ($initem && $itemcount > $max_entries);
1203      push @out, $_;      push @out, $_;
1204     }     }
1205     close IN;     close IN;

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3