aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php19
-rwxr-xr-xinclude/conversation.php25
-rwxr-xr-xinclude/enotify.php18
3 files changed, 45 insertions, 17 deletions
diff --git a/boot.php b/boot.php
index b34615443..9573408f0 100755
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1246' );
+define ( 'FRIENDICA_VERSION', '2.3.1247' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1120 );
@@ -125,14 +125,15 @@ define ( 'ZCURL_TIMEOUT' , (-1));
* email notification options
*/
-define ( 'NOTIFY_INTRO', 0x0001 );
-define ( 'NOTIFY_CONFIRM', 0x0002 );
-define ( 'NOTIFY_WALL', 0x0004 );
-define ( 'NOTIFY_COMMENT', 0x0008 );
-define ( 'NOTIFY_MAIL', 0x0010 );
-define ( 'NOTIFY_SUGGEST', 0x0020 );
-define ( 'NOTIFY_PROFILE', 0x0040 );
-
+define ( 'NOTIFY_INTRO', 0x0001 );
+define ( 'NOTIFY_CONFIRM', 0x0002 );
+define ( 'NOTIFY_WALL', 0x0004 );
+define ( 'NOTIFY_COMMENT', 0x0008 );
+define ( 'NOTIFY_MAIL', 0x0010 );
+define ( 'NOTIFY_SUGGEST', 0x0020 );
+define ( 'NOTIFY_PROFILE', 0x0040 );
+define ( 'NOTIFY_TAGSELF', 0x0080 );
+define ( 'NOTIFY_TAGSHARE', 0x0100 );
/**
* various namespaces we may need to parse
diff --git a/include/conversation.php b/include/conversation.php
index 6defefc73..9df7b20e9 100755
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -262,15 +262,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
- $location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
- $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
- if($coord) {
- if($location)
- $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
- else
- $location = '<span class="smalltext">' . $coord . '</span>';
- }
+ $locate = array('location' => $item_location, 'coord' => $item['coord'], 'html' => '');
+ call_hooks('render_location',$locate);
+ $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
localize_item($item);
if($mode === 'network-new')
@@ -1008,3 +1003,17 @@ function find_thread_parent_index($arr,$x) {
return $k;
return false;
}
+
+function render_location_google($item) {
+ $location = '';
+ $location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
+ $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
+ if($coord) {
+ if($location)
+ $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
+ else
+ $location = '<span class="smalltext">' . $coord . '</span>';
+ }
+ return $location;
+}
+
diff --git a/include/enotify.php b/include/enotify.php
index 9df9b57e5..6e7130bc8 100755
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -54,6 +54,24 @@ function notification($params) {
$itemlink = $params['link'];
}
+ if($params['type'] == NOTIFY_TAGSELF) {
+ $preamble = $subject = sprintf( t('%s tagged you at %s') , $params['source_name'], $sitename);
+
+ $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>');
+ $itemlink = $params['link'];
+ }
+
+ if($params['type'] == NOTIFY_TAGSHARE) {
+ $preamble = $subject = sprintf( t('%s tagged your post at %s') , $params['source_name'], $sitename);
+
+ $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>');
+ $itemlink = $params['link'];
+ }
+
if($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('Introduction received at %s'), $sitename);
$preamble = sprintf( t('You\'ve received an introduction from \'%s\' at %s'), $params['source_name'], $sitename);