From e7702b33342cb777881dbcba532c708e010c2ba0 Mon Sep 17 00:00:00 2001 From: John Beppu Date: Tue, 3 Feb 2009 16:01:59 -0600 Subject: [PATCH] POD for C4::Members::Messaging - fixed typos and formatting. - added notes on how to add new kinds of messages. - added notes on the tables being used. Signed-off-by: Daniel Sweeney Signed-off-by: Galen Charlton --- C4/Members/Messaging.pm | 92 ++++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 24 deletions(-) diff --git a/C4/Members/Messaging.pm b/C4/Members/Messaging.pm index cbcfdd1583..3116928bd9 100644 --- a/C4/Members/Messaging.pm +++ b/C4/Members/Messaging.pm @@ -34,24 +34,21 @@ C4::Members::Messaging - manage patron messaging preferences =head1 SYNOPSIS -=over 4 + use C4::Members::Messaging -=back +=head1 DESCRIPTION -=head1 FUNCTIONS +This module lets you modify a patron's messaging preferences. +=head1 FUNCTIONS =head2 GetMessagingPreferences -=over 4 - -my $preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrower->{'borrowernumber'}, - message_name => 'DUE' } ); + my $preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrower->{'borrowernumber'}, + message_name => 'DUE' } ); returns: a hashref of messaging preferences for this borrower for a particlar message_name -=back - =cut sub GetMessagingPreferences { @@ -98,21 +95,21 @@ END_SQL return $return; } -=head2 SetMessagingPreferences +=head2 SetMessagingPreference -=over 4 +This method defines how a user wants to get a certain message delivered. The +list of valid message types can be delivered can be found in the +C table, and the list of valid message transports can be +found in the C table. - -C4::Members::Messaging::SetMessagingPreference( { borrowernumber => $borrower->{'borrowernumber'} - message_attribute_id => $message_attribute_id, - message_transport_types => [ qw( email sms ) ], - days_in_advance => 5 - wants_digest => 1 } ) + C4::Members::Messaging::SetMessagingPreference( { borrowernumber => $borrower->{'borrowernumber'} + message_attribute_id => $message_attribute_id, + message_transport_types => [ qw( email sms ) ], + days_in_advance => 5 + wants_digest => 1 } ) returns nothing useful. -=back - =cut sub SetMessagingPreference { @@ -170,14 +167,10 @@ END_SQL =head2 GetMessagingOptions -=over 4 - -my $messaging_options = C4::Members::Messaging::SetMessagingPreference() + my $messaging_options = C4::Members::Messaging::GetMessagingOptions() returns a hashref of messaing options available. -=back - =cut sub GetMessagingOptions { @@ -205,6 +198,57 @@ END_SQL return \@return; } +=head1 TABLES + +=head2 message_queue + +The actual messages which will be sent via a cron job running +F. + +=head2 message_attributes + +What kinds of messages can be sent? + +=head2 message_transport_types + +What transports can messages be sent vith? (email, sms, etc.) + +=head2 message_transports + +How are message_attributes and message_transport_types correlated? + +=head2 borrower_message_preferences + +What messages do the borrowers want to receive? + +=head2 borrower_message_transport_preferences + +What transport should a message be sent with? + +=head1 CONFIG + +=head2 Adding a New Kind of Message to the System + +=over 4 + +=item 1. + +Add a new template to the `letter` table. + +=item 2. + +Insert a row into the `message_attributes` table. + +=item 3. + +Insert rows into `message_transports` for each message_transport_type. + +=back + +=head1 SEE ALSO + +L + =head1 AUTHOR Koha Development Team -- 2.39.5