Interfaces with a mailinglist. More...
Go to the source code of this file.
Functions | |
mailinglist_members_permission () | |
Implements hook_permission(). More... | |
mailinglist_members_cron_queue_info () | |
Implements hook_cron_queue_info(). More... | |
mailinglist_members_cron () | |
Implements hook_cron(). More... | |
mailinglist_members_mailinglist_list_created ($list) | |
Implements hook_mailinglist_list_created(). More... | |
mailinglist_members_mailinglist_list_delete ($list) | |
Implements hook_mailinglist_list_delete(). More... | |
_mailinglist_members_list_schema (MailinglistListInterface $list) | |
Builds the schema needed by mailinglist_members for a specific list. More... | |
mailinglist_members_memberid ($list, $email) | |
Get sid for email address. More... | |
mailinglist_members_update ($list, $email, $info) | |
mailinglist_members_update_ind ($list, $email, $info) | |
mailinglist_members_subscribe ($list, $email, $time=FALSE) | |
Subscription tracking routines. More... | |
mailinglist_members_unsubscribe ($list, $email, $time=FALSE) | |
mailinglist_members_seen ($list, $email, $time=FALSE) | |
Mark a member as having been seen. More... | |
mailinglist_members_unseen ($list, $email, $time=FALSE) | |
Mark a member as haven been not seen (ie wasn't subscribed) at a point in time. More... | |
mailinglist_members_process_memberpage ($list, $page) | |
Process one member page from the list. More... | |
mailinglist_members_scan ($list) | |
Process a partial scan of members for a mailinglist. More... | |
mailinglist_members_callback ($listname) | |
_mailinglist_members_lookup ($list, $email) | |
_mailinglist_members_lookup(). More... | |
mailinglist_members_mailinglist_message ($msg, $list) | |
Implements hook_mailinglist_message(). More... | |
mailinglist_members_ctools_plugin_directory ($owner, $plugin_type) | |
Implements hook_ctools_plugin_directory(). More... | |
Variables | |
const | MAILINGLIST_SUB_NO 0 |
Defines for sub_types (subscription types) More... | |
const | MAILINGLIST_SUB_NOMAIL 1 |
const | MAILINGLIST_SUB_INDEX 2 |
const | MAILINGLIST_SUB_DIGEST 5 |
const | MAILINGLIST_SUB_MIME_DIGEST 6 |
const | MAILINGLIST_SUB_NORMAL 10 |
Interfaces with a mailinglist.
Definition in file mailinglist_members.module.
_mailinglist_members_list_schema | ( | MailinglistListInterface | $list | ) |
Builds the schema needed by mailinglist_members for a specific list.
$list | The list to generate the schema for. |
Definition at line 115 of file mailinglist_members.module.
References _mailinglist_datetime_schema(), and MailinglistListInterface\schema().
Referenced by mailinglist_members_mailinglist_list_created(), mailinglist_members_mailinglist_list_delete(), and mailinglist_members_schema().
_mailinglist_members_lookup | ( | $list, | |
) |
_mailinglist_members_lookup().
Ask list to lookup info on a member and processes their membership based on it.
Definition at line 660 of file mailinglist_members.module.
References mailinglist_email_name(), mailinglist_members_seen(), mailinglist_members_unseen(), and mailinglist_members_update_ind().
Referenced by mailinglist_members_scan().
mailinglist_members_callback | ( | $listname | ) |
Definition at line 636 of file mailinglist_members.module.
References mailinglist_list_load(), and mailinglist_members_scan().
mailinglist_members_cron | ( | ) |
Implements hook_cron().
Definition at line 55 of file mailinglist_members.module.
References mailinglist_list_load_all().
mailinglist_members_cron_queue_info | ( | ) |
Implements hook_cron_queue_info().
Definition at line 41 of file mailinglist_members.module.
mailinglist_members_ctools_plugin_directory | ( | $owner, | |
$plugin_type | |||
) |
Implements hook_ctools_plugin_directory().
divides the plugins by owner module
Definition at line 696 of file mailinglist_members.module.
mailinglist_members_mailinglist_list_created | ( | $list | ) |
Implements hook_mailinglist_list_created().
Definition at line 78 of file mailinglist_members.module.
References _mailinglist_members_list_schema().
mailinglist_members_mailinglist_list_delete | ( | $list | ) |
Implements hook_mailinglist_list_delete().
Definition at line 97 of file mailinglist_members.module.
References _mailinglist_members_list_schema().
mailinglist_members_mailinglist_message | ( | $msg, | |
$list | |||
) |
Implements hook_mailinglist_message().
Definition at line 675 of file mailinglist_members.module.
mailinglist_members_memberid | ( | $list, | |
) |
Get sid for email address.
$list | MailinglistListInterface: The list to lookup on. |
string: The email address to lookup. |
Definition at line 227 of file mailinglist_members.module.
Referenced by mailinglist_members_seen(), mailinglist_members_subscribe(), mailinglist_members_unseen(), and mailinglist_members_unsubscribe().
mailinglist_members_permission | ( | ) |
Implements hook_permission().
Definition at line 24 of file mailinglist_members.module.
References mailinglist_list_load_all().
mailinglist_members_process_memberpage | ( | $list, | |
$page | |||
) |
Process one member page from the list.
Use list->getMemberPage() to get a list of members on the page` Mark all of these members as seen
$list | MailinglistListInterface: The list to process |
$page | page pointer structure, should be the last value returned. FALSE to start a scan. |
Definition at line 546 of file mailinglist_members.module.
References mailinglist_email_name(), mailinglist_members_seen(), and mailinglist_members_update().
Referenced by mailinglist_members_scan().
mailinglist_members_scan | ( | $list | ) |
Process a partial scan of members for a mailinglist.
First scans through the member pages of the list with mailinglist_members_process_memberpage saving the current progress in the list parameter ScanNext, and then seperately looks up any members not seen in that scan (likely because they unsubscribed, but maybe they got missed due to the pages reorganizing due to subscriptions/unsubscriptions.
$list | MailinglistListInterface: The ctools object for the list. |
Definition at line 571 of file mailinglist_members.module.
References _mailinglist_datetime_format(), _mailinglist_members_lookup(), and mailinglist_members_process_memberpage().
Referenced by MailinglistMembersOperation\form(), and mailinglist_members_callback().
mailinglist_members_seen | ( | $list, | |
$email, | |||
$time = FALSE |
|||
) |
Mark a member as having been seen.
$list | The list to process. |
string: The email address that was seen. | |
$time | (timestamp) The time the email address was seen, if FALSE (the default) then "now". |
Finds the earliest existing record with an unseen time after $time, or unseen = NULL if there isn't another one. Then process as follows:
no record found: New record F', L' = T, U' = null. T < F: If subscibe flag, add new record (F', L' = T, U' = F-1, else set F = T F <= T <= L: ignore. L < T <= U: Set L = T
Definition at line 395 of file mailinglist_members.module.
References _mailinglist_datetime_format(), and mailinglist_members_memberid().
Referenced by _mailinglist_members_lookup(), and mailinglist_members_process_memberpage().
mailinglist_members_subscribe | ( | $list, | |
$email, | |||
$time = FALSE |
|||
) |
Subscription tracking routines.
There routines are used to keep the subscription table updated based on observed events. Note that for a give subscriber (as indicated by the value of sid) we have the following constraints: Let: F = the value of the first_seen field. L = the value of the last_seen field. U = the value of the first_unseen field. (If U is null, it is considered very large) S = the value of the subscribed flag.
This indicates that we have evidence of being subscribed from at least as early as F until at least as late as L, but they did unsubscribe by U (if not null).
If the S flag is set, then F is the time point where the person subscribed, and F should not be changed in future modifications. Otherwise, F and U can be made smaller, and L larger for a given record, There are cases where we may need to split a record to add an "not subsubscribed" period in the middle of a currently subscribed period.
L == U is an indication that this is the point in time of unsubscribing.
F <= L <= U for all records (U being null is considered to match L <= U)
For any two records either U' < F or U < F' (U being null is NOT considered to match here) i.e. two records for the same subscriber will not overlap. Mark a member as having subscribed at a point in time
$list | The list to process. |
string: The email address that was seen. | |
$time | (timestamp) The time the address subscribed, if FALSE (the default) then "now". |
Finds the earliest existing record with an unseen time after $time, or unseen = NULL if there isn't another one. Then process as follows:
no record found: New record F', l' = T, U' = null, S' = 1 T < F: If subscibe flag, add new record (F', L' = T, U' = F-1, else set F = T F = T: Set Subscribe flag. F < T <= L: Split record: F'=T, L'=L, U'=U, S'=1; L=F, U=T-1
Definition at line 354 of file mailinglist_members.module.
References _mailinglist_datetime_format(), and mailinglist_members_memberid().
mailinglist_members_unseen | ( | $list, | |
$email, | |||
$time = FALSE |
|||
) |
Mark a member as haven been not seen (ie wasn't subscribed) at a point in time.
$list | MailinglistListInterface: The list |
string: The email address | |
$time | timestamp: the time to mark as unseen, if FALSE use now |
Finds the latest record where first_seen <= time no record found: ignore F <= T < L: Split record, set F' = L' = L, U' = U; L = F, U = time L <= T < U: Set U = T. U <= T: can ignore
Definition at line 474 of file mailinglist_members.module.
References _mailinglist_datetime_format(), mailinglist_members_memberid(), and MAILINGLIST_SUB_NO.
Referenced by _mailinglist_members_lookup().
mailinglist_members_unsubscribe | ( | $list, | |
$email, | |||
$time = FALSE |
|||
) |
Definition at line 365 of file mailinglist_members.module.
References _mailinglist_datetime_format(), and mailinglist_members_memberid().
mailinglist_members_update | ( | $list, | |
$email, | |||
$info | |||
) |
Definition at line 246 of file mailinglist_members.module.
References _mailinglist_datetime_format().
Referenced by mailinglist_members_process_memberpage(), and mailinglist_members_update_ind().
mailinglist_members_update_ind | ( | $list, | |
$email, | |||
$info | |||
) |
Definition at line 300 of file mailinglist_members.module.
References _mailinglist_datetime_format(), and mailinglist_members_update().
Referenced by _mailinglist_members_lookup().
const MAILINGLIST_SUB_DIGEST 5 |
Definition at line 13 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form(), Mailman21List\getMemberInfo(), and Mailman21List\getMemberPage().
const MAILINGLIST_SUB_INDEX 2 |
Definition at line 12 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form().
const MAILINGLIST_SUB_MIME_DIGEST 6 |
Definition at line 14 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form(), Mailman21List\getMemberInfo(), and Mailman21List\getMemberPage().
const MAILINGLIST_SUB_NO 0 |
Defines for sub_types (subscription types)
Definition at line 10 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form(), and mailinglist_members_unseen().
const MAILINGLIST_SUB_NOMAIL 1 |
Definition at line 11 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form(), Mailman21List\getMemberInfo(), and Mailman21List\getMemberPage().
const MAILINGLIST_SUB_NORMAL 10 |
Definition at line 15 of file mailinglist_members.module.
Referenced by MailinglistMembersOperation\form(), Mailman21List\getMemberInfo(), and Mailman21List\getMemberPage().