]> git.mxchange.org Git - friendica.git/commitdiff
owner's sparkle link, sometimes not author's - on display page
authorFriendika <info@friendika.com>
Mon, 24 Jan 2011 05:26:09 +0000 (21:26 -0800)
committerFriendika <info@friendika.com>
Mon, 24 Jan 2011 05:26:09 +0000 (21:26 -0800)
mod/display.php

index aed114abc25fa42e1af2eb1edecb14f08b60548e..3215ae90a04958352fac8b7eb3e74298e731e7fa 100644 (file)
@@ -173,6 +173,9 @@ function display_content(&$a) {
 
                        $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
 
+                       // I think this is redundant now but too chicken to remove it unless
+                       // I've had six cups of coffee and tested it completely
+
                        if(($item['network'] === 'dfrn') && (! $item['self'] )) {
                                $profile_url = $redirect_url;
                                $sparkle = ' sparkle';
@@ -216,7 +219,18 @@ function display_content(&$a) {
                        $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']);
 
-                       $profile_link = $profile_url;
+                       // Can we use our special contact URL for this author? 
+
+                       if(strlen($item['author-link'])) {
+                               if((link_compare($item['author-link'],$item['url'])) && ($item['network'] === 'dfrn') && (! $item['self'])) {
+                                       $profile_link = $redirect_url;
+                                       $sparkle = ' sparkle';
+                               }
+                               else {
+                                       $profile_link = $item['author-link'];
+                                       $sparkle = '';
+                               }
+                       }
 
                        if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
                                $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));