]> git.mxchange.org Git - friendica.git/commitdiff
liking comments backend
authorfriendica <info@friendica.com>
Sat, 23 Jun 2012 11:44:48 +0000 (04:44 -0700)
committerfriendica <info@friendica.com>
Sat, 23 Jun 2012 11:44:48 +0000 (04:44 -0700)
include/conversation.php
view/theme/duepuntozero/style.css
view/wall_item.tpl
view/wallwall_item.tpl

index 2244e8df7ff0bbd2d43fca95e1d32a835ffdfac5..d0ced1d18a2c73119b1ac372c8087a46a7e42c85 100644 (file)
@@ -659,8 +659,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
 
-                               $like    = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
-                               $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
+                               $like    = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+                               $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
 
                                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                                call_hooks('render_location',$locate);
@@ -876,13 +876,17 @@ function like_puller($a,$item,&$arr,$mode) {
                }
                else
                        $url = zrl($url);
-               if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
-                       $arr[$item['parent'] . '-l'] = array();
-               if(! isset($arr[$item['parent']]))
-                       $arr[$item['parent']] = 1;
+
+               if(! $item['thr-parent'])
+                       $item['thr-parent'] = $item['parent-uri'];
+
+               if(! ((isset($arr[$item['thr-parent'] . '-l'])) && (is_array($arr[$item['thr-parent'] . '-l']))))
+                       $arr[$item['thr-parent'] . '-l'] = array();
+               if(! isset($arr[$item['thr-parent']]))
+                       $arr[$item['thr-parent']] = 1;
                else    
-                       $arr[$item['parent']] ++;
-               $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
+                       $arr[$item['thr-parent']] ++;
+               $arr[$item['thr-parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
        }
        return;
 }}
index be755d411160e85010a4b93c59ddd405eb53ce62..de366210b6e0d06ca8a6d69745fc23c89bab4182 100644 (file)
@@ -935,6 +935,10 @@ input#dfrn-url {
        background: #EEEEEE;
 }
 
+.wall-item-like.comment, .wall-item-dislike.comment {
+       margin-left: 50px;
+}
+
 .wall-item-info {
        display: block;
        float: left;
index a6a96d8792933af2f223c290f094530c822d51b8..dae33b3f75a209ad9deefa194927cf105109db3a 100644 (file)
@@ -69,8 +69,8 @@
                </div>
        </div>
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
        <div class="wall-item-comment-wrapper" >
        $item.comment
        </div>
index 9cbfc991eae06a16d933ee22723256d5af1789fc..a48acfec5bfad5ab2ff3fb2eccbff198857759dc 100644 (file)
@@ -74,8 +74,8 @@
                </div>
        </div>  
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
        <div class="wall-item-comment-separator"></div>
        <div class="wall-item-comment-wrapper">
        $item.comment