aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-23 04:44:48 -0700
committerfriendica <info@friendica.com>2012-06-23 04:44:48 -0700
commit7614d35cadb274a48434a61cdab205ca120462a3 (patch)
treec48f141ebc4a9b63cff6181eb942927836fc721a
parentbf47bf5ba015a844919362a56903eb82c064bee9 (diff)
downloadvolse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.tar.gz
volse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.tar.bz2
volse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.zip
liking comments backend
-rw-r--r--include/conversation.php20
-rw-r--r--view/theme/duepuntozero/style.css4
-rw-r--r--view/wall_item.tpl4
-rw-r--r--view/wallwall_item.tpl4
4 files changed, 20 insertions, 12 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 2244e8df7..d0ced1d18 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -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;
}}
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index be755d411..de366210b 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -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;
diff --git a/view/wall_item.tpl b/view/wall_item.tpl
index a6a96d879..dae33b3f7 100644
--- a/view/wall_item.tpl
+++ b/view/wall_item.tpl
@@ -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>
diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl
index 9cbfc991e..a48acfec5 100644
--- a/view/wallwall_item.tpl
+++ b/view/wallwall_item.tpl
@@ -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