From be83855acf2db7f4f55d4cb30878c67d53ca69b6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 17 Jan 2016 16:50:37 -0800 Subject: generalise the site icon --- include/enotify.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/enotify.php') diff --git a/include/enotify.php b/include/enotify.php index c9b6e0463..5bb53aa0e 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -529,6 +529,7 @@ function notification($params) { $tpl = get_markup_template('email_notify_html.tpl'); $email_html_body = replace_macros($tpl,array( '$banner' => $datarray['banner'], + '$notify_icon' => get_notify_icon(), '$product' => $datarray['product'], '$preamble' => $datarray['preamble'], '$sitename' => $datarray['sitename'], -- cgit v1.2.3 From 68030d12cfefa8982774cca9714b0c1eed7b9537 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Wed, 27 Jan 2016 00:24:05 +0100 Subject: Linking new connection notification to pending connections (see Channel 1) and improved email notifications about new connections. Could not find a way to do this also for the generic notifications. Added hub domain of channel address on the new channel page. A few people on my hub didn't understood. This example will make it more clear. Some minor bits. --- include/enotify.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/enotify.php') diff --git a/include/enotify.php b/include/enotify.php index 5bb53aa0e..c4c49c8ff 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -273,14 +273,14 @@ function notification($params) { $preamble = sprintf( t('%1$s, you\'ve received an new connection request from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename); $epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a new connection request[/zrl] from %3$s.'), $recip['channel_name'], - $itemlink, + $siteurl . '/connections/ifpending', '[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]'); $body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']); $sitelink = t('Please visit %s to approve or reject the connection request.'); - $tsitelink = sprintf( $sitelink, $siteurl ); - $hsitelink = sprintf( $sitelink, '' . $sitename . ''); - $itemlink = $params['link']; + $tsitelink = sprintf( $sitelink, $siteurl . '/connections/ifpending'); + $hsitelink = sprintf( $sitelink, '' . $sitename . ''); + $itemlink = $params['link']; } if ($params['type'] == NOTIFY_SUGGEST) { -- cgit v1.2.3 From 342fda94e4162634eeb67c18c1d284e7d78f217f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 18 Feb 2016 15:24:58 -0800 Subject: Provide Zotlabs\Project and System class for querying details about the project/version info. Move these out of /boot.php --- include/enotify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/enotify.php') diff --git a/include/enotify.php b/include/enotify.php index c4c49c8ff..e182377c0 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -529,7 +529,7 @@ function notification($params) { $tpl = get_markup_template('email_notify_html.tpl'); $email_html_body = replace_macros($tpl,array( '$banner' => $datarray['banner'], - '$notify_icon' => get_notify_icon(), + '$notify_icon' => Zotlabs\Project\System::get_notify_icon(), '$product' => $datarray['product'], '$preamble' => $datarray['preamble'], '$sitename' => $datarray['sitename'], -- cgit v1.2.3 From 1cd3b4182595b838a535dd6b6990251db05d49e6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 30 Mar 2016 22:13:24 -0700 Subject: deprecate $a->get_baseurl() --- include/enotify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/enotify.php') diff --git a/include/enotify.php b/include/enotify.php index e182377c0..a44f87537 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -56,7 +56,7 @@ function notification($params) { $banner = t('$Projectname Notification'); $product = t('$projectname'); // PLATFORM_NAME; - $siteurl = $a->get_baseurl(true); + $siteurl = z_root(); $thanks = t('Thank You,'); $sitename = get_config('system','sitename'); $site_admin = sprintf( t('%s Administrator'), $sitename); @@ -419,7 +419,7 @@ function notification($params) { return; } - $itemlink = $a->get_baseurl() . '/notify/view/' . $notify_id; + $itemlink = z_root() . '/notify/view/' . $notify_id; $msg = str_replace('$itemlink',$itemlink,$epreamble); // wretched hack, but we don't want to duplicate all the preamble variations and we also don't want to screw up a translation -- cgit v1.2.3 From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- include/enotify.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/enotify.php') diff --git a/include/enotify.php b/include/enotify.php index a44f87537..d87c5af11 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -62,7 +62,7 @@ function notification($params) { $site_admin = sprintf( t('%s Administrator'), $sitename); $sender_name = $product; - $hostname = $a->get_hostname(); + $hostname = App::get_hostname(); if(strpos($hostname,':')) $hostname = substr($hostname,0,strpos($hostname,':')); @@ -424,7 +424,7 @@ function notification($params) { // wretched hack, but we don't want to duplicate all the preamble variations and we also don't want to screw up a translation - if (($a->language === 'en' || (! $a->language)) && strpos($msg,', ')) + if ((App::$language === 'en' || (! App::$language)) && strpos($msg,', ')) $msg = substr($msg,strpos($msg,', ')+1); $r = q("update notify set msg = '%s' where id = %d and uid = %d", @@ -441,7 +441,7 @@ function notification($params) { logger('notification: sending notification email'); $hn = get_pconfig($recip['channel_id'],'system','email_notify_host'); - if($hn && (! stristr(get_app()->get_hostname(),$hn))) { + if($hn && (! stristr(App::get_hostname(),$hn))) { // this isn't the email notification host pop_lang(); return; @@ -455,7 +455,7 @@ function notification($params) { // use $_SESSION['zid_override'] to force zid() to use // the recipient address instead of the current observer - $_SESSION['zid_override'] = $recip['channel_address'] . '@' . get_app()->get_hostname(); + $_SESSION['zid_override'] = $recip['channel_address'] . '@' . App::get_hostname(); $_SESSION['zrl_override'] = z_root() . '/channel/' . $recip['channel_address']; $textversion = zidify_links($textversion); -- cgit v1.2.3