]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Merge commit 'mike/master'
[friendica.git] / mod / profile.php
index 9b8388177d5bdde811994aba5eb3e68d5295d19f..46d13298e004e6eb22c35f1401be1f6c41f4437d 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']));
@@ -134,12 +133,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 +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
@@ -230,7 +241,7 @@ function profile_content(&$a, $update = 0) {
 
 
        if($is_owner && ! $update)
-                       $o .= get_birthdays();
+               $o .= get_birthdays();
 
        $cmnt_tpl = load_view_file('view/comment_item.tpl');
 
@@ -281,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'],
@@ -297,7 +309,7 @@ function profile_content(&$a, $update = 0) {
 
                        $profile_url = $item['url'];
 
-                       // This is my profile but I'm not the author of this post/comment. If it's somebody that's a fan or mutual friend,
+                       // This is my profile page but I'm not the author of this post/comment. If it's somebody that's a fan or mutual friend,
                        // I can go directly to their profile as an authenticated guest.
 
                        if(local_user() && ($item['contact-uid'] == $_SESSION['uid']) 
@@ -314,7 +326,7 @@ function profile_content(&$a, $update = 0) {
                        // local contact info at all. In this module you should never encounter a third-party author, but we still will do
                        // the right thing if you ever do. 
 
-                       $diff_author = (($item['url'] !== $item['author-link']) ? true : false);
+                       $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
 
                        $profile_name   = (((strlen($item['author-name']))   && $diff_author) ? $item['author-name']   : $item['name']);
                        $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $item['thumb']);
@@ -359,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,
@@ -379,6 +392,8 @@ function profile_content(&$a, $update = 0) {
        }
                
        $o .= paginate($a);
+       $o .= '<div class="cc-license">' . t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.') . '</div>';
+
 
        return $o;
 }