(October 19, 2017 at 9:38 am)Aoi Magi Wrote:(October 18, 2017 at 9:27 pm)Tiberius Wrote: The problem is getting the data. The reputations are stored in a separate table in the database. It might be possible to have a single query that gets the info I need but if not, I would have to do a single query for each post which is too much overhead.
I don't know what rep plugin you are using, but fetching them with a single query should be quite possible. Also depending on how many reps someone has given, stashing those unique user ids in their session beforehand might also be an option,and you can then just cross reference and control the button display during render.
It's not a plugin, this is a default feature. The issue is whether I can extract all the user IDs for posts on the page in advance, I believe MyBB fetches that data but then iterates over it to get each individual post.
The problem is that if that happens, I'd be looking at 10 extra queries per page. If someone has the forum set to 50 posts per page, that's potentially 50 extra queries.