mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:45:16 +02:00
facebook style comments
This commit is contained in:
parent
4e40156607
commit
b0f8cd5fe6
3 changed files with 21 additions and 12 deletions
|
@ -216,16 +216,17 @@ dbg(2);
|
|||
|
||||
$tpl = file_get_contents('view/wall_item.tpl');
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
for($x = 0; $x < count($r); $x ++) {
|
||||
$rr = $r[$x];
|
||||
$comment = '';
|
||||
if(can_write_wall($a,$a->profile['profile_uid'])) {
|
||||
$comment = replace_macros($template,array(
|
||||
'$id' => $rr['item_id'],
|
||||
'$parent' => $rr['parent'],
|
||||
'$profile_uid' => $a->profile['profile_uid']
|
||||
));
|
||||
}
|
||||
else {
|
||||
$comment = '';
|
||||
if((($x + 1) < count($r)) && ($r[$x+1]['parent'] != $rr['parent'])) {
|
||||
$comment = replace_macros($template,array(
|
||||
'$id' => $rr['item_id'],
|
||||
'$parent' => $rr['parent'],
|
||||
'$profile_uid' => $a->profile['profile_uid']
|
||||
));
|
||||
}
|
||||
}
|
||||
$o .= item_display($a,$rr,$tpl,$comment);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue