X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=827530bc8aa63afa8a1c532c16a84a5d9ec7a2e8;hb=fecef140d5181348e1f46cf8405f13bb05401b3e;hp=505edf5ced6be421a88b1d649066442d884d1a9c;hpb=4198efe03570606b35f3aba6cdf7f80de20384f4;p=friendica.git diff --git a/mod/profile.php b/mod/profile.php index 505edf5ced..827530bc8a 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -18,6 +18,9 @@ function profile_init(&$a) { profile_load($a,$which,$profile); + if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] & PAGE_COMMUNITY)) { + $a->page['htmlhead'] .= ''; + } if(x($a->profile,'openidserver')) $a->page['htmlhead'] .= '' . "\r\n"; if(x($a->profile,'openid')) { @@ -82,7 +85,6 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if(! $update) { if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); @@ -134,12 +136,24 @@ function profile_content(&$a, $update = 0) { $lockstate = 'lock'; else $lockstate = 'unlock'; + + $jotplugins = ''; + $jotnets = ''; + call_hooks('jot_tool', $jotplugins); + + call_hooks('jot_networks', $jotnets); + + $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); + $o .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(), '$defloc' => (($is_owner) ? $a->user['default-location'] : ''), '$return_path' => $a->cmd, '$visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'), '$lockstate' => $lockstate, + '$emailcc' => t('CC: email addresses'), + '$jotnets' => $jotnets, + '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$bang' => '', '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''), '$profile_uid' => $a->profile['profile_uid'] @@ -149,11 +163,11 @@ function profile_content(&$a, $update = 0) { // This is ugly, but we can't pass the profile_uid through the session to the ajax updater, // because browser prefetching might change it on us. We have to deliver it with the page. - if($tab === 'posts' && (! $a->pager['start'])) { + if($tab === 'posts') { $o .= '
' . "\r\n"; - $o .= "\r\n"; + $o .= "\r\n"; } - } // Construct permissions @@ -281,7 +295,8 @@ function profile_content(&$a, $update = 0) { } if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', + '$jsreload' => '', // $_SESSION['return_url'], '$type' => 'wall-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], @@ -327,7 +342,7 @@ function profile_content(&$a, $update = 0) { if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user())) $dropping = true; - $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'])); + $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'], '$delete' => t('Delete'))); $like = ((isset($alike[$item['id']])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); @@ -348,7 +363,7 @@ function profile_content(&$a, $update = 0) { $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], - '$title' => t('View $name\'s profile'), + '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, '$name' => $profile_name, '$thumb' => $profile_avatar, @@ -359,6 +374,7 @@ function profile_content(&$a, $update = 0) { '$lock' => $lock, '$location' => $location, '$indent' => $indent, + '$plink' => get_plink($item), '$drop' => $drop, '$like' => $like, '$vote' => $likebuttons,