Hide an ad for a group
senky opened this issue · 1 comments
senky commented
Since this feature is often requested, I am thinking how to implement it with adding as little load as possible. Still, the best solution seems to be an extra table storing relations of ads and groups:
phpbb_ad_group
ad_id
group_id
Query will be extended with a new JOIN
and a new condition:
LEFT JOIN phpbb_ad_group ag ON (a.ad_id = ag.ad_id AND ag.group_id)
...
WHERE ag.group_id NOT IN (<list of user groups>)
Can you think of another, better solution?
iMattPro commented
That seems fine but I'm thinking if we're gonna do this, we may want to get rid of the current global option. So we just have it on a per ad basis instead of gloablly. Could be less confusion and less bloat and spaghetti code that way 🤓