Update of /cvsroot/openinteract/OpenInteract2/pkg/news/OpenInteract2/App
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27837/news/OpenInteract2/App
Added Files:
News.pm
Log Message:
OIN-72: move all docs to ::App class
--- NEW FILE: News.pm ---
package OpenInteract2::App::News;
use strict;
use base qw( Exporter OpenInteract2::App );
use OpenInteract2::Manage;
$OpenInteract2::App::News::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
@OpenInteract2::App::News::EXPORT = qw( install );
sub get_brick_name {
return 'news';
}
# Not a method, just an exported sub
sub install {
my ( $website_dir ) = @_;
my $manage = OpenInteract2::Manage->new( 'install_package' );
$manage->param( website_dir => $website_dir );
$manage->param( package_class => __PACKAGE__ );
return $manage->execute;
}
__END__
=pod
=head1 NAME
OpenInteract2::App::News - A package for managing news objects within OpenInteract
=head1 ACTIONS
B<news>
The main news operation. Used for listing, displaying, editing and
removing news items.
Note that just about every template that lists news items adds the
'News Tools' box to the page. You can always remove it in your
template with:
[% OI.box_add( 'news_tools_box', remove => 'yes' ) %]
B<latest_news>
Calls the 'latest' method of the news handler directly. So you can use
it as a component from a template:
[% OI.action_execute( 'latest_news', num_items = 10 ) %]
B<news_section>
Lookup value editor for the news sections.
B<news_tools_box>
Definition for the toolbox with news actions.
=head1 OBJECTS
B<news>
This is a simple news object. It has a title, content and information
about an associated image. You can also assign a section to the news
item to allow for simple partitioning.
B<news_section>
Simple lookup table for sections.
=head1 AUTHORS
Chris Winters E<lt>ch...@cw...E<gt>
=cut
|