You are here

function subscriptions_mail_template_raw in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions_mail.templates.inc \subscriptions_mail_template_raw()
  2. 6 subscriptions_mail.templates.inc \subscriptions_mail_template_raw()
  3. 2.0.x subscriptions_mail/subscriptions_mail.templates.inc \subscriptions_mail_template_raw()

Parameters

$key:

$langcode:

Return value

array|null|string

1 call to subscriptions_mail_template_raw()
subscriptions_mail_template in ./subscriptions_mail.templates.inc

File

./subscriptions_mail.templates.inc, line 15
Subscriptions module mail templates constants.

Code

function subscriptions_mail_template_raw($key, $langcode) {
  switch ($key) {
    case 'SEP':
      return t('| ---------------------------------------------------', array(), array(
        'langcode' => $langcode,
      ));
    case 'SEPD':
      return t('=====================================================', array(), array(
        'langcode' => $langcode,
      ));
    case 'SUBJ':
      return t('[[site:name]] [subs:type] subscription for [current-user:name]: [node:title]', array(), array(
        'langcode' => $langcode,
      ));
    case 'FOOT':
      return t('| This is an automated message. Please do NOT reply to the sender address!
| To manage your subscriptions go to
| [subs:manage-url]
', array(), array(
        'langcode' => $langcode,
      ));
    case 'BODY':
      return t('{{MAIL@| Greetings, [current-user:name].
|
| Your subscription on [site:name]
| notifies you of {{[subs:is-new]==0?:a new post:
}}{{[subs:is-updated]#an updated post:
}}{{[subs:is-old]#new comments on:
}}|
}}{{![subs:is-published]#| ***** This post is unpublished! *****
}}{{![subs:category:tid]?:{{[subs:category:tid]==[subs:forum:tid]?:| Category: [subs:category:name]
}}}}{{![subs:forum:tid]?:| Forum: [subs:forum:name]
}}{{![node:author:name]?:| Author: [node:author:name]
}}| Title: [node:title]
{{![subs:terms:field_tags:count]?:| [subs:terms:field_tags:first:vocabulary:name]: {{[subs:terms:field_tags:count]#{{!!#0#, }}[subs:terms:field_tags:index:#0:name]}}
}}{{![subs:is-old]? 
[node:body]:{{![subs:has-distinct-summary]? 
[node:body]:| Summary:
 
[node:summary]}}}}
| LINK: [node:url]
{{![subs:is-old]#{{!![subs:files:field_files:count]#| Attached files:
{{[subs:files:field_files:count]#| [subs:files:field_files:index:#0:url]
}}}}}}{{![subs:comments:count]?!SEPARATOR
:|
| Comments: [subs:comments:count]
!SEPARATOR
[subs:comments:join:
]
}}| Direct unsubscribe link ([subs:type]):
| [subs:unsubscribe-url]
{{MAIL@!FOOTER}}', array(
        '!SEPARATOR' => subscriptions_mail_template_raw('SEP', $langcode),
        '!FOOTER' => subscriptions_mail_template_raw('FOOT', $langcode),
      ), array(
        'langcode' => $langcode,
      ));
    case 'CITEM':
      return t('| {{[subs:is-new]?New:Updated}} {{[subs:is-published]?:UNPUBLISHED }}comment:
| Author: [comment:author:name]
| Title: [comment:title]
 
[comment:body]
| LINK: [comment:url]
{{!![subs:files:field_files:count]#| Attached files:
{{[subs:files:field_files:count]#| [subs:files:field_files:index:#0:url]
}}}}!SEPARATOR', array(
        '!SEPARATOR' => subscriptions_mail_template_raw('SEP', $langcode),
      ), array(
        'langcode' => $langcode,
      ));
    case 'DSUBJ':
      return t('[[site:name]] Subscriptions Digest for [current-user:name]', array(), array(
        'langcode' => $langcode,
      ));
    case 'DBODY':
      return t('| Greetings, [current-user:name].
|
| Your subscriptions on [site:name]
| notify you of the following changes since the previous digest:
|
{{[subs:items:count]#!SEPARATOR #1 of [subs:items:count] {{[subs:items:index:#0:subs:is-new]?(new):}}{{[subs:items:index:#0:subs:is-updated]?(updated):}}{{[subs:items:index:#0:subs:is-old]?(commented):}}
[subs:items:index:#0:formatted]
}}!SEPARATOR
!FOOTER', array(
        '!SEPARATOR' => subscriptions_mail_template_raw('SEPD', $langcode),
        '!FOOTER' => subscriptions_mail_template_raw('FOOT', $langcode),
      ), array(
        'langcode' => $langcode,
      ));
  }
  return NULL;
}