X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=15a3a861f969d36028799d1323af508fb3b96597;hb=1207bb1b55f402074a73d9ff0221ff8c9a6a285a;hp=91c1ba6d850e25c2e74a41cd1282b2aaf5bc6a13;hpb=837cce8a75e884f76a67aef5ee47a9363b96fbcc;p=friendica.git diff --git a/mod/profile.php b/mod/profile.php index 91c1ba6d85..15a3a861f9 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -82,7 +82,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'])); @@ -135,9 +134,14 @@ function profile_content(&$a, $update = 0) { else $lockstate = 'unlock'; - $jotplugins = ""; - call_hooks('jot_tool', $jotplugins); - + $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'] : ''), @@ -145,22 +149,22 @@ function profile_content(&$a, $update = 0) { '$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'], - '$jotplugins' => $jotplugins + '$profile_uid' => $a->profile['profile_uid'] )); } // 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 @@ -288,7 +292,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'], @@ -334,7 +339,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']) : ''); @@ -355,7 +360,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, @@ -366,6 +371,7 @@ function profile_content(&$a, $update = 0) { '$lock' => $lock, '$location' => $location, '$indent' => $indent, + '$plink' => get_plink($item), '$drop' => $drop, '$like' => $like, '$vote' => $likebuttons,