aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php101
-rw-r--r--include/items.php34
-rw-r--r--include/text.php71
3 files changed, 1 insertions, 205 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 7074e1c36..498fefa99 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -217,96 +217,6 @@ function localize_item(&$item){
}
- if (activity_match($item['verb'], ACTIVITY_FRIEND)) {
-
- if ($item['obj_type'] == "" || !in_array($item['obj_type'], ['Person', ACTIVITY_OBJ_PERSON]))
- return;
-
- $Aname = $item['author']['xchan_name'];
- $Alink = $item['author']['xchan_url'];
-
-
- $obj= json_decode($item['obj'],true);
-
- $Blink = $Bphoto = '';
-
- if($obj['link']) {
- $Blink = get_rel_link($obj['link'],'alternate');
- $Bphoto = get_rel_link($obj['link'],'photo');
- }
- $Bname = $obj['title'];
-
-
- $A = '[zrl=' . chanlink_url($Alink) . '][bdi]' . $Aname . '[/bdi][/zrl]';
- $B = '[zrl=' . chanlink_url($Blink) . '][bdi]' . $Bname . '[/bdi][/zrl]';
- if ($Bphoto!="") $Bphoto = '[zrl=' . chanlink_url($Blink) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]';
-
- $item['shortlocalize'] = sprintf( t('%1$s is now connected with %2$s'), '[bdi]' . $Aname . '[/bdi]', '[bdi]' . $Bname . '[/bdi]');
-
- $item['body'] = $item['localize'] = sprintf( t('%1$s is now connected with %2$s'), $A, $B);
- $item['body'] .= "\n\n\n" . $Bphoto;
- }
-
- if (stristr($item['verb'], ACTIVITY_POKE)) {
-
- /** @FIXME for obscured private posts, until then leave untranslated */
- return;
-
- $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
- if(! $verb)
- return;
-
- if ($item['obj_type']=="" || !in_array($item['obj_type'], ['Person', ACTIVITY_OBJ_PERSON]))
- return;
-
- $Aname = $item['author']['xchan_name'];
- $Alink = $item['author']['xchan_url'];
-
- $obj= json_decode($item['obj'],true);
-
- $Blink = $Bphoto = '';
-
- if($obj['link']) {
- $Blink = get_rel_link($obj['link'],'alternate');
- $Bphoto = get_rel_link($obj['link'],'photo');
- }
- $Bname = $obj['title'];
-
- $A = '[zrl=' . chanlink_url($Alink) . '][bdi]' . $Aname . '[/bdi][/zrl]';
- $B = '[zrl=' . chanlink_url($Blink) . '][bdi]' . $Bname . '[/bdi][/zrl]';
- if ($Bphoto!="") $Bphoto = '[zrl=' . chanlink_url($Blink) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]';
-
- // we can't have a translation string with three positions but no distinguishable text
- // So here is the translate string.
-
- $txt = t('%1$s poked %2$s');
-
- // now translate the verb
-
- $txt = str_replace( t('poked'), t($verb), $txt);
-
- // then do the sprintf on the translation string
-
- $item['shortlocalize'] = sprintf($txt, '[bdi]' . $Aname . '[/bdi]', '[bdi]' . $Bname . '[/bdi]');
-
- $item['body'] = $item['localize'] = sprintf($txt, $A, $B);
- $item['body'] .= "\n\n\n" . $Bphoto;
- }
- if (stristr($item['verb'],ACTIVITY_MOOD)) {
- $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
- if(! $verb)
- return;
-
- $Aname = $item['author']['xchan_name'];
- $Alink = $item['author']['xchan_url'];
-
- $A = '[zrl=' . chanlink_url($Alink) . '][bdi]' . $Aname . '[/bdi][/zrl]';
-
- $txt = t('%1$s is %2$s','mood');
-
- $item['body'] = sprintf($txt, $A, t($verb));
- }
-
}
/**
@@ -345,7 +255,7 @@ function count_descendants($item) {
* @return boolean
*/
function visible_activity($item) {
- $hidden_activities = ['Like', 'Dislike', 'Accept', 'Reject', 'TentativeAccept', ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_SHARE, ACTIVITY_AGREE, ACTIVITY_DISAGREE, ACTIVITY_ABSTAIN, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE];
+ $hidden_activities = ['Like', 'Dislike', 'Accept', 'Reject', 'TentativeAccept', ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_SHARE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE];
if(intval($item['item_notshown']))
return false;
@@ -1082,15 +992,6 @@ function builtin_activity_puller($item, &$conv_responses) {
case 'dislike':
$verb = ['Dislike', ACTIVITY_DISLIKE];
break;
- case 'agree':
- $verb = ACTIVITY_AGREE;
- break;
- case 'disagree':
- $verb = ACTIVITY_DISAGREE;
- break;
- case 'abstain':
- $verb = ACTIVITY_ABSTAIN;
- break;
case 'attendyes':
$verb = ['Accept', ACTIVITY_ATTEND];
break;
diff --git a/include/items.php b/include/items.php
index f689cc7b5..8a0af5679 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2607,7 +2607,6 @@ function tag_deliver($uid, $item_id) {
return;
}
-
if ($is_group && intval($item['item_thread_top']) && intval($item['item_wall']) && $item['author_xchan'] !== $item['owner_xchan']) {
if($item['resource_type'] === 'group_item') {
@@ -2625,39 +2624,6 @@ function tag_deliver($uid, $item_id) {
}
/*
- * Seems like a good place to plug in a poke notification.
- */
-
- if (stristr($item['verb'],ACTIVITY_POKE)) {
- $poke_notify = true;
-
- if(($item['obj_type'] == "") || (!in_array($item['obj_type'], ['Person', ACTIVITY_OBJ_PERSON])) || (! $item['obj']))
- $poke_notify = false;
-
- $obj = json_decode($item['obj'],true);
- if($obj) {
- if($obj['id'] !== $u[0]['channel_hash'])
- $poke_notify = false;
- }
- if(intval($item['item_deleted']))
- $poke_notify = false;
-
- $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
- if($poke_notify) {
- Enotify::submit(array(
- 'to_xchan' => $u[0]['channel_hash'],
- 'from_xchan' => $item['author_xchan'],
- 'type' => NOTIFY_POKE,
- 'item' => $item,
- 'link' => $i[0]['llink'],
- 'verb' => ACTIVITY_POKE,
- 'activity' => $verb,
- 'otype' => 'item'
- ));
- }
- }
-
- /*
* Do community tagging
*/
diff --git a/include/text.php b/include/text.php
index ea9cf45e1..d6256b75b 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1270,77 +1270,6 @@ function sslify($s) {
return $s;
}
-/**
- * @brief Get an array of poke verbs.
- *
- * @return array
- * * \e index is present tense verb
- * * \e value is array containing past tense verb, translation of present, translation of past
- */
-function get_poke_verbs() {
-
- $arr = [
- 'poke' => ['poked', t('poke'), t('poked')],
- 'ping' => ['pinged', t('ping'), t('pinged')],
-
- // Those might be better suited for a nsfw poke addon
-
- // 'prod' => ['prodded', t('prod'), t('prodded')],
- // 'slap' => ['slapped', t('slap'), t('slapped')],
- // 'finger' => ['fingered', t('finger'), t('fingered')],
- // 'rebuff' => ['rebuffed', t('rebuff'), t('rebuffed')]
- ];
-
- /**
- * @hooks poke_verbs
- * * \e array associative array with another array as value
- */
- call_hooks('poke_verbs', $arr);
-
- return $arr;
-}
-
-/**
- * @brief Get an array of mood verbs.
- *
- * @return array
- * * \e index is the verb
- * * \e value is the translated verb
- */
-function get_mood_verbs() {
-
- $arr = [
- 'happy' => t('happy'),
- 'sad' => t('sad'),
- 'mellow' => t('mellow'),
- 'tired' => t('tired'),
- 'perky' => t('perky'),
- 'angry' => t('angry'),
- 'stupefied' => t('stupefied'),
- 'puzzled' => t('puzzled'),
- 'interested' => t('interested'),
- 'bitter' => t('bitter'),
- 'cheerful' => t('cheerful'),
- 'alive' => t('alive'),
- 'annoyed' => t('annoyed'),
- 'anxious' => t('anxious'),
- 'cranky' => t('cranky'),
- 'disturbed' => t('disturbed'),
- 'frustrated' => t('frustrated'),
- 'depressed' => t('depressed'),
- 'motivated' => t('motivated'),
- 'relaxed' => t('relaxed'),
- 'surprised' => t('surprised'),
- ];
-
- /**
- * @hooks mood_verbs
- * * \e array associative array with mood verbs
- */
- call_hooks('mood_verbs', $arr);
-
- return $arr;
-}
/**
* @brief Function to list all smilies, both internal and from addons.