mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:00:16 +00:00
more enotify
This commit is contained in:
parent
0b598dedd0
commit
bef8f95ef3
3 changed files with 46 additions and 10 deletions
|
@ -38,10 +38,10 @@ function notification($params) {
|
||||||
|
|
||||||
$subject = sprintf( t('New mail received at %s'),$sitename);
|
$subject = sprintf( t('New mail received at %s'),$sitename);
|
||||||
|
|
||||||
$new_email = sprintf( t('%s sent you a new private message at %s.'),$params['source_name'],$sitename);
|
$preamble = sprintf( t('%s sent you a new private message at %s.'),$params['source_name'],$sitename);
|
||||||
$email_visit = t('Please visit %s to view and/or reply to your private messages.');
|
$sitelink = t('Please visit %s to view and/or reply to your private messages.');
|
||||||
$email_tlink = sprintf( $email_visit, $siteurl . '/message' );
|
$tsitelink = sprintf( $email_visit, $siteurl . '/message' );
|
||||||
$email_hlink = sprintf( $email_visit, '<a href="' . $siteurl . '/message">' . $sitename . '</a>');
|
$hsitelink = sprintf( $email_visit, '<a href="' . $siteurl . '/message">' . $sitename . '</a>');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,14 +53,13 @@ function notification($params) {
|
||||||
|
|
||||||
push_lang($params['language']);
|
push_lang($params['language']);
|
||||||
|
|
||||||
$msg['notificationfromname'] = $sender_name;
|
$msg = array();
|
||||||
$msg['notificationfromemail'] = $sender_email;
|
$msg['fromname'] = $sender_name;
|
||||||
|
$msg['fromemail'] = $sender_email;
|
||||||
|
|
||||||
$msg['textversion']
|
$msg['textversion'] = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",
|
||||||
= strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",
|
|
||||||
$body))),ENT_QUOTES,'UTF-8'));
|
$body))),ENT_QUOTES,'UTF-8'));
|
||||||
$msg['htmlversion']
|
$msg['htmlversion'] = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"),
|
||||||
= html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"),
|
|
||||||
"<br />\n",$body))));
|
"<br />\n",$body))));
|
||||||
|
|
||||||
// load the template for private message notifications
|
// load the template for private message notifications
|
||||||
|
|
26
view/email_notify_html.tpl
Normal file
26
view/email_notify_html.tpl
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>$banner</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table style="border:1px solid #ccc">
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='$siteurl/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td style="padding-top:22px;" colspan="2">$preamble</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$url"><img style="border:0px;width:48px;height:48px;" src="$thumb"></a></td>
|
||||||
|
<td style="padding-top:22px;"><a href="$url">$from</a></td></tr>
|
||||||
|
<tr><td style="font-weight:bold;padding-bottom:5px;">$title</td></tr>
|
||||||
|
<tr><td style="padding-right:22px;">$htmlversion</td></tr>
|
||||||
|
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">$hsitelink</td></tr>
|
||||||
|
<tr><td></td><td>$thanks</td></tr>
|
||||||
|
<tr><td></td><td>$sit_admin</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
11
view/email_notify_text.tpl
Normal file
11
view/email_notify_text.tpl
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
$preamble
|
||||||
|
|
||||||
|
$title
|
||||||
|
|
||||||
|
$textversion
|
||||||
|
|
||||||
|
$tsitelink
|
||||||
|
|
||||||
|
$thanks
|
||||||
|
$site_admin
|
||||||
|
|
Loading…
Reference in a new issue