From 91a57903cee0b364c0c580108d0d07e1e1e47485 Mon Sep 17 00:00:00 2001 From: Andy Mornes Date: Wed, 12 Feb 2014 00:18:00 -0600 Subject: [PATCH 1/2] New Block Notification additions Adding the block number, finder, amount, and difficulty to the new block notification email --- cronjobs/findblock.php | 5 +++++ public/templates/mail/notifications/new_block.tpl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index b7f2393a..71cca570 100755 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -152,11 +152,16 @@ if (empty($aAllBlocks)) { // Notify users $aAccounts = $notification->getNotificationAccountIdByType('new_block'); if (is_array($aAccounts)) { + + $finder = $user->getUserName($aBlock['account_id']); foreach ($aAccounts as $aData) { $aMailData['height'] = $aBlock['height']; $aMailData['subject'] = 'New Block'; $aMailData['email'] = $user->getUserEmail($user->getUserName($aData['account_id'])); $aMailData['shares'] = $iRoundShares; + $aMailData['amount'] = $aBlock['amount']; + $aMailData['difficulty'] = $aBlock['difficulty']; + $aMailData['finder'] = $finder; if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData)) $log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id'])); } diff --git a/public/templates/mail/notifications/new_block.tpl b/public/templates/mail/notifications/new_block.tpl index 9d17d06e..ac1836ac 100644 --- a/public/templates/mail/notifications/new_block.tpl +++ b/public/templates/mail/notifications/new_block.tpl @@ -1,6 +1,6 @@ +

Block Number {nocache}{$DATA.height}{/nocache} has been discovered by {nocache}{$DATA.finder}{/nocache} with a total value of {nocache}{$DATA.amount}{/nocache}! The current difficulty is {nocache}{$DATA.difficulty}{/nocache}.

-

A new block has been discovered!



From caee4a7c8fea3f7e4b48b326e80db3ec72bdfcf8 Mon Sep 17 00:00:00 2001 From: Andy Mornes Date: Wed, 12 Feb 2014 00:27:21 -0600 Subject: [PATCH 2/2] Consolidating the nocache tags --- public/templates/mail/notifications/new_block.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mail/notifications/new_block.tpl b/public/templates/mail/notifications/new_block.tpl index ac1836ac..46b81fbf 100644 --- a/public/templates/mail/notifications/new_block.tpl +++ b/public/templates/mail/notifications/new_block.tpl @@ -1,5 +1,5 @@ -

Block Number {nocache}{$DATA.height}{/nocache} has been discovered by {nocache}{$DATA.finder}{/nocache} with a total value of {nocache}{$DATA.amount}{/nocache}! The current difficulty is {nocache}{$DATA.difficulty}{/nocache}.

+

{nocache}Block Number {$DATA.height} has been discovered by {$DATA.finder} with a total value of {$DATA.amount}! The current difficulty is {$DATA.difficulty}.{/nocache}