You are here

function _og_user_mail_text in Organic groups 5.3

Same name and namespace in other branches
  1. 5.8 og.module \_og_user_mail_text()
  2. 5 og.module \_og_user_mail_text()
  3. 5.2 og.module \_og_user_mail_text()
  4. 5.7 og.module \_og_user_mail_text()

Define all OG message strings. Modelled after Drupal's user.module

8 calls to _og_user_mail_text()
og_admin_settings in ./og.module
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

... See full list

File

./og.module, line 1858

Code

function _og_user_mail_text($messageid, $variables = array()) {

  // 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);
      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);
      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);
      case 'og_approve_user_subject':
        return t("Membership request approved for '@title'", $variables);
      case 'og_approve_user_body':
        return t("You may now post messages in this group located at !group_url.", $variables);
      case 'og_deny_user_subject':
        return t("Membership request denied for '@title'.", $variables);
      case 'og_deny_user_body':
        return t("Sorry, your membership request was denied.", $variables);
      case 'og_invite_user_subject':
        return t("Invitation to join the group '@group' at @site.", $variables);
      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);
      case 'og_request_user_subject':
        return t("Membership request for '@group' from '@username'.", $variables);
      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.", $variables);
      case 'og_new_admin_subject':
        return t("You are now an administrator for the group '@group'.", $variables);
      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);
    }
  }
}