<option value="username"{if $sortField == 'username'} selected{/if}>{lang}wcf.user.username{/lang}</option>
<option value="registrationDate"{if $sortField == 'registrationDate'} selected{/if}>{lang}wcf.user.registrationDate{/lang}</option>
<option value="activityPoints"{if $sortField == 'activityPoints'} selected{/if}>{lang}wcf.user.activityPoint{/lang}</option>
- {if MODULE_LIKE}<option value="likesReceived"{if $sortField == 'likesReceived'} selected{/if}>{lang}wcf.like.likesReceived{/lang}</option>{/if}
+ {if MODULE_LIKE}<option value="reactionReputation"{if $sortField == 'reactionReputation'} selected{/if}>{lang}wcf.like.reactionReputation{/lang}</option>{/if}
<option value="lastActivityTime"{if $sortField == 'lastActivityTime'} selected{/if}>{lang}wcf.user.usersOnline.lastActivity{/lang}</option>
{event name='sortField'}
</select>
<div class="userRank">{@$userProfile->getRank()->getImage()}</div>
{/if}
{/if}
+
+ {if MODULE_LIKE && MESSAGE_SIDEBAR_ENABLE_LIKES_RECEIVED && !$isReply}
+ <div class="reactionStatusContainer">
+ {assign var=overallReactionCount value=$userProfile->positiveReactionsReceived - $userProfile->negativeReactionsReceived}
+ <a href="{link controller='User' object=$userProfile}{/link}#likes" class="jsTooltip" title="{lang user=$userProfile}wcf.like.showLikesReceived{/lang}">
+ {if $overallReactionCount > 0}
+ <span class="positiveReactionCount"><span class="fa fa-plus-circle icon16"></span> {$overallReactionCount|shortUnit}</span>
+ {elseif $overallReactionCount < 0}
+ {assign var=overallReactionCount value=$overallReactionCount*-1}
+ <span class="negativeReactionCount"><span class="fa fa-minus-circle icon16"></span> {$overallReactionCount|shortUnit}</span>
+ {else}
+ <span class="neutralReactionCount"><span class="fa fa-plus-circle icon16"></span> {$overallReactionCount|shortUnit}</span>
+ {/if}
+ </a>
+ </div>
+ {/if}
{if !$isReply && MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($userProfile->isAccessible('canViewTrophies') || $userProfile->userID == $__wcf->session->userID) && $userProfile->getSpecialTrophies()|count}
<div class="specialTrophyContainer">
<div class="userCredits">
<dl class="plain dataList">
{content}
- {if MODULE_LIKE && MESSAGE_SIDEBAR_ENABLE_LIKES_RECEIVED && $userProfile->likesReceived}
- <dt><a href="{link controller='User' object=$userProfile}{/link}#likes" class="jsTooltip" title="{lang user=$userProfile}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a></dt>
- <dd>{#$userProfile->likesReceived}</dd>
- {/if}
-
{if MESSAGE_SIDEBAR_ENABLE_ACTIVITY_POINTS && $userProfile->activityPoints}
<dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang user=$userProfile}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$userProfile->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
<dd>{#$userProfile->activityPoints}</dd>
{event name='statistics'}
-{if MODULE_LIKE && $user->likesReceived}
- <dt>{if $__wcf->getSession()->getPermission('user.profile.canViewUserProfile') && !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a>{else}{lang}wcf.like.likesReceived{/lang}{/if}</dt>
- <dd>{#$user->likesReceived}</dd>
+{if MODULE_LIKE}
+ {assign var=reactionReputation value=$user->positiveReactionsReceived - $user->negativeReactionsReceived}
+ {if $reactionReputation}
+ <dt>{if $__wcf->getSession()->getPermission('user.profile.canViewUserProfile') && !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.reputation{/lang}</a>{else}{lang}wcf.like.reputation{/lang}{/if}</dt>
+ <dd>{#$reactionReputation}</dd>
+ {/if}
{/if}
{if $user->activityPoints}
{if !$user->isProtected()}
+ {if MODULE_LIKE}
+ {assign var=reactionReputation value=$user->positiveReactionsReceived - $user->negativeReactionsReceived}
+ <section class="box reactionReputationBox {if $reactionReputation >= 0}positiveReactionReputationBox{else}negativeReactionReputationBox{/if}" data-static-box-identifier="com.woltlab.wcf.ReactionReputation">
+ <h2 class="boxTitle"><a href="{link controller='User' object=$user}{/link}#likes">Reputation</a></h2>
+
+ <div class="boxContent">
+ {if $reactionReputation > 0}
+ <span class="positiveReactionCount"><span class="fa fa-plus-circle icon32"></span> {#$reactionReputation}</span>
+ {elseif $reactionReputation < 0}
+ {assign var=reactionReputation value=$reactionReputation*-1}
+ <span class="negativeReactionCount"><span class="fa fa-minus-circle icon32"></span> {#$reactionReputation}</span>
+ {else}
+ <span class="neutralReactionCount"><span class="fa fa-plus-circle icon32"></span> {#$reactionReputation}</span>
+ {/if}
+ </div>
+ </section>
+ {/if}
+
{if $followingCount}
<section class="box" data-static-box-identifier="com.woltlab.wcf.UserProfileFollowing">
<h2 class="boxTitle">{lang}wcf.user.profile.following{/lang} <span class="badge">{#$followingCount}</span></h2>
/**
* @inheritDoc
*/
- public $validSortFields = ['username', 'registrationDate', 'activityPoints', 'likesReceived', 'lastActivityTime'];
+ public $validSortFields = ['username', 'registrationDate', 'activityPoints', 'reactionReputation', 'lastActivityTime'];
/**
* @inheritDoc
* @inheritDoc
*/
protected function readObjects() {
+ if ($this->sortField === 'reactionReputation') {
+ $this->sqlOrderBy = '(user_table.positiveReactionsReceived - user_table.negativeReactionsReceived) '. $this->sortOrder;
+ }
+
parent::readObjects();
$userIDs = [];
padding: 0px;
}
}
+
+.reactionStatusContainer {
+ margin-top: 10px;
+
+ .positiveReactionCount {
+ color: $wcfStatusSuccessText;
+
+ .fa {
+ color: $wcfStatusSuccessText;
+ }
+ }
+
+ .negativeReactionCount {
+ color: $wcfStatusErrorText;
+
+ .fa {
+ color: $wcfStatusErrorText;
+ }
+ }
+
+ .neutralReactionCount {
+ color: $wcfStatusSuccessText;
+
+ .fa {
+ color: $wcfStatusSuccessText;
+ }
+ }
+}
+
+.box.reactionReputationBox {
+ &.positiveReactionReputationBox {
+ background-color: $wcfStatusSuccessBackground;
+ color: $wcfStatusSuccessText;
+
+ .fa {
+ color: $wcfStatusSuccessText;
+ }
+
+ .boxTitle > a {
+ color: $wcfStatusSuccessText;
+ }
+ }
+
+ &.negativeReactionReputationBox {
+ background-color: $wcfStatusErrorBackground;
+ color: $wcfStatusErrorText;
+
+ .fa {
+ color: $wcfStatusErrorText;
+ }
+
+ .boxTitle > a {
+ color: $wcfStatusErrorText;
+ }
+ }
+
+ .boxContent {
+ @include wcfFontHeadline;
+
+ text-align: center;
+ }
+}
+
+@include screen-sm-down {
+ .reactionStatusContainer {
+ display: none;
+ }
+}
\ No newline at end of file
<item name="wcf.like.button.like"><![CDATA[Gefällt mir]]></item>
<item name="wcf.like.button.dislike"><![CDATA[Gefällt mir nicht]]></item>
<item name="wcf.like.likesReceived"><![CDATA[Erhaltene Likes]]></item>
- <item name="wcf.like.showLikesReceived"><![CDATA[Erhaltene Likes von {$user->username}]]></item>
+ <item name="wcf.like.showLikesReceived"><![CDATA[Erhaltene Reaktionen von {$user->username}]]></item>
<item name="wcf.like.likesGiven"><![CDATA[Vergebene Likes]]></item>
<item name="wcf.like.dislikesReceived"><![CDATA[Erhaltene Dislikes]]></item>
<item name="wcf.like.dislikesGiven"><![CDATA[Vergebene Dislikes]]></item>
<item name="wcf.like.reaction.more"><![CDATA[Weitere Reaktionen]]></item>
<item name="wcf.like.reactionsReceived"><![CDATA[Erhaltene Reaktionen]]></item>
<item name="wcf.like.reactionsGiven"><![CDATA[Vergebene Reaktionen]]></item>
+ <item name="wcf.like.reactionReputation"><![CDATA[Reputation aus Raktionen]]></item>
+ <item name="wcf.like.reputation"><![CDATA[Reputation]]></item>
</category>
<category name="wcf.map">
<item name="wcf.like.button.like"><![CDATA[Like]]></item>
<item name="wcf.like.button.dislike"><![CDATA[Dislike]]></item>
<item name="wcf.like.likesReceived"><![CDATA[Likes Received]]></item>
- <item name="wcf.like.showLikesReceived"><![CDATA[Likes Received by {$user->username}]]></item>
+ <item name="wcf.like.showLikesReceived"><![CDATA[Reactions Received by {$user->username}]]></item>
<item name="wcf.like.likesGiven"><![CDATA[Likes Given]]></item>
<item name="wcf.like.dislikesReceived"><![CDATA[Dislikes Received]]></item>
<item name="wcf.like.dislikesGiven"><![CDATA[Dislikes Given]]></item>
<item name="wcf.like.reaction.more"><![CDATA[More Reactions]]></item>
<item name="wcf.like.reactionsReceived"><![CDATA[Reactions Received]]></item>
<item name="wcf.like.reactionsGiven"><![CDATA[Reactions Given]]></item>
+ <item name="wcf.like.reactionReputation"><![CDATA[Reputation from Reactions]]></item>
+ <item name="wcf.like.reputation"><![CDATA[Reputation]]></item>
</category>
<category name="wcf.map">