Jump to content

Reaction in topicRow - Counting author reactions only


Go to solution Solved by Adriano Faria,

Recommended Posts

I have code in topicRow:

          		{{if \count( $row->reactBlurb() ) and theme.fluent_forums_reaction}}    
					<div class="ipsDataItem_generic ipsReactOverview ipsReactOverview_small ipsType_light">
						<ul>
              				<li class="ipsReactOverview_repCount">
								{expression="\count( $row->reactions() )"}
							</li>
							{{foreach $row->reactBlurb() AS $key => $count}}
							<li>	
                              {$key}
								{{$reaction = \IPS\Content\Reaction::load( $key );}}  
								<a href='{$row->url('showReactions')->setQueryString( 'reaction', $reaction->id )}' data-ipsDialog data-ipsDialog-title='{lang="see_who_reacted"}' data-ipsTooltip title='{lang="see_who_reacted_x" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'reaction_title_' . $reaction->id )"}'>
									<img class='reactionIcon' src='{file="$reaction->_icon" extension="core_Reaction"}' alt='{lang="reaction_title_{$reaction->id}"}'>
								</a>
							</li>
							{{endforeach}}
						</ul>
					</div>
              	{{endif}}

Unfortunately, with this code all reactions in the topic are counted.  I would like to include only the reactions of the author of the topic.
I expect that in the foreach loop I need to add a condition, but I have no idea what it might be.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...