implement rel alternate, some corresponding last minute touchups on display module
This commit is contained in:
parent
a0a7c3be8b
commit
7ad27f5737
6 changed files with 12 additions and 9 deletions
|
@ -179,6 +179,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
|
||||||
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
||||||
'$location' => xmlify($item['location']),
|
'$location' => xmlify($item['location']),
|
||||||
'$type' => $type,
|
'$type' => $type,
|
||||||
|
'$alt' => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']),
|
||||||
'$content' => xmlify($item['body']),
|
'$content' => xmlify($item['body']),
|
||||||
'$verb' => xmlify($verb),
|
'$verb' => xmlify($verb),
|
||||||
'$actobj' => $actobj, // do not xmlify
|
'$actobj' => $actobj, // do not xmlify
|
||||||
|
@ -196,6 +197,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
|
||||||
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
||||||
'$type' => $type,
|
'$type' => $type,
|
||||||
'$content' => xmlify($item['body']),
|
'$content' => xmlify($item['body']),
|
||||||
|
'$alt' => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']),
|
||||||
'$verb' => xmlify($verb),
|
'$verb' => xmlify($verb),
|
||||||
'$actobj' => $actobj, // do not xmlify
|
'$actobj' => $actobj, // do not xmlify
|
||||||
'$parent_id' => xmlify($item['parent-uri']),
|
'$parent_id' => xmlify($item['parent-uri']),
|
||||||
|
|
|
@ -188,6 +188,7 @@
|
||||||
'$type' => 'text',
|
'$type' => 'text',
|
||||||
'$verb' => xmlify($verb),
|
'$verb' => xmlify($verb),
|
||||||
'$actobj' => $actobj,
|
'$actobj' => $actobj,
|
||||||
|
'$alt' => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
|
||||||
'$content' => xmlify($item['body']),
|
'$content' => xmlify($item['body']),
|
||||||
'$parent_id' => xmlify($item['parent-uri']),
|
'$parent_id' => xmlify($item['parent-uri']),
|
||||||
'$comment_allow' => 0
|
'$comment_allow' => 0
|
||||||
|
@ -228,6 +229,7 @@
|
||||||
'$verb' => xmlify($verb),
|
'$verb' => xmlify($verb),
|
||||||
'$actobj' => $actobj,
|
'$actobj' => $actobj,
|
||||||
'$content' => xmlify($item['body']),
|
'$content' => xmlify($item['body']),
|
||||||
|
'$alt' => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
|
||||||
'$comment_allow' => (($item['last-child']) ? 1 : 0)
|
'$comment_allow' => (($item['last-child']) ? 1 : 0)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -241,6 +243,7 @@
|
||||||
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
|
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
|
||||||
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)),
|
||||||
'$content' => xmlify($item['body']),
|
'$content' => xmlify($item['body']),
|
||||||
|
'$alt' => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
|
||||||
'$location' => xmlify($item['location']),
|
'$location' => xmlify($item['location']),
|
||||||
'$type' => 'text',
|
'$type' => 'text',
|
||||||
'$verb' => xmlify($verb),
|
'$verb' => xmlify($verb),
|
||||||
|
|
|
@ -155,6 +155,9 @@ function display_content(&$a) {
|
||||||
: '<div class="wall-item-lock"></div>');
|
: '<div class="wall-item-lock"></div>');
|
||||||
|
|
||||||
if(can_write_wall($a,$a->profile['uid'])) {
|
if(can_write_wall($a,$a->profile['uid'])) {
|
||||||
|
if($item['id'] == $item['parent']) {
|
||||||
|
$likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
|
||||||
|
}
|
||||||
if($item['last-child']) {
|
if($item['last-child']) {
|
||||||
$comment = replace_macros($cmnt_tpl,array(
|
$comment = replace_macros($cmnt_tpl,array(
|
||||||
'$return_path' => $_SESSION['return_url'],
|
'$return_path' => $_SESSION['return_url'],
|
||||||
|
@ -219,20 +222,14 @@ function display_content(&$a) {
|
||||||
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
|
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
|
||||||
$profile_link = $profile_url;
|
$profile_link = $profile_url;
|
||||||
|
|
||||||
$drop = '';
|
|
||||||
|
|
||||||
if(($item['contact-id'] == $_SESSION['visitor_id']) || ($item['uid'] == get_uid()))
|
if(($item['contact-id'] == $_SESSION['visitor_id']) || ($item['uid'] == get_uid()))
|
||||||
$drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
|
$drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
|
||||||
|
else
|
||||||
|
$drop = replace_macros(load_view_file('view/wall_fake_drop.tpl'), array('$id' => $item['id']));
|
||||||
|
|
||||||
$like = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
|
$like = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
|
||||||
$dislike = (($dlike[$item['id']]) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
|
$dislike = (($dlike[$item['id']]) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
|
||||||
|
|
||||||
$likebuttons = '';
|
|
||||||
if($item['id'] == $item['parent']) {
|
|
||||||
$likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros($template,array(
|
$o .= replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
|
|
|
@ -234,7 +234,6 @@ function network_content(&$a, $update = 0) {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
|
$drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<published>$published</published>
|
<published>$published</published>
|
||||||
<updated>$updated</updated>
|
<updated>$updated</updated>
|
||||||
<content type="$type" >$content</content>
|
<content type="$type" >$content</content>
|
||||||
|
<link rel="alternate" href="$alt" />
|
||||||
<dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
|
<dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
|
||||||
<as:verb>$verb</as:verb>
|
<as:verb>$verb</as:verb>
|
||||||
$actobj
|
$actobj
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<published>$published</published>
|
<published>$published</published>
|
||||||
<updated>$updated</updated>
|
<updated>$updated</updated>
|
||||||
<content type="$type" >$content</content>
|
<content type="$type" >$content</content>
|
||||||
|
<link rel="alternate" href="$alt" />
|
||||||
<dfrn:location>$location</dfrn:location>
|
<dfrn:location>$location</dfrn:location>
|
||||||
<dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
|
<dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
|
||||||
<as:verb>$verb</as:verb>
|
<as:verb>$verb</as:verb>
|
||||||
|
|
Loading…
Reference in a new issue