XF 2.2 Get reactions

Robert9

Well-known member
The problem with reactions is that we have not one of them, we have x of them.
So i can select all reactions, then select all reacted ones from me or for me for one reaction.
This means that i have cnt_reactions queries to show them.

Is there a better way?

Count them in a batch and plus or minus reactions to an array_field for every user?
Or a better selection in realtime than

foreach reactions
- select reactions for my content
=> view it

and

foreach reactions
- select reactions from me for other content
=> view it
 
Also i dont know, where we show it.
Only for myself?
For the people on my profile? With or without privacy-setting?
Or just add it to the info pane?
 
Back
Top Bottom