]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
generalise wallwall template and fix "via wall-to-wall" float
[friendica.git] / mod / profile.php
index 3b4616a34f14a878c4aef09b9d4e6602e0630654..5cab6662afbc21fb76cfa645398f1617d4990612 100644 (file)
@@ -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,12 @@ function profile_content(&$a, $update = 0) {
                        else
                                $lockstate = 'unlock';
        
-                       $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(
@@ -147,6 +149,7 @@ 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) : ''),
@@ -157,11 +160,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 .= '<div id="live-profile"></div>' . "\r\n";
-                       $o .= "<script> var profile_uid = " . $a->profile['profile_uid'] . "; </script>\r\n";
+                       $o .= "<script> var profile_uid = " . $a->profile['profile_uid'] 
+                               . "; var netargs = ''; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
                }
-
        }
 
        // Construct permissions
@@ -289,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'],
@@ -356,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,
@@ -367,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,