function _og_mail_text in Organic groups 6
Same name and namespace in other branches
- 6.2 og.module \_og_mail_text()
Define all OG message strings. Modelled after user.module
8 calls to _og_mail_text()
- og_admin_settings in includes/
og.admin.inc - Menu callback to load settings form.
- og_approve in ./
og.module - og_broadcast_form_submit in ./
og.module - og_create_admin_confirm_submit in ./
og.module - Confirm og create admin form
- og_deny in ./
og.module
File
- ./
og.module, line 2158
Code
function _og_mail_text($messageid, $variables = array(), $language = NULL) {
$langcode = isset($language) ? $language->language : NULL;
// Check if an admin setting overrides the default string.
if ($admin_setting = variable_get($messageid, FALSE)) {
return strtr($admin_setting, $variables);
}
else {
switch ($messageid) {
case 'og_new_node_subject':
return t("@group: '@title' at @site", $variables, $langcode);
case 'og_new_node_body':
return t("@type '@subject' by @username\n\n@node_teaser\n\n!read_more: !content_url\nPost reply: !reply_url\n\n--\nYou are subscribed from the group '@group' at @site.\nTo manage your subscription, visit !group_url", $variables, $langcode);
case 'og_admin_email_subject':
return $variables['@subject'];
case 'og_admin_email_body':
return t("@body\n\n--\nThis message was sent by an administrator in the '@group' group at @site. To visit this group, browse to !url_group. To unsubscribe from this group, visit !url_unsubscribe", $variables, $langcode);
case 'og_approve_user_subject':
return t("Membership request approved for '@title'", $variables, $langcode);
case 'og_approve_user_body':
return t("You may now post messages in this group located at !group_url", $variables, $langcode);
case 'og_deny_user_subject':
return t("Membership request denied for '@title'", $variables, $langcode);
case 'og_deny_user_body':
return t("Sorry, your membership request was denied.", $variables, $langcode);
// These emails have no 'og' prefix as they come through hook_mail().
case 'og_invite_user_subject':
return t("Invitation to join the group '@group' at @site", $variables, $langcode);
case 'og_invite_user_body':
return t("Hi. I'm a member of '@group' and I welcome you to join this group as well. Please see the link and message below.\n\n@group\n@description\nJoin: !group_url\n@body", $variables, $langcode);
case 'og_request_user_subject':
return t("Membership request for '@group' from '@username'", $variables, $langcode);
case 'og_request_user_body':
return t("To instantly approve this request, visit !approve_url.\nYou may deny this request or manage members at !group_url. \n\nPersonal message from @username:\n------------------\n\n@request", $variables, $langcode);
case 'og_new_admin_subject':
return t("You are now an administrator for the group '@group'", $variables, $langcode);
case 'og_new_admin_body':
return t("@username, you are now an administrator for the group '@group'.\n\nYou can administer this group by logging in here:\n !group_url", $variables, $langcode);
}
}
}