[$ # Note: unless this open script tag is followed by a comment character (#) the whole thing goes weird use URI::Escape; use HTTP::Date qw/time2iso str2time/; use Time::Local; # Get a list of the channels we're subscribed to, sorted according to saved preferences my $sortorder = get_setting("user_af_channel_sort_by"); my $sortdirection; my @channels; if ($sortorder eq "title") { $sortdirection = "data"; } elsif ($sortorder eq "date_downloaded") { $sortdirection = "reversed_data"; } else { $sortorder = "date_downloaded"; $sortdirection = "reversed_data"; } @channels = get_my_sorted_channels($sortorder, $sortdirection); # Find out if we want detailed channel listings my $detail = uc(get_setting("user_af_channel_detail")) eq "ON" ? 1 : 0; my @alterclass = ("channelrow", "channelrowalter"); my $alter = 0; # Check *outside the loop* whether we need to put in all the details--quicker. if ($detail) { foreach my $channel (@channels) { next unless $channel->{date_downloaded}; my $encoded_xmlurl = uri_escape($channel->{xmlurl}, "^a-zA-Z0-9_.-"); my $encoded_htmlurl = uri_escape($channel->{htmlurl}, "^a-zA-Z0-9_.-"); my $detaillink = "f_details.html?reconfigure=true&user_af_currentfeed_xmlurl=$encoded_xmlurl&user_af_currentfeed_htmlurl=$encoded_htmlurl"; # Alternate row classes $alter = $alter ? 0 : 1; to_browser(qq{\n}); # The freshness icon allows you to see whtether a channel has been recently downloaded. my $then = str2time($channel->{date_downloaded}); my $freshlimit = 60 * get_setting("user_af_channels_freshness_limit"); to_browser(qq{}); # The globe icon takes you to the main web page for the channel to_browser(qq{\n}); # Show the title of the channel. Clicking on the title will show the headlines for the channel in the headlines pane to_browser(qq{\n}); # The email icon allows you to send email to the site's webmaster. This is only shown if the channel has an email address defined. to_browser(qq{}); # The XML icon allows you to view the raw XML for the channel to_browser(qq{}); to_browser(qq{\n}); # Padding to_browser(qq{}); # Show the date downloaded to_browser(qq{}); # Delete button to_browser(qq{}); to_browser(qq{\n}); } } else { foreach my $channel (@channels) { next unless $channel->{date_downloaded}; my $encoded_xmlurl = uri_escape($channel->{xmlurl}, "^a-zA-Z0-9_.-"); my $encoded_htmlurl = uri_escape($channel->{htmlurl}, "^a-zA-Z0-9_.-"); my $detaillink = "f_details.html?reconfigure=true&user_af_currentfeed_xmlurl=$encoded_xmlurl&user_af_currentfeed_htmlurl=$encoded_htmlurl"; # Alternate row classes $alter = $alter ? 0 : 1; to_browser(qq{\t\n}); # The freshness icon allows you to see whether a channel has been recently downloaded. my $then = str2time($channel->{date_downloaded}); my $freshlimit = 60 * get_setting("user_af_channels_freshness_limit"); to_browser(qq{\t\t}); # The globe icon takes you to the main web page for the channel to_browser(qq{\t\t\n}); # Show the title of the channel. Clicking on the title will show the headlines for the channel in the headlines pane to_browser(qq{\t\t\n}); to_browser(qq{\t\n}); } } $OUT = send_to_browser; $]
}); if ((time - $then) < $freshlimit) { to_browser(qq{Fresh!}); } else { to_browser(qq{ }); } to_browser(qq{}); to_browser(qq{}); to_browser(qq{}); to_browser(qq{$channel->{title}}); to_browser(qq{}); if ($channel->{email}) { to_browser(qq{Send an email to '$channel->{title}'.}); } else { to_browser(qq{ }); } to_browser(qq{}); to_browser(qq{View The Raw XML Source Of '$channel->{title}'.}); to_browser(qq{
 }); to_browser(qq{$channel->{date_downloaded}}); to_browser(qq{}); to_browser(qq{Remove this channel from your channel list}); to_browser(qq{
}); if ((time - $then) < $freshlimit) { to_browser(qq{Fresh!}); } else { to_browser(qq{ }); } to_browser(qq{\t\t}); to_browser(qq{}); to_browser(qq{}); to_browser(qq{$channel->{title}}); to_browser(qq{