'announce' => ['title' => DI::l10n()->t('Reshares','title')]
];
+ if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
+ unset($conv_responses['dislike']);
+ }
+
// array with html for each thread (parent+comments)
$threads = [];
$threadsid = -1;
'share' => null,
];
+ if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
+ unset($likebuttons['dislike']);
+ }
+
$body = Item::prepareBody($item, true, $preview);
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
$likebuttons = Renderer::replaceMacros($like_tpl, [
'$id' => $link_item['id'],
'$likethis' => DI::l10n()->t("I like this \x28toggle\x29"),
- '$nolike' => DI::l10n()->t("I don't like this \x28toggle\x29"),
+ '$dislike' => DI::pConfig()->get(local_user(), 'system', 'hide_dislike') ? '' : DI::l10n()->t("I don't like this \x28toggle\x29"),
'$wait' => DI::l10n()->t('Please wait'),
'$return_path' => DI::args()->getQueryString(),
]);
}
$conv_responses = [
- 'like' => ['title' => DI::l10n()->t('Likes','title')],'dislike' => ['title' => DI::l10n()->t('Dislikes','title')],
- 'attendyes' => ['title' => DI::l10n()->t('Attending','title')], 'attendno' => ['title' => DI::l10n()->t('Not attending','title')], 'attendmaybe' => ['title' => DI::l10n()->t('Might attend','title')]
+ 'like' => ['title' => DI::l10n()->t('Likes','title')],
+ 'dislike' => ['title' => DI::l10n()->t('Dislikes','title')],
+ 'attendyes' => ['title' => DI::l10n()->t('Attending','title')],
+ 'attendno' => ['title' => DI::l10n()->t('Not attending','title')],
+ 'attendmaybe' => ['title' => DI::l10n()->t('Might attend','title')]
];
+ if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
+ unset($conv_responses['dislike']);
+ }
+
// display comments
if (DBA::isResult($items)) {
foreach ($items as $item) {
}
}
}
- $response_verbs = ['like'];
- $response_verbs[] = 'dislike';
- $responses = get_responses($conv_responses, $response_verbs, $link_item);
+
+ $responses = get_responses($conv_responses, ['like', 'dislike'], $link_item);
$paginate = $pager->renderFull($total);
}
$location_e = $location;
$owner_name_e = $this->getOwnerName();
+ if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
+ $buttons['dislike'] = false;
+ }
+
// Disable features that aren't available in several networks
if ($buttons["dislike"] && !in_array($item["network"], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA])) {
$buttons["dislike"] = false;
<div class="wall-item-like-buttons" id="wall-item-like-buttons-{{$id}}">
<a href="#" class="icon like" title="{{$likethis}}" onclick="dolike({{$id}},'like'); return false"></a>
- {{if $nolike}}
- <a href="#" class="icon dislike" title="{{$nolike}}" onclick="dolike({{$id}},'dislike'); return false"></a>
+ {{if $dislike}}
+ <a href="#" class="icon dislike" title="{{$dislike}}" onclick="dolike({{$id}},'dislike'); return false"></a>
{{/if}}
<img id="like-rotator-{{$id}}" class="like-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
</div>
<button type="button" class="btn-link button-likes" id="like-{{$id}}" title="{{$likethis}}" onclick="dolike({{$id}},'like'); return false;" data-toggle="button">
<i class="faded-icon page-action fa fa-thumbs-up" aria-hidden="true"></i>
</button>
- {{if $nolike}}
+ {{if $dislike}}
<span class="icon-padding"> </span>
- <button type="button" class="btn-link button-likes" id="dislike-{{$id}}" title="{{$nolike}}" onclick="dolike({{$id}},'dislike'); return false;" data-toggle="button">
+ <button type="button" class="btn-link button-likes" id="dislike-{{$id}}" title="{{$dislike}}" onclick="dolike({{$id}},'dislike'); return false;" data-toggle="button">
<i class="faded-icon page-action fa fa-thumbs-down" aria-hidden="true"></i>
</button>
{{/if}}
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
{{/if}}
- {{if $item.vote}}
+ {{if $item.vote.like}}
<a href="#" id="like-{{$item.id}}"{{if $item.responses.like.self}} class="active{{/if}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false">{{$item.vote.like.1}}</a>
+ {{/if}}
+ {{if $item.vote.dislike}}
<a href="#" id="dislike-{{$item.id}}"{{if $item.responses.dislike.self}} class="active{{/if}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false">{{$item.vote.dislike.1}}</a>
{{/if}}
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
{{/if}}
- {{if $item.vote}}
+ {{if $item.vote.like}}
<a href="#" id="like-{{$item.id}}"{{if $item.responses.like.self}} class="active"{{/if}} title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false">{{$item.vote.like.1}}</a>
+ {{/if}}
+ {{if $item.vote.dislike}}
<a href="#" id="dislike-{{$item.id}}"{{if $item.responses.dislike.self}} class="active"{{/if}} title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false">{{$item.vote.dislike.1}}</a>
{{/if}}