Normalize item body template variable name
This commit is contained in:
parent
9ff228812f
commit
2bfd53bf09
|
@ -576,7 +576,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
|||
unset($likebuttons['dislike']);
|
||||
}
|
||||
|
||||
$body = Item::prepareBody($item, true, $preview);
|
||||
$body_html = Item::prepareBody($item, true, $preview);
|
||||
|
||||
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
|
||||
|
||||
|
@ -601,7 +601,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
|||
'lock' => $lock,
|
||||
'thumb' => DI::baseUrl()->remove($item['author-avatar']),
|
||||
'title' => $title,
|
||||
'body' => $body,
|
||||
'body_html' => $body_html,
|
||||
'tags' => $tags['tags'],
|
||||
'hashtags' => $tags['hashtags'],
|
||||
'mentions' => $tags['mentions'],
|
||||
|
@ -612,7 +612,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
|||
'has_folders' => ((count($folders)) ? 'true' : ''),
|
||||
'categories' => $categories,
|
||||
'folders' => $folders,
|
||||
'text' => strip_tags($body),
|
||||
'text' => strip_tags($body_html),
|
||||
'localtime' => DateTimeFormat::local($item['created'], 'r'),
|
||||
'ago' => (($item['app']) ? DI::l10n()->t('%s from %s', Temporal::getRelativeDate($item['created']),$item['app']) : Temporal::getRelativeDate($item['created'])),
|
||||
'location_html' => $location_html,
|
||||
|
|
|
@ -357,13 +357,12 @@ class Post
|
|||
|
||||
localize_item($item);
|
||||
|
||||
$body = Item::prepareBody($item, true);
|
||||
$body_html = Item::prepareBody($item, true);
|
||||
|
||||
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
|
||||
|
||||
$body_e = $body;
|
||||
$text_e = strip_tags($body);
|
||||
$name_e = $profile_name;
|
||||
$text = strip_tags($body_html);
|
||||
|
||||
if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
|
||||
$title_e = ucfirst($item['content-warning']);
|
||||
|
@ -432,8 +431,8 @@ class Post
|
|||
'has_folders' => ((count($folders)) ? 'true' : ''),
|
||||
'categories' => $categories,
|
||||
'folders' => $folders,
|
||||
'body' => $body_e,
|
||||
'text' => $text_e,
|
||||
'body_html' => $body_html,
|
||||
'text' => $text,
|
||||
'id' => $this->getId(),
|
||||
'guid' => urlencode($item['guid']),
|
||||
'isevent' => $isevent,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
|
||||
<div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
|
||||
<div class="wall-item-title-end"></div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body_html nofilter}}</div>
|
||||
{{if $item.has_cats}}
|
||||
<div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}}{{if $cat.removeurl}} <a href="{{$cat.removeurl}}" title="{{$remove}}">[{{$remove}}]</a>{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
|
||||
</div>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
|
||||
<div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
|
||||
<div class="wall-item-title-end"></div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body nofilter}}<span>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body_html nofilter}}<span>
|
||||
<div class="body-tag">
|
||||
{{if !$item.suppress_tags}}
|
||||
{{foreach $item.tags as $tag}}
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
<span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
|
||||
{{/if}}
|
||||
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body_html nofilter}}</div>
|
||||
</div>
|
||||
|
||||
<!-- TODO -->
|
||||
|
|
|
@ -246,7 +246,7 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
<span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h4><br /></span>
|
||||
{{/if}}
|
||||
|
||||
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body_html nofilter}}</div>
|
||||
</div>
|
||||
|
||||
<!-- TODO -->
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<div class="wall-item-content">
|
||||
{{if $item.title}}<h2><a href="{{$item.plink.href}}">{{$item.title}}</a></h2>{{/if}}
|
||||
<div class="wall-item-body">{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body">{{$item.body_html nofilter}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wall-item-bottom">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<div class="wall-item-location">{{$item.location_html nofilter}}</div>
|
||||
</div>
|
||||
<div class="wall-item-content">
|
||||
{{$item.ago}} {{$item.body nofilter}}
|
||||
{{$item.ago}} {{$item.body_html nofilter}}
|
||||
</div>
|
||||
<div class="wall-item-tools">
|
||||
{{if $item.drop.pagedrop}}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
<div class="wall-item-content">
|
||||
{{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
|
||||
<span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body nofilter}}</span>
|
||||
<span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wall-item-bottom">
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
|
||||
<div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
|
||||
<div class="wall-item-title-end"></div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body_html nofilter}}</div>
|
||||
</div>
|
||||
<div class="wall-item-author">
|
||||
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
<div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
|
||||
<div class="wall-item-title-end"></div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body nofilter}}</span>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body_html nofilter}}</span>
|
||||
<div class="body-tag">
|
||||
{{if !$item.suppress_tags}}
|
||||
{{foreach $item.tags as $tag}}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div class="wall-item-content">
|
||||
{{if $item.title}}<h2><a href="{{$item.plink.href}}">{{$item.title}}</a></h2>{{/if}}
|
||||
<div class="wall-item-body">{{$item.body nofilter}}</div>
|
||||
<div class="wall-item-body">{{$item.body_html nofilter}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wall-item-bottom">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<div class="wall-item-location">{{$item.location_html nofilter}}</div>
|
||||
</div>
|
||||
<div class="wall-item-content">
|
||||
{{$item.ago}} {{$item.body nofilter}}
|
||||
{{$item.ago}} {{$item.body_html nofilter}}
|
||||
</div>
|
||||
<div class="wall-item-tools">
|
||||
{{if $item.drop.pagedrop}}
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
<div itemprop="description" class="wall-item-content">
|
||||
{{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
|
||||
<span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body nofilter}}</span>
|
||||
<span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wall-item-bottom">
|
||||
|
|
Loading…
Reference in a new issue