allow photo-items to appear full width if large photos feature is enabled. in prepare_body() split off mentions, tags, categories folders and attachments from body for easier theming. some other little fixes.

This commit is contained in:
Mario Vavti
2015-10-14 22:14:19 +02:00
parent d616099de6
commit b4e83b6537
12 changed files with 179 additions and 153 deletions

View File

@@ -278,13 +278,21 @@ class Item extends BaseObject {
$children = $this->get_children();
$is_photo = (($item['resource_type'] == 'photo') ? true : false) && feature_enabled($conv->get_profile_owner(),'large_photos');
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
$tmp_item = array(
'template' => $this->get_template(),
'mode' => $mode,
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'tags' => array(),
'body' => $body,
'text' => strip_tags($body),
'body' => $body['html'],
'tags' => $body['tags'],
'categories' => $body['categories'],
'mentions' => $body['mentions'],
'attachments' => $body['attachments'],
'folders' => $body['folders'],
'text' => strip_tags($body['html']),
'id' => $this->get_id(),
'mid' => $item['mid'],
'isevent' => $isevent,
@@ -325,6 +333,8 @@ class Item extends BaseObject {
'owner_url' => $this->get_owner_url(),
'owner_photo' => $this->get_owner_photo(),
'owner_name' => $this->get_owner_name(),
'is_photo' => $is_photo,
'has_tags' => $has_tags,
// Item toolbar buttons
'like' => $like,