continue;
}
+ // You can always comment on Diaspora items
+ if (($item['network'] == NETWORK_DIASPORA) && (local_user() == $item['uid'])) {
+ $item['writable'] = true;
+ }
+
$item['pagedrop'] = $data['pagedrop'];
$child = new Item($item);
$this->add_child($child);
$item = $this->get_data();
$edited = false;
- if (strcmp($item['created'], $item['edited'])<>0) {
+ // If the time between "created" and "editet" differes we add
+ // a notices that the post was editet.
+ // Note: In some networks reshared items seem to have (sometimes) a difference
+ // between creation time and edit time of a second. Thats why we add the notice
+ // only if the difference is more than 1 second.
+ if (abs(strtotime($item['created']) - strtotime($item['edited'])) > 1) {
$edited = array(
'label' => t('This entry was edited'),
'date' => datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r'),
call_hooks('render_location',$locate);
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
- $searchpath = "search?tag=";
$tags=array();
$hashtags = array();
$mentions = array();
unset($buttons["like"]);
}
- // Diaspora isn't able to do likes on comments - but Hubzilla does
- /// @todo When Diaspora will pass this information we will remove these lines
- if (($item["item_network"] == NETWORK_DIASPORA) && ($indent == 'comment') &&
- !Diaspora::is_redmatrix($item["owner-link"]) && isset($buttons["like"])) {
- unset($buttons["like"]);
- }
-
- // Facebook can like comments - but it isn't programmed in the connector yet.
- if (($item["item_network"] == NETWORK_FACEBOOK) && ($indent == 'comment') && isset($buttons["like"])) {
- unset($buttons["like"]);
- }
-
$tmp_item = array(
'template' => $this->get_template(),
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'edited' => $edited,
'network' => $item["item_network"],
'network_name' => network_to_name($item['item_network'], $profile_link),
+ 'received' => $item['received'],
+ 'commented' => $item['commented'],
+ 'created_date' => $item['created'],
);
$arr = array('item' => $item, 'output' => $tmp_item);