liking comments backend

This commit is contained in:
friendica 2012-06-23 04:44:48 -07:00
parent bf47bf5ba0
commit 7614d35cad
4 changed files with 20 additions and 12 deletions

View file

@ -659,8 +659,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb)); $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']) : ''); $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
$dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : ''); $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' => ''); $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate); call_hooks('render_location',$locate);
@ -876,13 +876,17 @@ function like_puller($a,$item,&$arr,$mode) {
} }
else else
$url = zrl($url); $url = zrl($url);
if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
$arr[$item['parent'] . '-l'] = array(); if(! $item['thr-parent'])
if(! isset($arr[$item['parent']])) $item['thr-parent'] = $item['parent-uri'];
$arr[$item['parent']] = 1;
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 else
$arr[$item['parent']] ++; $arr[$item['thr-parent']] ++;
$arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>'; $arr[$item['thr-parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
} }
return; return;
}} }}

View file

@ -935,6 +935,10 @@ input#dfrn-url {
background: #EEEEEE; background: #EEEEEE;
} }
.wall-item-like.comment, .wall-item-dislike.comment {
margin-left: 50px;
}
.wall-item-info { .wall-item-info {
display: block; display: block;
float: left; float: left;

View file

@ -69,8 +69,8 @@
</div> </div>
</div> </div>
<div class="wall-item-wrapper-end"></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-like $item.indent" 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-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-wrapper" > <div class="wall-item-comment-wrapper" >
$item.comment $item.comment
</div> </div>

View file

@ -74,8 +74,8 @@
</div> </div>
</div> </div>
<div class="wall-item-wrapper-end"></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-like $item.indent" 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-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-separator"></div> <div class="wall-item-comment-separator"></div>
<div class="wall-item-comment-wrapper"> <div class="wall-item-comment-wrapper">
$item.comment $item.comment