Merge branch 'chriscase-master'

This commit is contained in:
Friendika 2011-02-16 14:41:12 -08:00
commit 9f1f9da89b
13 changed files with 200 additions and 166 deletions

View file

@ -210,10 +210,23 @@ function dfrn_notify_post(&$a) {
= html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "<br />\n",$msg['body'])))); = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "<br />\n",$msg['body']))));
// load the template for private message notifications // load the template for private message notifications
$tpl = load_view_file('view/mail_received_eml.tpl'); $tpl = load_view_file('view/mail_received_html_body_eml.tpl');
$email_html_body_tpl = replace_macros($tpl,array(
'$siteName' => $a->config['sitename'], // name of this site
'$siteurl' => $a->get_baseurl(), // descriptive url of this site
'$thumb' => $importer['thumb'], // thumbnail url for sender icon
'$email' => $importer['email'], // email address to send to
'$url' => $importer['url'], // full url for the site
'$from' => $msg['from-name'], // name of the person sending the message
'$title' => stripslashes($msg['title']), // subject of the message
'$htmlversion' => $msg['htmlversion'], // html version of the message
'$mimeboundary' => $msg['mimeboundary'], // mime message divider
'$hostname' => $a->get_hostname() // name of this host
));
// import the data into the template // load the template for private message notifications
$email_tpl = replace_macros($tpl, array( $tpl = load_view_file('view/mail_received_text_body_eml.tpl');
$email_text_body_tpl = replace_macros($tpl,array(
'$siteName' => $a->config['sitename'], // name of this site '$siteName' => $a->config['sitename'], // name of this site
'$siteurl' => $a->get_baseurl(), // descriptive url of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site
'$thumb' => $importer['thumb'], // thumbnail url for sender icon '$thumb' => $importer['thumb'], // thumbnail url for sender icon
@ -222,11 +235,24 @@ function dfrn_notify_post(&$a) {
'$from' => $msg['from-name'], // name of the person sending the message '$from' => $msg['from-name'], // name of the person sending the message
'$title' => stripslashes($msg['title']), // subject of the message '$title' => stripslashes($msg['title']), // subject of the message
'$textversion' => $msg['textversion'], // text version of the message '$textversion' => $msg['textversion'], // text version of the message
'$htmlversion' => $msg['htmlversion'], // html version of the message
'$mimeboundary' => $msg['mimeboundary'], // mime message divider '$mimeboundary' => $msg['mimeboundary'], // mime message divider
'$hostname' => $a->get_hostname() // name of this host '$hostname' => $a->get_hostname() // name of this host
)); ));
// load the template for private message notifications
$tpl = load_view_file('view/mail_received_eml.tpl');
// import the data into the template
$email_tpl = replace_macros($tpl, array(
'$email' => $importer['email'], // email address to send to
'$from' => $msg['from-name'], // name of the person sending the message
'$title' => stripslashes($msg['title']), // subject of the message
'$mimeboundary' => $msg['mimeboundary'], // mime message divider
'$hostname' => $a->get_hostname(), // name of this host
'$htmlbody' => chunk_split(base64_encode($email_html_body_tpl)),
'$textbody' => chunk_split(base64_encode($email_text_body_tpl))
));
logger("message headers: " . $msg['headers']); logger("message headers: " . $msg['headers']);
logger("message body: " . $mail_tpl); logger("message body: " . $mail_tpl);

View file

@ -1,47 +1,13 @@
--$mimeboundary --$mimeboundary
Content-Type: text/plain; charset=utf-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten. $textbody
$title
$textversion
Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu
beantworten.
Viele Grüße,
$siteName Administrator
--$mimeboundary --$mimeboundary
Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$htmlbody
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Nachricht</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.</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">Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten.</td></tr>
<tr><td></td><td>Viele Grüße,</td></tr>
<tr><td></td><td>$siteName Administrator</td></tr>
</tbody>
</table>
</body>
</html>
--$mimeboundary-- --$mimeboundary--

View file

@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Nachricht</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.</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">Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten.</td></tr>
<tr><td></td><td>Viele Grüße,</td></tr>
<tr><td></td><td>$siteName Administrator</td></tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,11 @@
Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.
$title
$textversion
Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu
beantworten.
Viele Gr٤e,
$siteName Administrator

View file

@ -1,47 +1,14 @@
--$mimeboundary --$mimeboundary
Content-Type: text/plain; charset=utf-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$from sent you a new private message at $siteName. $textbody
$title
$textversion
Please login at $siteurl to read and reply to your private messages.
Thank you,
$siteName administrator
--$mimeboundary --$mimeboundary
Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$htmlbody
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Message</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from sent you a new private message at $siteName.</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">Please login at $siteurl to read and reply to your private messages.</td></tr>
<tr><td></td><td>Thank You,</td></tr>
<tr><td></td><td>$siteName Administrator</td></tr>
</tbody>
</table>
</body>
</html>
--$mimeboundary-- --$mimeboundary--

View file

@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Message</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from sent you a new private message at $siteName.</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">Please login at $siteurl to read and reply to your private messages.</td></tr>
<tr><td></td><td>Thank You,</td></tr>
<tr><td></td><td>$siteName Administrator</td></tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,10 @@
$from sent you a new private message at $siteName.
$title
$textversion
Please login at $siteurl to read and reply to your private messages.
Thank you,
$siteName administrator

View file

@ -1,46 +1,13 @@
--$mimeboundary --$mimeboundary
Content-Type: text/plain; charset=utf-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$from t'a envoyŽ un message ˆ $siteName. $textbody
$title
$textversion
Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.
Merci,
$siteName Administrateur
--$mimeboundary --$mimeboundary
Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$htmlbody
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Message</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from t'a envoyŽ un message ˆ $siteName.</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">Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.</td></tr>
<tr><td></td><td>Merci,</td></tr>
<tr><td></td><td>$siteName Administrateur</td></tr>
</tbody>
</table>
</body>
</html>
--$mimeboundary-- --$mimeboundary--

View file

@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Message</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from t'a envoyŽ un message ˆ $siteName.</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">Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.</td></tr>
<tr><td></td><td>Merci,</td></tr>
<tr><td></td><td>$siteName Administrateur</td></tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,10 @@
$from t'a envoyŽ un message ˆ $siteName.
$title
$textversion
Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.
Merci,
$siteName Administrateur

View file

@ -1,46 +1,13 @@
--$mimeboundary --$mimeboundary
Content-Type: text/plain; charset=utf-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'. $textbody
$title
$textversion
Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.
Grazie,
L'amministratore di $siteName
--$mimeboundary --$mimeboundary
Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: base64
$htmlbody
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN"> --$mimeboundary--
<html>
<head>
<title>Friendika Messsaggio</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.</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">Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.</td></tr>
<tr><td></td><td>Grazie,</td></tr>
<tr><td></td><td>L'amministratore di $siteName</td></tr>
</tbody>
</table>
</body>
</html>
--$mimeboundary--

View file

@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendika Messsaggio</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:#3b5998; 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;" src='$hostname/images/ff-32.jpg'><span style="padding:7px;">Friendika</span></td></tr>
<tr><td style="padding-top:22px;" colspan="2">Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.</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">Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.</td></tr>
<tr><td></td><td>Grazie,</td></tr>
<tr><td></td><td>L'amministratore di $siteName</td></tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,10 @@
Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.
$title
$textversion
Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.
Grazie,
L'amministratore di $siteName