]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
new item view: sparkle links not redirecting
[friendica.git] / mod / profile.php
index 8ec29d38279aec6be0c1423fb3eb5965c1c69c00..827530bc8aa63afa8a1c532c16a84a5d9ec7a2e8 100644 (file)
@@ -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'] .= '<meta name="friendika.community" content="true" />';
+       }
        if(x($a->profile,'openidserver'))                               
                $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\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']));
@@ -161,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 .= '<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
@@ -293,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'],
@@ -339,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']) : '');
@@ -360,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,
@@ -371,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,