]> git.mxchange.org Git - friendica.git/blobdiff - include/enotify.php
add uid variable to b8 classes
[friendica.git] / include / enotify.php
old mode 100644 (file)
new mode 100755 (executable)
index 0c6d666..9df9b57
@@ -37,8 +37,8 @@ function notification($params) {
 
        if($params['type'] == NOTIFY_COMMENT) {
 
-               $preamble = $subject = sprintf( t('%s commented on an item at %s'), $params['source_name'], $sitename);
-
+               $subject = sprintf( t('%s commented on an item at %s'), $params['source_name'], $sitename);
+               $preamble = sprintf( t('%s commented on an item/conversation you have been following.'), $params['source_name']); 
                $sitelink = t('Please visit %s to view and/or reply to the conversation.');
                $tsitelink = sprintf( $sitelink, $siteurl );
                $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
@@ -65,6 +65,19 @@ function notification($params) {
                $itemlink =  $params['link'];
        }
 
+       if($params['type'] == NOTIFY_SUGGEST) {
+               $subject = sprintf( t('Friend suggestion received at %s'), $sitename);
+               $preamble = sprintf( t('You\'ve received a friend suggestion from \'%s\' at %s'), $params['source_name'], $sitename); 
+               $body = t('Name:') . ' ' . $params['item']['name'] . "\n";
+               $body .= t('Photo:') . ' ' . $params['item']['photo'] . "\n";
+               $body .= sprintf( t('You may visit their profile at %s'),$params['item']['url']);
+
+               $sitelink = t('Please visit %s to approve or reject the suggestion.');
+               $tsitelink = sprintf( $sitelink, $siteurl );
+               $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
+               $itemlink =  $params['link'];
+       }
+
        if($params['type'] == NOTIFY_CONFIRM) {
 
        }