Ignore:
Timestamp:
Apr 20, 2006, 10:42:05 AM (16 years ago)
Author:
Dominic Hargreaves
Message:

Revert changes using CGI::Wiki::Plugin::Atom pending CGI::Wiki/Wiki::Toolkit refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/Feed.pm

    r753 r769  
    66$VERSION = '0.01';
    77
    8 use CGI::Wiki::Plugin::Atom;
    98use CGI::Wiki::Plugin::RSS::ModWiki;
    109use Time::Piece;
     
    6463    my %known_types = (
    6564                          'rss'  => 1,
    66                           'atom' => 1,
    6765                      );
    6866                     
     
    7371        return $self->rss_maker->recent_changes(%args);
    7472    }
    75     elsif ($feed_type eq 'atom') {
    76         return $self->atom_maker->recent_changes(%args);
    77     }
    78 }
    79 
    80 sub atom_maker {
    81     my $self = shift;
    82  
    83     unless ($self->{atom_maker}) {
    84         $self->{atom_maker} = CGI::Wiki::Plugin::Atom->new(
    85             wiki                => $self->{wiki},
    86             site_name           => $self->{site_name},
    87             site_url            => $self->{config}->script_url,
    88             site_description    => $self->{site_description},
    89             make_node_url       => $self->{make_node_url},
    90             recent_changes_link => $self->{config}->script_url . '?action=rc',
    91             atom_link           => $self->{config}->script_url . '?action=rc&format=atom',
    92             software_name       => 'OpenGuides',
    93             software_homepage   => 'http://openguides.org/',
    94             software_version    => $self->{og_version},
    95         );
    96     }
    97    
    98     $self->{atom_maker};
    9973}
    10074
     
    133107=head1 DESCRIPTION
    134108
    135 Produces RSS 1.0 and Atom 1.0 feeds for OpenGuides.  Distributed and
     109Produces RSS 1.0 feeds for OpenGuides.  Distributed and
    136110installed as part of the OpenGuides project, not intended for independent
    137111installation.  This documentation is probably only useful to OpenGuides
     
    177151invoked this module with.
    178152
    179 =item B<atom_maker>
    180 
    181 Returns a raw L<CGI::Wiki::Plugin::Atom> object created with the values you
    182 invoked this module with.
    183 
    184153=item B<make_feed>
    185154
     
    191160    print $rdf_writer->make_feed( %args );
    192161
    193     # All the changes made by bob in the past week, ignoring minor edits, in Atom.
    194     $args{days}               = 7;
    195     $args{ignore_minor_edits  = 1;
    196     $args{filter_on_metadata} => { username => "bob" };
    197 
    198     print "Content-Type: application/atom+xml\n";
    199     print "Last-Modified: " . $feed->feed_timestamp( %args ) . "\n\n";
    200     print $feed->make_feed( %args );
    201 
    202162=item B<feed_timestamp>
    203163
     
    216176=over 4
    217177
    218 =item * L<CGI::Wiki>, L<CGI::Wiki::Plugin::RSS::ModWiki> and L<CGI::Wiki::Plugin::Atom>
     178=item * L<CGI::Wiki> and L<CGI::Wiki::Plugin::RSS::ModWiki>
    219179
    220180=item * L<http://openguides.org/>
Note: See TracChangeset for help on using the changeset viewer.