X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=20b54728c9c5c7509f14cf01e9fe1b56c76b735f;hb=57c47a8e3660b8b968b36ff7b379f51aa398a684;hp=5b9a11bde11c273acecd88e495111c24bcc7a06e;hpb=91ff025333970ffd58fbd20e8d6fd29f954f5baf;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 5b9a11bde1..20b54728c9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -203,12 +203,11 @@ function localize_item(&$item){ // 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); + $poked_t = trim(sprintf($txt, "","")); + $txt = str_replace( $poked_t, t($verb), $txt); // then do the sprintf on the translation string @@ -370,6 +369,7 @@ if(!function_exists('conversation')) { function conversation(&$a, $items, $mode, $update, $preview = false) { require_once('include/bbcode.php'); + require_once('mod/proxy.php'); $ssl_state = ((local_user()) ? true : false); @@ -558,13 +558,13 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $tag["url"] = $searchpath.strtolower($tag["term"]); if ($tag["type"] == TERM_HASHTAG) { - $hashtags[] = "#".$tag["term"].""; + $hashtags[] = "#".$tag["term"].""; $prefix = "#"; } elseif ($tag["type"] == TERM_MENTION) { - $mentions[] = "@".$tag["term"].""; + $mentions[] = "@".$tag["term"].""; $prefix = "@"; } - $tags[] = $prefix."".$tag["term"].""; + $tags[] = $prefix."".$tag["term"].""; } /*foreach(explode(',',$item['tag']) as $tag){ @@ -620,7 +620,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $likebuttons = false; $shareable = false; - $body = prepare_body($item,true); + $body = prepare_body($item,true, $preview); list($categories, $folders) = get_cats_and_terms($item); @@ -656,7 +656,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'name' => $profile_name_e, 'sparkle' => $sparkle, 'lock' => $lock, - 'thumb' => $profile_avatar, + 'thumb' => proxy_url($profile_avatar), 'title' => $item['title_e'], 'body' => $body_e, 'tags' => $tags_e, @@ -675,7 +675,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'indent' => '', 'owner_name' => $owner_name_e, 'owner_url' => $owner_url, - 'owner_photo' => $owner_photo, + 'owner_photo' => proxy_url($owner_photo), 'plink' => get_plink($item), 'edpost' => false, 'isstarred' => $isstarred, @@ -685,7 +685,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'like' => '', 'dislike' => '', 'comment' => '', - 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), + //'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), + 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/'.$item['guid'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), 'thread_level' => 1, @@ -1043,13 +1044,18 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { } } - if($mail_enabled) { - $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); - $jotnets .= '
' . t("Post to Email") . '
'; - } + if (!$a->user['hidewall']) { + if($mail_enabled) { + $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); + $jotnets .= '
' . t("Post to Email") . '
'; + } + + call_hooks('jot_networks', $jotnets); + } else + $jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'), + t('Hide your profile details from unknown viewers?')); call_hooks('jot_tool', $jotplugins); - call_hooks('jot_networks', $jotnets); if($notes_cid) $jotnets .= ''; @@ -1095,16 +1101,16 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$shortsetloc' => t('set location'), '$noloc' => t('Clear browser location'), '$shortnoloc' => t('clear location'), - '$title' => "", + '$title' => $x['title'], '$placeholdertitle' => t('Set title'), - '$category' => "", + '$category' => $x['category'], '$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''), '$wait' => t('Please wait'), '$permset' => t('Permission settings'), '$shortpermset' => t('permissions'), '$ptyp' => (($notes_cid) ? 'note' : 'wall'), - '$content' => '', - '$post_id' => '', + '$content' => $x['content'], + '$post_id' => $x['post_id'], '$baseurl' => $a->get_baseurl(true), '$defloc' => $x['default_location'], '$visitor' => $x['visitor'],