generalise the site icon
This commit is contained in:
parent
10ed334e8c
commit
be83855acf
15
boot.php
15
boot.php
@ -2361,3 +2361,18 @@ function get_update_version() {
|
|||||||
return DB_UPDATE_VERSION;
|
return DB_UPDATE_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function get_notify_icon() {
|
||||||
|
$a = get_app();
|
||||||
|
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['email_notify_icon_url'])
|
||||||
|
return $a->config['system']['email_notify_icon_url'];
|
||||||
|
return z_root() . '/images/hz-white-32.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_site_icon() {
|
||||||
|
$a = get_app();
|
||||||
|
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['site_icon_url'])
|
||||||
|
return $a->config['system']['site_icon_url'];
|
||||||
|
return z_root() . '/images/hz-32.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -529,6 +529,7 @@ function notification($params) {
|
|||||||
$tpl = get_markup_template('email_notify_html.tpl');
|
$tpl = get_markup_template('email_notify_html.tpl');
|
||||||
$email_html_body = replace_macros($tpl,array(
|
$email_html_body = replace_macros($tpl,array(
|
||||||
'$banner' => $datarray['banner'],
|
'$banner' => $datarray['banner'],
|
||||||
|
'$notify_icon' => get_notify_icon(),
|
||||||
'$product' => $datarray['product'],
|
'$product' => $datarray['product'],
|
||||||
'$preamble' => $datarray['preamble'],
|
'$preamble' => $datarray['preamble'],
|
||||||
'$sitename' => $datarray['sitename'],
|
'$sitename' => $datarray['sitename'],
|
||||||
|
@ -1619,18 +1619,19 @@ function format_and_send_email($sender,$xchan,$item) {
|
|||||||
// load the template for private message notifications
|
// load the template for private message notifications
|
||||||
$tpl = get_markup_template('email_notify_html.tpl');
|
$tpl = get_markup_template('email_notify_html.tpl');
|
||||||
$email_html_body = replace_macros($tpl,array(
|
$email_html_body = replace_macros($tpl,array(
|
||||||
'$banner' => $banner,
|
'$banner' => $banner,
|
||||||
'$product' => $product,
|
'$notify_icon' => get_notify_icon(),
|
||||||
'$preamble' => '',
|
'$product' => $product,
|
||||||
'$sitename' => $sitename,
|
'$preamble' => '',
|
||||||
'$siteurl' => $siteurl,
|
'$sitename' => $sitename,
|
||||||
|
'$siteurl' => $siteurl,
|
||||||
'$source_name' => $sender['xchan_name'],
|
'$source_name' => $sender['xchan_name'],
|
||||||
'$source_link' => $sender['xchan_url'],
|
'$source_link' => $sender['xchan_url'],
|
||||||
'$source_photo' => $sender['xchan_photo_m'],
|
'$source_photo' => $sender['xchan_photo_m'],
|
||||||
'$username' => $xchan['xchan_name'],
|
'$username' => $xchan['xchan_name'],
|
||||||
'$hsitelink' => $datarray['hsitelink'],
|
'$hsitelink' => $datarray['hsitelink'],
|
||||||
'$hitemlink' => $datarray['hitemlink'],
|
'$hitemlink' => $datarray['hitemlink'],
|
||||||
'$thanks' => $thanks,
|
'$thanks' => $thanks,
|
||||||
'$site_admin' => $site_admin,
|
'$site_admin' => $site_admin,
|
||||||
'$title' => $title,
|
'$title' => $title,
|
||||||
'$htmlversion' => $htmlversion,
|
'$htmlversion' => $htmlversion,
|
||||||
@ -1639,20 +1640,20 @@ function format_and_send_email($sender,$xchan,$item) {
|
|||||||
// load the template for private message notifications
|
// load the template for private message notifications
|
||||||
$tpl = get_markup_template('email_notify_text.tpl');
|
$tpl = get_markup_template('email_notify_text.tpl');
|
||||||
$email_text_body = replace_macros($tpl, array(
|
$email_text_body = replace_macros($tpl, array(
|
||||||
'$banner' => $banner,
|
'$banner' => $banner,
|
||||||
'$product' => $product,
|
'$product' => $product,
|
||||||
'$preamble' => '',
|
'$preamble' => '',
|
||||||
'$sitename' => $sitename,
|
'$sitename' => $sitename,
|
||||||
'$siteurl' => $siteurl,
|
'$siteurl' => $siteurl,
|
||||||
'$source_name' => $sender['xchan_name'],
|
'$source_name' => $sender['xchan_name'],
|
||||||
'$source_link' => $sender['xchan_url'],
|
'$source_link' => $sender['xchan_url'],
|
||||||
'$source_photo' => $sender['xchan_photo_m'],
|
'$source_photo' => $sender['xchan_photo_m'],
|
||||||
'$username' => $xchan['xchan_name'],
|
'$username' => $xchan['xchan_name'],
|
||||||
'$hsitelink' => $datarray['hsitelink'],
|
'$hsitelink' => $datarray['hsitelink'],
|
||||||
'$hitemlink' => $datarray['hitemlink'],
|
'$hitemlink' => $datarray['hitemlink'],
|
||||||
'$thanks' => $thanks,
|
'$thanks' => $thanks,
|
||||||
'$site_admin' => $site_admin,
|
'$site_admin' => $site_admin,
|
||||||
'$title' => $title,
|
'$title' => $title,
|
||||||
'$textversion' => $textversion
|
'$textversion' => $textversion
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -1666,13 +1667,13 @@ function format_and_send_email($sender,$xchan,$item) {
|
|||||||
// use the EmailNotification library to send the message
|
// use the EmailNotification library to send the message
|
||||||
|
|
||||||
enotify::send(array(
|
enotify::send(array(
|
||||||
'fromName' => $product,
|
'fromName' => $product,
|
||||||
'fromEmail' => $sender_email,
|
'fromEmail' => $sender_email,
|
||||||
'replyTo' => $sender_email,
|
'replyTo' => $sender_email,
|
||||||
'toEmail' => str_replace('mailto:','',$xchan['xchan_addr']),
|
'toEmail' => str_replace('mailto:','',$xchan['xchan_addr']),
|
||||||
'messageSubject' => (($title) ? $title : t('No Subject')),
|
'messageSubject' => (($title) ? $title : t('No Subject')),
|
||||||
'htmlVersion' => $email_html_body,
|
'htmlVersion' => $email_html_body,
|
||||||
'textVersion' => $email_text_body,
|
'textVersion' => $email_text_body,
|
||||||
'additionalMailHeader' => '',
|
'additionalMailHeader' => '',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<table style="border:1px solid #ccc; background-color: #FFFFFF; color: #000000;">
|
<table style="border:1px solid #ccc; background-color: #FFFFFF; color: #000000;">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td colspan="2" style="background:#43488A; 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/hz-white-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">{{$product}}</div><div style="clear: both;"></div></td></tr>
|
<tr><td colspan="2" style="background:#43488A; 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="{{$notify_icon}}"><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">{{$product}}</div><div style="clear: both;"></div></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td style="padding-top:22px;" colspan="2">{{$preamble}}</td></tr>
|
<tr><td style="padding-top:22px;" colspan="2">{{$preamble}}</td></tr>
|
||||||
|
@ -4,23 +4,23 @@
|
|||||||
<Subject>{{$base}}</Subject>
|
<Subject>{{$base}}</Subject>
|
||||||
|
|
||||||
<Property
|
<Property
|
||||||
type="http://www.oexchange.org/spec/0.8/prop/vendor">Friendika</Property>
|
type="http://www.oexchange.org/spec/0.8/prop/vendor">Zotlabs</Property>
|
||||||
<Property
|
<Property
|
||||||
type="http://www.oexchange.org/spec/0.8/prop/title">Friendika Social Network</Property>
|
type="http://www.oexchange.org/spec/0.8/prop/title">Hubzilla</Property>
|
||||||
<Property
|
<Property
|
||||||
type="http://www.oexchange.org/spec/0.8/prop/name">Friendika</Property>
|
type="http://www.oexchange.org/spec/0.8/prop/name">Hubzilla</Property>
|
||||||
<Property
|
<Property
|
||||||
type="http://www.oexchange.org/spec/0.8/prop/prompt">Send to Friendika</Property>
|
type="http://www.oexchange.org/spec/0.8/prop/prompt">Send to Hubzilla</Property>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
rel="icon"
|
rel="icon"
|
||||||
href="{{$base}}/images/friendika-16.png"
|
href="{{$base}}/images/hz-16.png"
|
||||||
type="image/png"
|
type="image/png"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
rel="icon32"
|
rel="icon32"
|
||||||
href="{{$base}}/images/friendika-32.png"
|
href="{{$base}}/images/hz-32.png"
|
||||||
type="image/png"
|
type="image/png"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user