You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
| 2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
| 2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
| 2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Chris W. <la...@us...> - 2005-09-21 12:02:13
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv541 Modified Files: Manage.pm Log Message: add object_tags to packages Index: Manage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage.pm,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Manage.pm 17 Mar 2005 14:57:58 -0000 1.49 --- Manage.pm 21 Sep 2005 12:02:04 -0000 1.50 *************** *** 15,24 **** $OpenInteract2::Manage::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); ! my $SYSTEM_PACKAGES = [ ! qw/ base base_box base_error base_group base_page base_security base_template base_theme base_user comments full_text news ! lookup object_activity system_doc whats_new / ! ]; sub SYSTEM_PACKAGES { return $SYSTEM_PACKAGES } --- 15,25 ---- $OpenInteract2::Manage::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); ! my $SYSTEM_PACKAGES = [ qw/ ! base base_box base_error base_group base_page base_security base_template base_theme base_user comments full_text news ! lookup object_activity object_tags system_doc ! whats_new ! /]; sub SYSTEM_PACKAGES { return $SYSTEM_PACKAGES } |
|
From: Chris W. <la...@us...> - 2005-09-21 11:59:06
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31981/doc/Manual Modified Files: Changes.pod Log Message: latest changes Index: Changes.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/Changes.pod,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** Changes.pod 29 Mar 2005 17:16:20 -0000 1.72 --- Changes.pod 21 Sep 2005 11:58:57 -0000 1.73 *************** *** 39,42 **** --- 39,134 ---- =head2 Minor Changes + L<OpenInteract2::Action> + + =over 4 + + =item * + + Add properties 'url_pattern' and 'url_pattern_group'. + + =item * + + Don't cache requests by administrators! (fix in _is_using_cache()) + + =item * + + Add method C<task_security_allowed( $task )> so you can check whether + the current user/group can execute a given task on the same action -- + useful for generating conditional 'Edit' links... + + =back + + L<OpenInteract2::ActionResolver::MatchRegex> + + =over 4 + + =item * + + New class so you can match a URL with an action based on a regular + expression found in the action's 'url_pattern' property, optionally + using the 'url_pattern_group' property as well. + + =back + + L<OpenInteract2::Brick::Apache> + + =over 4 + + =item * + + httpd_modperl.conf: remove reference to old proxy-helper; thanks to + Ken Youens-Clark for the spot. + + =back + + L<OpenInteract2::Brick::Apache> + + =over 4 + + =item * + + oi2_daemon.ini: add 'ReuseAddr = 1' to make the daemon work as + expected. + + =back + + L<OpenInteract2::Brick::WebsiteConfig> + + =over 4 + + =item * + + server.ini: add 'devel_mode = no' to 'Global' configuration section; + if it's set to 'yes' we recreate the temporary library directory with + every server restart. + + =back + + L<OpenInteract2::Cache> + + =over 4 + + =item * + + Modify C<get()> to more easily accommodate the common case of just + passing in a key; instead of using -E<gt>get({ key =E<gt> $key }) + you can now also use -E<gt>get( $key ). + + =item * + + Modify C<set()> to be able to store a non-SPOPS object. + + =back + + L<OpenInteract2::Context> + + =over 4 + + =item * + + Don't log an error when we don't find an action with lookup_action(). + + =back + L<OpenInteract2::Error> *************** *** 51,54 **** --- 143,157 ---- =back + L<OpenInteract2::Manage::Website::ListActions> + + =over 4 + + =item * + + Make the description returned in the message more useful by including + the package name; also specified what 'mapped to' means. + + =back + L<OpenInteract2::Manage::Website::RemovePackage> *************** *** 62,65 **** --- 165,212 ---- =back + L<OpenInteract2::Manage::Website::UpdatePackageFromWebsite> + + =over 4 + + =item * + + Fix old reference to C<package.conf>. Thanks to Ken Youens-Clark for + the tip. + + =back + + L<OpenInteract2::Manual::FAQ> + + =over 4 + + =item * + + OIN-88: Create a FAQ for the end-user rather than framework developer + + =back + + L<OpenInteract2::Response::Apache> + + =over 4 + + =item * + + Sometimes $apache->print(...) would print out 'SCALAR(0x...)' + instead of resolving it for us, so we'll do it ourselves. + + =back + + L<OpenInteract2::Setup::CreateTemporaryLibraryDirectory> + + =over 4 + + =item * + + Look in the server config for the 'devel_mode' key (under 'Global'); + if it's set to 'yes' then we ALWAYS remove the temporary library + directory and recreate it. + + =back + =head2 Package Updates |
|
From: Chris W. <la...@us...> - 2005-09-21 11:58:53
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31938/doc/Manual Modified Files: FAQ.pod Log Message: more Q Index: FAQ.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/FAQ.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FAQ.pod 31 Jul 2005 04:48:54 -0000 1.1 --- FAQ.pod 21 Sep 2005 11:58:43 -0000 1.2 *************** *** 36,40 **** ! =head1 FRAMEWORK =head2 Q: How do the different parts of OI2 fit together? --- 36,40 ---- ! =head1 FRAMEWORK: OVERVIEW =head2 Q: How do the different parts of OI2 fit together? *************** *** 49,52 **** --- 49,60 ---- =head2 Q: Where can I find diagrams for an overview of how OI2 is glued together? + =head1 FRAMEWORK: CUSTOMIZING + + =head2 Q: How can I use my custom templating system? + + + =head2 Q: How can I use my custom database access system? + + =head1 COPYRIGHT |
|
From: Chris W. <la...@us...> - 2005-09-21 04:16:23
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9323/OpenInteract2 Modified Files: Action.pm Log Message: modify URL parameter assigning, etc.; don't cache content generated by administrator requests; add task_security_allowed() plus docs, which led to a small refactoring of some internal security methods Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Action.pm 4 Jul 2005 03:07:53 -0000 1.75 --- Action.pm 21 Sep 2005 04:16:12 -0000 1.76 *************** *** 276,293 **** # check to ensure that's consistent (it discriminates based on # param values) ! ! my @url_params = $self->_get_url_additional_names; ! if ( scalar @url_params ) { ! my $request = CTX->request; ! if ( $request ) { ! my @url_values = $request->param_url_additional; ! my $param_count = 0; ! foreach my $value ( @url_values ) { ! next unless ( $url_params[ $param_count ] ); ! $self->param( $url_params[ $param_count ], $value ); ! $param_count++; ! } ! } ! } my $cached_content = $self->_check_cache; --- 276,280 ---- # check to ensure that's consistent (it discriminates based on # param values) ! $self->url_additional_param_from_request(); my $cached_content = $self->_check_cache; *************** *** 472,475 **** --- 459,490 ---- # SECURITY + sub task_security_allowed { + my ( $self, $task_to_check ) = @_; + unless ( $task_to_check ) { + oi_error "Must provide a task name to check for method ", + "'task_security_allowed()'."; + } + my ( $user_level, $req_level ); + eval { + $user_level = $self->_find_security_level( $task_to_check ); + $req_level = + $self->_find_required_security_for_task( $task_to_check ); + }; + if ( $@ ) { + my $msg = "Caught exception when checking security of " . + "task '$task_to_check': $@"; + $log ||= get_logger( LOG_ACTION ); + $log->warn( $msg ); + return 0; + } + else { + return ( $user_level >= $req_level ); + } + } + + + # side effects! -- assigns 'security_level' and 'security_required' + # properties, and only works on + sub _check_security { my ( $self ) = @_; *************** *** 482,517 **** return $self->security_level unless ( $self->is_secure ); - my $action_security = $self->security; - unless ( $action_security ) { - $log->error( "Secure action, no security configuration" ); - oi_error "Configuration error: action is secured but no ", - "security requirements configured"; - } - my ( $required_level ); - - # NOTE: values in $action_security have already been translated to - # security levels by OI2::Config::Initializer::_action_security_level() - # at server startup. - - # specify security per task... my $task = $self->task; ! if ( ref $action_security eq 'HASH' ) { ! $required_level = $action_security->{ $task } || ! $action_security->{DEFAULT} || ! $action_security->{default}; ! } ! ! # specify security for entire action... ! else { ! $required_level = $action_security; ! } ! ! unless ( defined $required_level ) { ! $log->is_info && ! $log->info( "Assigned security level WRITE to task ", ! "'$task' since no security requirement found" ); ! $required_level = SEC_LEVEL_WRITE; ! } ! $self->security_required( $required_level ); --- 497,502 ---- return $self->security_level unless ( $self->is_secure ); my $task = $self->task; ! my $required_level = $self->_find_required_security_for_task( $task ); $self->security_required( $required_level ); *************** *** 529,533 **** } ! # Find the level for this user/group and this action sub _find_security_level { --- 514,518 ---- } ! # no side effects! -- find the action security level for this user/group sub _find_security_level { *************** *** 537,542 **** unless ( $self->is_secure ) { $log->is_debug && ! $log->debug( sprintf( "Action '%s' not secured assigning " . ! "default level.", $self->name ) ); return DEFAULT_ACTION_SECURITY; } --- 522,527 ---- unless ( $self->is_secure ) { $log->is_debug && ! $log->debug( sprintf( "Action '%s' not secured, assigning " . ! "default level", $self->name ) ); return DEFAULT_ACTION_SECURITY; } *************** *** 558,561 **** --- 543,588 ---- + # no side effects! -- find the level necessary to exec the given task + + sub _find_required_security_for_task { + my ( $self, $task_to_check ) = @_; + + # NOTE: values in $action_security have already been translated to + # security levels by OI2::Config::Initializer::_action_security_level() + # at server startup. + my $action_security = $self->security; + unless ( $action_security ) { + $log->error( "Action ", $self->name, ": Configured as secure ", + "but no security configuration" ); + + # TODO: just return WRITE instead of throwing error? + oi_error "Configuration error: action is secured but no ", + "security requirements configured"; + } + + my $task = $task_to_check || $self->task; + + my ( $required_level ); + + # specify security per task... + if ( ref $action_security eq 'HASH' ) { + $required_level = $action_security->{ $task } || + $action_security->{DEFAULT} || + $action_security->{default}; + } + + # specify security for entire action... + else { + $required_level = $action_security; + } + + unless ( defined $required_level ) { + $log->is_info && + $log->info( "Assigned security level WRITE to task ", + "'$task' since no security requirement found" ); + $required_level = SEC_LEVEL_WRITE; + } + return $required_level; + } ######################################## *************** *** 717,720 **** --- 744,751 ---- return; } + + # do not cache admin requests + return undef if ( CTX->request->auth_is_admin ); + my $expire_time = $expire->{ $self->task } || $expire->{ CACHE_ALL_KEY() } || ''; $log->is_debug && *************** *** 940,943 **** --- 971,1016 ---- + sub url_additional_param { + my ( $self ) = @_; + my @url_params = $self->_get_url_additional_names; + return unless ( scalar @url_params ); + unless ( $self->{_url_additional_assigned} ) { + $self->url_additional_param_from_request; + } + my @values = (); + foreach my $param_name ( @url_params ) { + push @values, $self->param( $param_name ); + } + return @values; + } + + sub url_additional_unassigned { + my ( $self ) = @_; + my @url_params = $self->_get_url_additional_names; + my $request = CTX->request; + return unless ( $request ); + + } + + sub url_additional_param_from_request { + my ( $self ) = @_; + return if ( $self->{_url_additional_assigned} ); + my @url_params = $self->_get_url_additional_names; + return unless ( scalar @url_params ); + my $request = CTX->request; + return unless ( $request ); + + my @url_values = $request->param_url_additional; + my $param_count = 0; + foreach my $value ( @url_values ) { + next unless ( $url_params[ $param_count ] ); + $self->param( $url_params[ $param_count ], $value ); + $param_count++; + } + $self->{_url_additional_assigned}++; + return @url_values; + } + + # shortcuts... *************** *** 2211,2216 **** } ! (Note: you will never need to do this since the ! C<_find_security_level()> method does this (and more) for you.) B<security_level> ($) --- 2284,2291 ---- } ! NOTE: you will never need to do this since the ! C<_find_security_level()> method does this (and more) for you; you can ! also use the public C<task_security_allowed( $some_task )> to whether ! the current user/group can execute C<$some_task> in this action. B<security_level> ($) *************** *** 2491,2494 **** --- 2566,2590 ---- } + C<task_security_allowed( $task_to_check )> + + Returns true or false depending on whether the current user/group is + allowed to execute the task C<$task_to_check> on this action. This is + very useful to be able to display conditional links based on a user's + capabilities. For instance, if I wanted to display an 'Edit me' link + depending on whether a user had the ability to execute the 'edit' task + within my action, I could do: + + [% IF ACTION.task_security_allowed( 'edit' ) %] + <a href="...">Edit me</a> + [% END %] + + Will throw an exception if not given C<$task_to_check>. + + If you need the security level of the current user/group for this + action, just look in the property C<security_level>. + + Returns: true if current user/group can execute C<$task_to_check>, + false if not + =head2 Object Execution Methods |
|
From: Chris W. <la...@us...> - 2005-09-21 04:11:56
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8880/OpenInteract2/Filter Modified Files: AllCaps.pm Log Message: use new observer.ini format Index: AllCaps.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Filter/AllCaps.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AllCaps.pm 18 Mar 2005 04:09:50 -0000 1.2 --- AllCaps.pm 21 Sep 2005 04:11:46 -0000 1.3 *************** *** 32,36 **** # map the observer to an action ! [observer action] allcaps = myaction --- 32,36 ---- # map the observer to an action ! [map] allcaps = myaction |
|
From: Chris W. <la...@us...> - 2005-09-21 04:11:32
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8797/OpenInteract2/Controller Modified Files: MainTemplate.pm Log Message: allow overriding of the main template from the request parameter (useful debugging...) Index: MainTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller/MainTemplate.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MainTemplate.pm 17 Mar 2005 14:58:01 -0000 1.9 --- MainTemplate.pm 21 Sep 2005 04:11:19 -0000 1.10 *************** *** 21,27 **** sub init { my ( $self ) = @_; ! if ( CTX->request->param( 'no_template' ) eq 'yes' ) { $self->no_template( 'yes' ); } $self->init_boxes; $self->init_templates; --- 21,31 ---- sub init { my ( $self ) = @_; ! my $req = CTX->request; ! if ( $req->param( 'no_template' ) eq 'yes' ) { $self->no_template( 'yes' ); } + if ( my $main_template = $req->param( 'oi_main_template' ) ) { + $self->main_template( $main_template ); + } $self->init_boxes; $self->init_templates; |
|
From: Chris W. <la...@us...> - 2005-09-21 04:10:17
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8692/OpenInteract2 Modified Files: URL.pm Log Message: fix typo Index: URL.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/URL.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** URL.pm 18 Mar 2005 04:09:48 -0000 1.31 --- URL.pm 21 Sep 2005 04:10:09 -0000 1.32 *************** *** 95,99 **** $log->debug( "Creating static URL from '$url_base' ", "and params '$param_info'" ); ! return $class->create_image( $url_base, $params, $do_not_escape ); } $log->is_debug && --- 95,99 ---- $log->debug( "Creating static URL from '$url_base' ", "and params '$param_info'" ); ! return $class->create_static( $url_base, $params, $do_not_escape ); } $log->is_debug && |
|
From: Chris W. <la...@us...> - 2005-09-21 04:09:29
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8550/OpenInteract2 Modified Files: Response.pm Log Message: cosmetic Index: Response.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Response.pm 17 Mar 2005 14:57:58 -0000 1.28 --- Response.pm 21 Sep 2005 04:09:20 -0000 1.29 *************** *** 178,183 **** "'$filename': file does not exist"; } ! $log->is_debug && ! $log->debug( "Set response information for file '$filename'" ); unless ( $self->header( 'Content-Length' ) ) { $self->header( 'Content-Length', (stat $filename)[7] ); --- 178,183 ---- "'$filename': file does not exist"; } ! $log->is_info && ! $log->info( "Set response information for file '$filename'" ); unless ( $self->header( 'Content-Length' ) ) { $self->header( 'Content-Length', (stat $filename)[7] ); |
|
From: Chris W. <la...@us...> - 2005-09-21 04:09:02
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8513/OpenInteract2 Modified Files: Observer.pm Log Message: cosmetic Index: Observer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Observer.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Observer.pm 18 Mar 2005 04:09:48 -0000 1.4 --- Observer.pm 21 Sep 2005 04:08:53 -0000 1.5 *************** *** 33,36 **** --- 33,38 ---- } } + + # barely documented: Allow registration of objects... elsif ( my $observer_obj = $observer_info->{object} ) { my $error = $class->_require_module( $observer_obj ); *************** *** 48,51 **** --- 50,55 ---- } } + + # barely documented: Allow registration of coderefs... elsif ( my $observer_sub = $observer_info->{sub} ) { $observer_sub =~ /^(.*)::(.*)$/; *************** *** 229,238 **** # You can also declare the observer in your package's package.conf # file; it's mapped the same no matter where it's declared ! # File: pkg/mypackage-2.00/package.conf ! name mypackage ! version 2.00 ! author Kilroy (ki...@wa...) ! observer allcaps OpenInteract2::Filter::AllCaps # Create the filter -- see OpenInteract2::Filter::AllCaps shipped --- 233,247 ---- # You can also declare the observer in your package's package.conf # file; it's mapped the same no matter where it's declared ! # File: pkg/mypackage-2.00/package.ini ! [package] ! name = mypackage ! version = 2.00 ! author = Kilroy (ki...@wa...) ! ! [package observer] ! allcaps = OpenInteract2::Filter::AllCaps ! ! ... # Create the filter -- see OpenInteract2::Filter::AllCaps shipped *************** *** 264,269 **** Most observers react to one or two types of events. For instance, if ! you're using the C<delicious_tags> package there's an observer that ! looks like this: sub update { --- 273,278 ---- Most observers react to one or two types of events. For instance, if ! you're using the C<object_tags> package there's an observer that looks ! like this: sub update { *************** *** 390,415 **** Most of the time you'll register an observer name with a class. The following registers two observers to classes under the names 'wiki' ! and 'delicious_tag': [observer] wiki = OpenInteract2::Observer::Wikify ! delicious_tag = OpenInteract2::Observer::AddDeliciousTags ! ! This standard usage is actually a shortcut for: ! ! [observer wiki] ! class = OpenInteract2::Observer::Wikify ! ! [observer delicious_tag] ! class = OpenInteract2::Observer::AddDeliciousTags ! ! Or more generically: ! ! [observer observer-name] ! observation-type = value ! In addition to assigning class observers register a particular ! subroutine or object instance. The three observation types are ! 'class', 'object' and 'sub' (see L<Class::Observable|Class::Observable> for what these mean and how they are setup), so you could have: --- 399,411 ---- Most of the time you'll register an observer name with a class. The following registers two observers to classes under the names 'wiki' ! and 'object_tag': [observer] wiki = OpenInteract2::Observer::Wikify ! object_tag = OpenInteract2::Observer::AddObjectTags ! In addition to assigning class observers you can also register a ! particular subroutine or object instance. The three observation types ! are 'class', 'object' and 'sub' (see L<Class::Observable|Class::Observable> for what these mean and how they are setup), so you could have: *************** *** 421,426 **** sub = OpenInteract2::FooFilter::other_sub ! Using the object is fairly rare and you should probably use the class observer for ! its simplicity. =head2 Configuration: Mapping the Observer to an Action --- 417,422 ---- sub = OpenInteract2::FooFilter::other_sub ! Using the object is fairly rare and you should probably use the class ! observer for its simplicity. =head2 Configuration: Mapping the Observer to an Action *************** *** 429,438 **** C<$WEBSITE_DIR/conf/observer.ini>. Under the 'map' section you assign an observer to one or more actions. Here as assign the observer 'wiki' ! to 'news' and 'page' and 'delicious_tag' to 'news': [map] wiki = news wiki = page ! delicious_tag = news Note that the mapping is ignorant of: --- 425,440 ---- C<$WEBSITE_DIR/conf/observer.ini>. Under the 'map' section you assign an observer to one or more actions. Here as assign the observer 'wiki' ! to 'news' and 'page' and 'object_tag' to 'news': [map] wiki = news wiki = page ! object_tag = news ! ! You could also use the standard INI-shortcuts for lists: ! ! [map] ! @,wiki = news,page ! object_tag = news Note that the mapping is ignorant of: *************** *** 456,459 **** --- 458,463 ---- L<Class::Observable> + L<OpenInteract2::Setup::InitializeObservers> + =head1 COPYRIGHT |
|
From: Chris W. <la...@us...> - 2005-09-21 04:07:16
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8274 Modified Files: MANIFEST Changes Log Message: meta Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/MANIFEST,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MANIFEST 29 Mar 2005 05:10:36 -0000 1.1 --- MANIFEST 21 Sep 2005 04:07:08 -0000 1.2 *************** *** 15,20 **** --- 15,22 ---- OpenInteract2/Observer/AddObjectTags.pm OpenInteract2/SQLInstall/ObjectTags.pm + OpenInteract2/TT2/ObjectTagPlugin.pm template/related_tags.tmpl template/tag_listing.tmpl template/tagged_objects.tmpl template/tagged_objects_page.tmpl + template/tags_for_object.tmpl Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changes 29 Mar 2005 05:10:36 -0000 1.1 --- Changes 21 Sep 2005 04:07:08 -0000 1.2 *************** *** 1,4 **** --- 1,32 ---- Revision history for OpenInteract2 package object_tags. + 0.63 Mon Sep 19 23:02:26 EDT 2005 + + Use message key for tag field in OI2::Observer::AddObjectTags, + document that observer isn't mappe in package.ini + + 0.62 Sun Sep 18 14:37:14 EDT 2005 + + Add new component 'my_tags' to product a simple tag listing for + an object. (Similar to the plugin method 'lookup_tags', but it + includes a label and links.) + + 0.61 Sun Jul 31 01:05:42 EDT 2005 + + - Be able to pass in a 'restrict_to' when you're listing objects + by tag, allowing you to see (for instance) all 'news' objects + with the 'yapc' tag. + + - Add TT2 plugin for object tags (e.g., so you can use + 'TAGS.lookup_tags( $some_object )'; see + OpenInteract2::TT2::ObjectTagPlugin for more + + - Add messages for 'Object Tags' and 'object tags field name' + + - Add HTML::TagCloud as dependency, add 'build_cloud' to module + dependency and allow action to specify whether it's going to + display a tag cloud or not if it's using the 'tag_listing' + template. + 0.60 Wed Mar 23 22:59:13 EST 2005 |
|
From: Chris W. <la...@us...> - 2005-09-21 04:07:08
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8237 Modified Files: package.ini Log Message: add template plugin, ref to observer Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/package.ini,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** package.ini 29 Mar 2005 05:10:36 -0000 1.1 --- package.ini 21 Sep 2005 04:06:59 -0000 1.2 *************** *** 1,8 **** [package] ! name = object_tags ! version = 0.60 ! author = Chris Winters <ch...@cw...> ! url = http://www.openinteract.org/ ! sql_installer = OpenInteract2::SQLInstall::ObjectTags ! config_watcher = OpenInteract2::ObjectTagWatcher ! description = Lightweight tags to relate any objects. --- 1,18 ---- [package] ! name = object_tags ! version = 0.63 ! author = Chris Winters <ch...@cw...> ! url = http://www.openinteract.org/ ! module = HTML::TagCloud ! sql_installer = OpenInteract2::SQLInstall::ObjectTags ! config_watcher = OpenInteract2::ObjectTagWatcher ! description = Lightweight tags to relate any objects. ! ! [package template_plugin] ! TAGS = OpenInteract2::TT2::ObjectTagPlugin ! ! # NOTE: we don't include the observer here because it's in the default ! # $WEBSITE_DIR/conf/observer.ini, but you can uncomment if you want ! # ! #[package observer] ! #object_tag = OpenInteract2::Observer::AddObjectTags |
|
From: Chris W. <la...@us...> - 2005-09-21 04:06:35
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8168/template Modified Files: tag_listing.tmpl related_tags.tmpl Log Message: add HTML::TagCloud option Index: tag_listing.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template/tag_listing.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tag_listing.tmpl 29 Mar 2005 05:10:38 -0000 1.1 --- tag_listing.tmpl 21 Sep 2005 04:06:27 -0000 1.2 *************** *** 1,6 **** ! [% FOREACH tag_count = tag_and_count; ! tagged_objects_url = OI.make_url( ACTION = 'tags', ! TASK = 'show_tagged_objects', ! tag = tag_count.0 ); %] o <span class="tagListing"><a href="[% tagged_objects_url %]">[% tag_count.0 %]</a> ([% tag_count.1 %])</span><br /> ! [% END %] --- 1,11 ---- ! [%- IF ACTION.use_cloud -%] ! [%- tag_cloud = TAGS.build_cloud( tag_and_count ); ! tag_cloud.html_and_css; -%] ! [%- ELSE -%] ! [%- FOREACH tag_count = tag_and_count; ! tagged_objects_url = OI.make_url( ACTION = 'tags', ! TASK = 'show_tagged_objects', ! tag = tag_count.0 ); %] o <span class="tagListing"><a href="[% tagged_objects_url %]">[% tag_count.0 %]</a> ([% tag_count.1 %])</span><br /> ! [% END -%] ! [%- END -%] \ No newline at end of file Index: related_tags.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template/related_tags.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** related_tags.tmpl 29 Mar 2005 05:10:38 -0000 1.1 --- related_tags.tmpl 21 Sep 2005 04:06:27 -0000 1.2 *************** *** 2,5 **** [% INCLUDE object_tags::tag_listing %] [% ELSE %] ! [% MSG( 'tags.no_related_tags' ) %] [% END %] \ No newline at end of file --- 2,5 ---- [% INCLUDE object_tags::tag_listing %] [% ELSE %] ! [% MSG( 'object_tags.no_related' ) %] [% END %] \ No newline at end of file |
|
From: Chris W. <la...@us...> - 2005-09-21 04:06:06
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8107/template Added Files: tags_for_object.tmpl Log Message: add simple template for listing a bunch of tags next to a label --- NEW FILE: tags_for_object.tmpl --- [% MSG( 'object_tags.label.tags' ) -%] [%- FOREACH tag_info = tag_and_count; tagged_objects_url = OI.make_url( ACTION = 'tags', TASK = 'show_tagged_objects', tag = tag_count.0 ); -%] <a href="[% tagged_objects_url %]">[% tag_count.0 %]</a> [% END -%] |
|
From: Chris W. <la...@us...> - 2005-09-21 04:05:46
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/Observer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8021/OpenInteract2/Observer Modified Files: AddObjectTags.pm Log Message: make the field we use to lookup the tag values configurable Index: AddObjectTags.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/Observer/AddObjectTags.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddObjectTags.pm 29 Mar 2005 05:10:37 -0000 1.1 --- AddObjectTags.pm 21 Sep 2005 04:05:35 -0000 1.2 *************** *** 33,40 **** return; } ! my $tag_listing = $action->param( 'tags' ) ! || CTX->request->param( 'tags' ); unless ( $tag_listing ) { ! $log->warn( "No object tags found $action_desc" ); return; } --- 33,45 ---- return; } ! my $lh = CTX->language_handle(); ! my $tag_field = $action->param( 'tag_field' ) ! || $lh->maketext( 'object_tags.tag_field' ) ! || 'tags'; ! my $tag_listing = $action->param( $tag_field ) ! || CTX->request->param( $tag_field ); unless ( $tag_listing ) { ! $log->warn( "No object tags found in param ", ! "'$tag_field' $action_desc" ); return; } *************** *** 95,109 **** =item * ! Finds the tags to attach in the action parameter 'tags' or the ! L<OpenInteract2::Request> parameter 'tags'. If no tags are found the ! observer does nothing. =item * ! On finding everything we pass the data to the C<add_tags> method of ! L<OpenInteract2::TaggableObject>. =back =head1 SEE ALSO --- 100,148 ---- =item * ! Finds the tags to attach in one of the fields listed below. If no tags ! are found in that field the observer does nothing. =item * ! On finding the object and associated tags we pass the data to the ! C<add_tags> method of L<OpenInteract2::TaggableObject>. =back + =head2 Finding the tags + + You can specify the field to lookup tag values using the first match + of the following: + + =over 4 + + =item 1. + + The field in the action parameter 'tag_field', such as: + + [myaction] + class = OpenInteract2::Action::MyAction + tag_field = mytags + + Which would correspond to the input field: + + <input name="mytags" ... + + =item 2. + + The message key 'object_tags.tag_field', which allows: + + <input name="[% MSG( 'object_tags.tag_field' ) %]" ... + + =item 3. + + The value 'tags' + + =back + + So we cycle through each of these and on the first found, check both + the action parameter and request parameter for a value. First found + wins. (It's almost always in the request parameter.) + =head1 SEE ALSO |
|
From: Chris W. <la...@us...> - 2005-09-21 04:05:12
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/msg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7925/msg Modified Files: object_tags-en.msg Log Message: like every other pkg, use keys instead of messages Index: object_tags-en.msg =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/msg/object_tags-en.msg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_tags-en.msg 29 Mar 2005 05:10:38 -0000 1.1 --- object_tags-en.msg 21 Sep 2005 04:05:02 -0000 1.2 *************** *** 1,4 **** ! tags.related_tags_box.title = Related Tags ! tags.no_related_tags = No related tags. ! tags.all_tags_box.title = All Tags ! tags.error.related_objects_no_tag = Must specify 'tag' to find related objects. \ No newline at end of file --- 1,9 ---- ! object_tags.title.related = Related Tags ! object_tags.no_related = No related tags. ! object_tags.title.all = All Tags ! object_tags.title.object_tags = Object Tags ! object_tags.label.tags = Tags: ! object_tags.tag_field = tags ! object_tags.error.related_no_tag = Must specify 'tag' to find related objects. ! ! |
|
From: Chris W. <la...@us...> - 2005-09-21 04:04:48
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7850/conf Modified Files: action.ini Log Message: add some more actions along with the HTML::TagCloud option Index: action.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/conf/action.ini,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** action.ini 29 Mar 2005 05:10:37 -0000 1.1 --- action.ini 21 Sep 2005 04:04:40 -0000 1.2 *************** *** 5,9 **** url_none = yes weight = 2 ! title_key = tags.related_tags_box.title cache_expire = 10m template_source = object_tags::related_tags --- 5,10 ---- url_none = yes weight = 2 ! title_key = object_tags.title.related ! use_cloud = yes cache_expire = 10m template_source = object_tags::related_tags *************** *** 15,22 **** url_none = yes weight = 2 ! title_key = tags.all_tags_box.title cache_expire = 10m template_source = object_tags::tag_listing # meant to be used as component [tagged_objects] --- 16,33 ---- url_none = yes weight = 2 ! title_key = object_tags.title.all ! use_cloud = yes cache_expire = 10m template_source = object_tags::tag_listing + [tags] + class = OpenInteract2::Action::ObjectTags + is_secure = no + use_cloud = yes + + [tags template_source] + show_tagged_objects = object_tags::tagged_objects_page + all_tags = object_tags::tag_listing + # meant to be used as component [tagged_objects] *************** *** 27,35 **** template_source = object_tags::tagged_objects ! [tags] class = OpenInteract2::Action::ObjectTags is_secure = no ! ! [tags template_source] ! show_tagged_objects = object_tags::tagged_objects_page ! all_tags = object_tags::tag_listing --- 38,46 ---- template_source = object_tags::tagged_objects ! # meant to be used as component -- see also tags plugin method 'lookup_tags' ! [my_tags] class = OpenInteract2::Action::ObjectTags + task = related_tags is_secure = no ! url_none = yes ! template_source = object_tags::tags_for_object |
|
From: Chris W. <la...@us...> - 2005-09-21 04:04:06
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/TT2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7777/OpenInteract2/TT2 Added Files: ObjectTagPlugin.pm Log Message: add simple plugin for tags --- NEW FILE: ObjectTagPlugin.pm --- package OpenInteract2::TT2::ObjectTagPlugin; # $Id: ObjectTagPlugin.pm,v 1.1 2005/09/21 04:03:58 lachoy Exp $ use strict; use HTML::TagCloud; use OpenInteract2::Context qw( CTX ); use OpenInteract2::TaggableObject; $OpenInteract2::TT2::ObjectTagPlugin::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/); # Simple stub to load/create the plugin object. Since it's really just # a way to call subroutines and doesn't maintain any state within the # request, we can just return the same one again and again sub load { my ( $class, $context ) = @_; return bless( { _CONTEXT => $context }, $class ); } sub new { my ( $self, $context, @params ) = @_; return $self; } sub lookup_tags { my ( $self, $object ) = @_; return OpenInteract2::TaggableObject->fetch_my_tags( $object ); } sub build_cloud { my ( $self, $tag_and_count ) = @_; $tag_and_count ||= []; my $cloud = HTML::TagCloud->new(); my $tag_action = CTX->lookup_action( 'tags' ); foreach my $info ( @{ $tag_and_count } ) { my $url = $tag_action->create_url({ TASK => 'show_tagged_objects', tag => $info->[0] }); $cloud->add( $info->[0], $url, $info->[1] ); } return $cloud; } 1; __END__ =head1 NAME OpenInteract2::TT2::ObjectTagPlugin - TT2 Plugin for performing object tag operations =head1 SYNOPSIS # Use in text... [%- tags = TAGS.lookup_tags( my_object ); tag_listing = tags.join( ', ' ) -%] Tags for this object are: [% tag_listing %] # ...or in a form field [%- tag_values = is_saved ? tag_listing.join( ' ' ) : '' -%] [% INCLUDE label_form_text_row( label_key = 'Object Tags', name = MSG( 'object_tags.tag_field' ), value = TAGS.lookup_tags( my_object ), size = 40, maxlength = 255 ); %] =head1 DESCRIPTION This is a simple plugin that allows you to call some tagging methods from a template, very useful for a package that cuts across other packages. =head1 PLUGIN METHODS B<lookup_tags( $tagged_object )> Returns an arrayref of tags associated with C<$tagged_object>. If no tags available returns an empty arrayref. Note that for similar functionality you can also use the component 'my_tags' and get back a space-separated list of linked tags with a 'Tags:' label: [% OI.action_execute( 'my_tags', object = $my_object ) %] B<build_cloud( \@tag_and_count )> Take an arrayref of arrayrefs in the format: 0: tag 1: count of tag and return an L<HTML::TagCloud> object from them. To display the cloud in HTML you can do: [% cloud.html_and_css %] to get the HTML and CSS together, or you can separate them: [% cloud.css %] ... [% cloud.html %] You can also pass a limit to any of these methods, ensuring you only get the top n tags: [% cloud.html_and_css( 50 ) %] =head1 SEE ALSO L<OpenInteract2::ContentGenerator::TT2Process> L<Template::Plugin> L<HTML::TagCloud> =head1 COPYRIGHT Copyright (c) 2005 Chris Winters. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Chris Winters E<lt>ch...@cw...<gt> |
|
From: Chris W. <la...@us...> - 2005-09-21 03:56:28
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6850/OpenInteract2/Action Modified Files: ObjectTags.pm Log Message: be able to restrict tag listing; add 'use_cloud' for template shortcut Index: ObjectTags.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/Action/ObjectTags.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectTags.pm 29 Mar 2005 05:10:37 -0000 1.1 --- ObjectTags.pm 21 Sep 2005 03:56:15 -0000 1.2 *************** *** 12,15 **** --- 12,21 ---- $OpenInteract2::Action::ObjectTags::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); + # shortcut for template... + sub use_cloud { + my ( $self ) = @_; + return ( $self->param( 'use_cloud' ) =~ /^yes$/i ); + } + sub all_tags { my ( $self ) = @_; *************** *** 50,59 **** my $request = CTX->request; my $tag = $self->param( 'tag' ) || $request->param( 'tag' ); ! my %params = ( tag => $tag ); if ( $tag ) { my $tag_class = CTX->lookup_object( 'object_tag' ); my $object_refs = $tag_class->fetch_group({ ! where => 'tag = ?', ! value => [ $tag ], }); $params{tag_info} = $object_refs; --- 56,76 ---- my $request = CTX->request; my $tag = $self->param( 'tag' ) || $request->param( 'tag' ); ! my $restrict_to = $self->param( 'restrict_to_type' ) ! || $request->param( 'restrict_to_type' ); ! my %params = ( ! tag => $tag, ! restrict_to => $restrict_to, ! ); if ( $tag ) { my $tag_class = CTX->lookup_object( 'object_tag' ); + my @where = ( 'tag = ?' ); + my @value = ( $tag ); + if ( $restrict_to ) { + push @where, 'object_type = ?'; + push @value, $restrict_to; + } my $object_refs = $tag_class->fetch_group({ ! where => join( ' AND ', @where ), ! value => \@value,, }); $params{tag_info} = $object_refs; *************** *** 61,65 **** else { $self->param_add( ! error_msg => $self->_msg( 'tags.error.related_objects_no_tag' ) ); } return \%params; --- 78,83 ---- else { $self->param_add( ! error_msg => $self->_msg( 'object_tags.error.related_no_tag' ) ! ); } return \%params; |
|
From: Chris W. <la...@us...> - 2005-09-21 03:39:47
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4782 Modified Files: Changes package.ini Log Message: meta Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/Changes,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Changes 18 Mar 2005 03:26:22 -0000 1.24 --- Changes 21 Sep 2005 03:39:40 -0000 1.25 *************** *** 1,4 **** --- 1,18 ---- Revision history for OpenInteract package news. + 2.28 Mon Sep 19 22:12:12 EDT 2005 + + Remove security from news objects, rely on application-level + security instead. + + 2.27 Sun Sep 18 20:59:38 EDT 2005 + + Update templates to use slightly different layout, based on CSS + instead of tables. + + 2.26 Sun Jul 3 23:10:56 EDT 2005 + + Intermediate to see how the tag field change works... + 2.25 Thu Mar 17 21:35:30 EST 2005 Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/package.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** package.ini 18 Mar 2005 03:26:22 -0000 1.4 --- package.ini 21 Sep 2005 03:39:40 -0000 1.5 *************** *** 1,5 **** [package] name = news ! version = 2.25 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ --- 1,5 ---- [package] name = news ! version = 2.28 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2005-09-21 03:39:32
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4732/template Modified Files: news_item.tmpl news_home.tmpl news_form.tmpl news_detail.tmpl archive_count.tmpl Log Message: add CSS, better formatting (not yet complete, esp. with forms) Index: news_item.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/news_item.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** news_item.tmpl 19 Mar 2004 05:57:59 -0000 1.5 --- news_item.tmpl 21 Sep 2005 03:39:24 -0000 1.6 *************** *** 1,18 **** ! <p> ! <span class="news.title">[% news.title %]</span> ! <span class="news.section">([% news.section %])</span> ! </p> ! <p> ! <span class="news.post_date">[% MSG( 'news.item.posted_date', OI.date_format( news.posted_on ) ) %]</span> ! [%- poster = news.posted_by_user %] [%- IF poster -%] [% user_url = OI.make_url( ACTION = 'user', TASK = 'display', user_id = poster.id ) %] ! <span class="news.author">[% MSG( 'news.item.posted_by', user_url, poster.login_name ) %]</span> [%- END -%] </p> ! <p class="news.content"> [% IF news.image_src %] [%- IF news.image_url %]<a href="[% news.image_url %]"> --- 1,34 ---- ! [%- ! detail_url = OI.make_url( ACTION = 'news', TASK = 'display', ! URL_PARAMS = news.id ); ! edit_url = OI.make_url( ACTION = 'news', TASK = 'display_form', ! URL_PARAMS = news.id ); ! post_date = OI.date_format( news.posted_on, '%Y-%b-%d %I:%M %p' ); ! poster = news.posted_by_user; ! -%] ! <div class="newsItem"> ! <h3 class="newsTitle">[% news.title %]</h3> ! ! ! [% IF ACTION.task_security_allowed( 'edit' ) -%] ! <div class="newsAdmin"> ! <p><a href="[% edit_url %]">[% MSG( 'news.item.edit' ) %]</a></p> ! </div> ! [%- END %] ! ! <p class="newsPostInfo"> [%- IF poster -%] [% user_url = OI.make_url( ACTION = 'user', TASK = 'display', user_id = poster.id ) %] ! [% MSG( 'news.item.posted_user_and_date', ! user_url, poster.login_name, post_date ) %] ! [%- ELSE -%] ! [% MSG( 'news.item.posted_on_date', post_date ) %] [%- END -%] </p> ! <div class="newsContent"> ! [% IF news.image_src %] [%- IF news.image_url %]<a href="[% news.image_url %]"> *************** *** 21,23 **** --- 37,51 ---- [% END %] [% news.news_item %] + + <div class="newsLinks"> + <p> + [ [% OI.action_execute( 'my_tags', object = news ) %] ] + [ [% OI.action_execute( 'show_comment_summary', object = news ) %] ] + [ <a rel="bookmark" + href="[% detail_url %]">[% MSG( 'news.item.permalink' ) %]</a> ] </p> + </div> + + </div> <!-- newsContent --> + + </div> <!--news --> Index: news_home.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/news_home.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** news_home.tmpl 2 Mar 2005 15:21:44 -0000 1.5 --- news_home.tmpl 21 Sep 2005 03:39:24 -0000 1.6 *************** *** 1,3 **** ! [%- OI.box_add( 'news_tools_box' ); DEFAULT num_latest = 10 -%] --- 1,4 ---- ! [%- OI.box_add( 'news_archive_monthly' ); ! OI.box_add( 'all_tags_box' ); DEFAULT num_latest = 10 -%] *************** *** 5,9 **** PROCESS status_message; -%] ! [% INCLUDE news::news_filter_form %] <h2>[% MSG( 'news.home.title' ) %]</h2> --- 6,10 ---- PROCESS status_message; -%] ! <div class="demarcatePage"> <h2>[% MSG( 'news.home.title' ) %]</h2> *************** *** 11,13 **** <p>[% MSG( 'news.home.summary', num_latest ) %]</p> ! [% OI.action_execute( 'latest_news', num_items = num_latest ) %] \ No newline at end of file --- 12,16 ---- <p>[% MSG( 'news.home.summary', num_latest ) %]</p> ! </div> <!-- demarcatePage --> ! ! [% OI.action_execute( 'latest_news', num_items = num_latest ) %] Index: news_form.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/news_form.tmpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** news_form.tmpl 9 Jun 2004 02:18:50 -0000 1.9 --- news_form.tmpl 21 Sep 2005 03:39:24 -0000 1.10 *************** *** 14,21 **** [% task = ( is_saved ) ? 'update' : 'add' -%] ! [% PROCESS form_begin( ACTION = 'news', ! TASK = task, ! method = 'POST', ! name = 'news' ) -%] <h2>[% title %]</h2> --- 14,19 ---- [% task = ( is_saved ) ? 'update' : 'add' -%] ! [% PROCESS form_begin( ACTION = 'news', TASK = task, ! method = 'POST', name = 'news' ) -%] <h2>[% title %]</h2> *************** *** 53,62 **** [%- count = count + 1 -%] ! [% INCLUDE label_form_select_row( label_key = 'news.info.section', ! name = 'section', ! picked = news.section, ! list = section_list, ! value_field = 'section', ! first_label = '---News Sections---' ) -%] [%- count = count + 1 -%] --- 51,60 ---- [%- count = count + 1 -%] ! [%- tag_values = is_saved ? TAGS.lookup_tags( news ).join( ' ' ) : '' -%] ! [% INCLUDE label_form_text_row( label_key = 'object_tags.title.object_tags', ! name = MSG( 'object_tags.tag_field' ), ! value = tag_values, ! size = 40, ! maxlength = 255 ); %] [%- count = count + 1 -%] Index: news_detail.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/news_detail.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** news_detail.tmpl 12 Jun 2004 23:22:35 -0000 1.6 --- news_detail.tmpl 21 Sep 2005 03:39:24 -0000 1.7 *************** *** 1,4 **** [%- OI.page_title( MSG( 'news.detail.page_title', news.title ) ); ! OI.box_add( 'news_tools_box', news = news ); DEFAULT theme = OI.theme_properties; PROCESS error_message; --- 1,5 ---- [%- OI.page_title( MSG( 'news.detail.page_title', news.title ) ); ! OI.box_add( 'news_archive_monthly' ); ! OI.box_add( 'all_tags_box' ); DEFAULT theme = OI.theme_properties; PROCESS error_message; *************** *** 26,42 **** </p> - [% IF news.tmp_security_level >= OI.security_level.write %] - [% edit_url = OI.make_url( ACTION = 'news', - TASK = 'display_form', - news_id = news.id ) -%] - [% END %] - - <p align="right">[% MSG( 'news.detail.edit_link', edit_url ) %]</p> - - <h2>[% MSG( 'news.detail.title' ) %]</h2> - [% INCLUDE news::news_item -%] <h2>[% MSG( 'news.detail.comments' ) %]</h2> ! [% OI.action_execute( 'show_comment_by_object', object => news ) %] --- 27,37 ---- </p> [% INCLUDE news::news_item -%] + <div class="commentsUnderContent"> + <h2>[% MSG( 'news.detail.comments' ) %]</h2> ! [% OI.action_execute( 'show_comment_by_object', object = news ) %] ! ! </div> <!-- commentsUnderContent --> \ No newline at end of file Index: archive_count.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/archive_count.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** archive_count.tmpl 2 Mar 2005 15:21:44 -0000 1.1 --- archive_count.tmpl 21 Sep 2005 03:39:24 -0000 1.2 *************** *** 2,5 **** archive_url = OI.make_url( ACTION = 'news', TASK = 'archive', URL_PARAMS = [ info.year, info.month ] ); -%] ! <a href="[% archive_url %]">[% info.month %]/[% info.year %]</a>: [% info.count %] <br /> [% END -%] \ No newline at end of file --- 2,5 ---- archive_url = OI.make_url( ACTION = 'news', TASK = 'archive', URL_PARAMS = [ info.year, info.month ] ); -%] ! <a href="[% archive_url %]">[% info.month %]/[% info.year %]</a> ([% info.count %]) [% END -%] \ No newline at end of file |
|
From: Chris W. <la...@us...> - 2005-09-21 03:39:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news/msg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4654/msg Modified Files: news-messages-en.msg Log Message: few message updates Index: news-messages-en.msg =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/msg/news-messages-en.msg,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** news-messages-en.msg 2 Mar 2005 15:21:44 -0000 1.4 --- news-messages-en.msg 21 Sep 2005 03:39:03 -0000 1.5 *************** *** 23,28 **** --- 23,36 ---- news.home.summary = The latest [_1] news entries are included below. To \ view other entries, use the form above. + + # next two are old + not used in templates anymore, keep for compat news.item.posted_date = Posted on [_1] news.item.posted_by = by <a href="[_1]">[_2]</a> + + news.item.posted_user_and_date = <a href="[_1]">[_2]</a> on [_3] + news.item.posted_on_date = on [_1] + news.item.edit = Edit + news.item.permalink = Permanent + news.list.title = News Entries news.list.count = Active news stories: [_1] |
|
From: Chris W. <la...@us...> - 2005-09-21 03:38:47
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4559/conf Modified Files: action.ini Log Message: ensure form displays are secured Index: action.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/conf/action.ini,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** action.ini 2 Mar 2005 15:21:44 -0000 1.14 --- action.ini 21 Sep 2005 03:38:37 -0000 1.15 *************** *** 33,36 **** --- 33,38 ---- [news security] DEFAULT = READ + display_form = WRITE + display_add = WRITE edit = WRITE remove = WRITE |
|
From: Chris W. <la...@us...> - 2005-09-21 03:38:35
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4514/conf Modified Files: spops_news.ini Log Message: rely on app security instead of object security Index: spops_news.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/conf/spops_news.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** spops_news.ini 18 Mar 2005 03:26:22 -0000 1.6 --- spops_news.ini 21 Sep 2005 03:38:25 -0000 1.7 *************** *** 8,12 **** @,convert_date_field = posted_on, active_on, expires_on id_field = news_id ! is_secure = yes increment_field = yes sequence_name = oi_news_seq --- 8,12 ---- @,convert_date_field = posted_on, active_on, expires_on id_field = news_id ! is_secure = no increment_field = yes sequence_name = oi_news_seq |
|
From: Chris W. <la...@us...> - 2005-09-21 03:37:14
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/comments In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4250 Modified Files: package.ini Changes Log Message: update comment templates for better CSS use Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/package.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** package.ini 4 Mar 2005 15:22:09 -0000 1.4 --- package.ini 21 Sep 2005 03:37:05 -0000 1.5 *************** *** 1,5 **** [package] name = comments ! version = 1.23 author = Chris Winters <ch...@cw...> url = http://www.cwinters.com/ --- 1,5 ---- [package] name = comments ! version = 1.24 author = Chris Winters <ch...@cw...> url = http://www.cwinters.com/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/Changes,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Changes 4 Mar 2005 15:22:09 -0000 1.21 --- Changes 21 Sep 2005 03:37:05 -0000 1.22 *************** *** 1,4 **** --- 1,9 ---- Revision history for OpenInteract package comments. + 1.24 Tue Sep 20 22:04:33 EDT 2005 + + Small modifications to comment templates to better use CSS + classes. + 1.23 Fri Mar 4 00:27:21 EST 2005 |
|
From: Chris W. <la...@us...> - 2005-09-21 03:37:14
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/comments/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4250/template Modified Files: comment_list.tmpl comment_form_page.tmpl comment_form.tmpl comment_detail.tmpl comment.tmpl Log Message: update comment templates for better CSS use Index: comment_list.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/template/comment_list.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comment_list.tmpl 28 Nov 2004 05:58:25 -0000 1.3 --- comment_list.tmpl 21 Sep 2005 03:37:05 -0000 1.4 *************** *** 11,14 **** --- 11,15 ---- [% END -%] + [% IF comments.size > 0 %] [% FOREACH comment = comments -%] *************** *** 16,18 **** --- 17,23 ---- [% END -%] + [% ELSE %] + <p>[% MSG( 'comments.no_comments' ) %]</p> + [% END %] + [% OI.action_execute( 'new_comment_form', object = object ) %] \ No newline at end of file Index: comment_form_page.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/template/comment_form_page.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comment_form_page.tmpl 17 May 2004 14:21:53 -0000 1.3 --- comment_form_page.tmpl 21 Sep 2005 03:37:05 -0000 1.4 *************** *** 2,5 **** --- 2,7 ---- obj_info = object.object_description; END -%] + <div class="demarcatePage"> + <h2>[% MSG( 'comments.form_page.title' ) %]</h2> *************** *** 17,19 **** [% END %] ! [% PROCESS comments::comment_form %] \ No newline at end of file --- 19,23 ---- [% END %] ! [% PROCESS comments::comment_form %] ! ! </div> \ No newline at end of file Index: comment_form.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/template/comment_form.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** comment_form.tmpl 4 Mar 2005 15:22:12 -0000 1.5 --- comment_form.tmpl 21 Sep 2005 03:37:05 -0000 1.6 *************** *** 1,5 **** [%- DEFAULT theme = OI.theme_properties; PROCESS error_message -%] - [% IF is_disabled %] --- 1,4 ---- *************** *** 57,65 **** <tr [% PROCESS row_color %] align="center"> <td colspan="2"> ! [% INCLUDE form_textarea( name = 'content', ! value = comment.content, ! rows = 8, ! cols = 50, ! wrap = 'virtual' ) -%] </td> </tr> --- 56,64 ---- <tr [% PROCESS row_color %] align="center"> <td colspan="2"> ! [% INCLUDE form_textarea( name = 'content', ! value = comment.content, ! rows = 8, ! cols = 50, ! wrap = 'virtual' ) -%] </td> </tr> *************** *** 118,120 **** </div> ! [% END %] \ No newline at end of file --- 117,119 ---- </div> ! [% END %] Index: comment_detail.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/template/comment_detail.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comment_detail.tmpl 17 May 2004 14:21:53 -0000 1.3 --- comment_detail.tmpl 21 Sep 2005 03:37:05 -0000 1.4 *************** *** 1,4 **** --- 1,6 ---- [% PROCESS error_message %] + <div class="demarcatePage"> + <h1>[% MSG( 'comments.detail.title' ) %]</h1> *************** *** 9,20 **** [%- summary = comment.get_summary -%] <p class="commentObject"> ! [%- object_title = PROCESS comments::comment_object( url = summary.object_url ! title = summary.object_title ) -%] ! [%- MSG( 'comments.info.object', object_title ) -%] </p> [% ELSE -%] ! <p>[% MSG( 'comments.no_comment' ) %]</p> ! [% END -%] \ No newline at end of file --- 11,26 ---- [%- summary = comment.get_summary -%] <p class="commentObject"> ! [%- object_title = PROCESS comments::comment_object( ! url = summary.object_url ! title = summary.object_title ! ); ! MSG( 'comments.info.object', object_title ); -%] </p> [% ELSE -%] ! <p class="commentNone">[% MSG( 'comments.no_comment' ) %]</p> ! [% END -%] ! ! </div> \ No newline at end of file Index: comment.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/template/comment.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comment.tmpl 16 Feb 2004 16:19:49 -0000 1.2 --- comment.tmpl 21 Sep 2005 03:37:05 -0000 1.3 *************** *** 1,3 **** ! <p><span class="commentSubject">[% comment.subject %]</span><br> <div class="commentContent"> [% IF override_content %][% override_content -%] --- 1,6 ---- ! <div class="commentItem"> ! ! <h3 class="commentSubject">[% comment.subject %]</h3> ! <div class="commentContent"> [% IF override_content %][% override_content -%] *************** *** 11,12 **** --- 14,17 ---- OI.date_format( comment.posted_on, '%B %d, %Y %l:%M %p' ) ) %] </p> + + </div> \ No newline at end of file |