aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/conversation.php24
-rwxr-xr-xmod/like.php3
-rw-r--r--view/theme/duepuntozero/style.css4
-rw-r--r--view/wall_item.tpl4
-rw-r--r--view/wallwall_item.tpl4
5 files changed, 24 insertions, 15 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 2244e8df7..946014b6d 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -549,13 +549,13 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$shareable = ((($profile_owner == local_user()) && ((! $item['private']) || $item['network'] === NETWORK_FEED)) ? true : false);
if($page_writeable) {
- if($toplevelpost) {
+ /* if($toplevelpost) { */
$likebuttons = array(
'like' => array( t("I like this \x28toggle\x29"), t("like")),
'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
);
if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
- }
+ /* } */
$qc = $qcomment = null;
@@ -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/mod/like.php b/mod/like.php
index 942a04fe7..642e948fd 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -37,7 +37,7 @@ function like_content(&$a) {
logger('like: verb ' . $verb . ' item ' . $item_id);
- $r = q("SELECT * FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s') AND `id` = `parent` LIMIT 1",
+ $r = q("SELECT * FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);
@@ -217,6 +217,7 @@ EOT;
$arr['gravity'] = GRAVITY_LIKE;
$arr['parent'] = $item['id'];
$arr['parent-uri'] = $item['uri'];
+ $arr['thr-parent'] = $item['uri'];
$arr['owner-name'] = $remote_owner['name'];
$arr['owner-link'] = $remote_owner['url'];
$arr['owner-avatar'] = $remote_owner['thumb'];
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