<dd>
{$user.reaction_score|number}
</dd>
<dd>
<a href="{{ link('account/reactions') }}" class="fauxBlockLink-linkRow u-concealed">
{$user.reaction_score|number}
</a>
</dd>
Or a suggestionIt would require an add-on.
Thanks,but thatshows me my own reactions received, not another user's
Thanks,but thatshows me my own reactions received, not another user's
Yes , sorry that's right.
<dd>
<a href="{{ link('account/reactions', $xf.visitor) }}" class="fauxBlockLink-linkRow u-concealed">
{$user.reaction_score|number}
</a>
</dd>
$xf.visitor is just the account of the user viewing the page, not of the person who made the post etc.HTML:<dd> <a href="{{ link('account/reactions', $xf.visitor) }}" class="fauxBlockLink-linkRow u-concealed"> {$user.reaction_score|number} </a> </dd>
Somehow I feel like that will work. If not then let me know. It's worth a shot. I use that type of link for the member profile page medals.
$xf.visitor is just the account of the user viewing the page, not of the person who made the post etc.
The /account/reactions route will only display your own ratings. You cannot view another's with this. It'd require an add-on or suggestion since there's no action in the members controller to view detailed ratings information for another user.
I mean it doesn't matter what page you put that template code you listed on, it'll always redirect to your own reaction page. You cannot view that page for a different user. You cannot view the breakdown for a user other than yourself.By your own ratings that means on anothers profile you can't view it? And yea wasn't sure if it would work. But it would work on anyones profile right? I'm not sure what you mean by not being able to view others ratings. I suppose you mean on your own profile right. Wheras you could view anyones ratings on their own profile? Or am I wrong
I mean it doesn't matter what page you put that template code you listed on, it'll always redirect to your own reaction page. You cannot view that page for a different user. You cannot view the breakdown for a user other than yourself.
<!--[XF:stat_pairs:above_reactions]-->
<dl class="pairs pairs--rows pairs--rows--centered">
<dt>{{ phrase('reaction_score') }}</dt>
<dd data-xf-init="tooltip" data-original-title="Reaction Score">
<xf:if is ="$xf.visitor.user_id == $user.user_id">
<a href="{{ link('account/reactions') }}">{$user.reaction_score|number}</a>
<xf:else />
{$user.reaction_score|number}
</xf:if>
</dd>
</dl>
<xf:if is="$extras.reaction_score">
<dl class="pairs pairs--justified">
<dt>{{ phrase('reaction_score') }}</dt>
<dd>{$user.reaction_score|number}</dd>
<xf:if is="$extras.reaction_score">
<dl class="pairs pairs--justified">
<dt>{{ phrase('reaction_score') }}</dt>
<dd><a href="{{ link('members', $user) . 'ratings' }}" data-xf-click="overlay">{$user.reaction_score|number}</a></dd>
If your using Xon's content ratings, I also came up with a neat way to do this for other users, not just yourself. Apparently it required the $user variable and not $visitor. It's working on my site right now in posts and pulls up each users reaction list in the post bit. I setup a link for the reactions per user in their post bit to show it. By default the ones on profile already do that with content ratings.
Go to the template message_macros
Find:
PHP:<xf:if is="$extras.reaction_score"> <dl class="pairs pairs--justified"> <dt>{{ phrase('reaction_score') }}</dt> <dd>{$user.reaction_score|number}</dd>
Replace with:
PHP:<xf:if is="$extras.reaction_score"> <dl class="pairs pairs--justified"> <dt>{{ phrase('reaction_score') }}</dt> <dd><a href="{{ link('members', $user) . 'ratings' }}" data-xf-click="overlay">{$user.reaction_score|number}</a></dd>
The requested page could not be found. (Code: invalid_action, controller: XF:Member, action: Ratings)
We use essential cookies to make this site work, and optional cookies to enhance your experience.