Hide Adverts

Hide Adverts 1.2.1

No permission to download

Sim

Well-known member
Licensed customer
Sim submitted a new resource:

Hi Adverts - Add a permission setting to control who can hide adverts

Adds a permission setting "Can hide adverts" to assign user groups permissions to hide adverts. This is intended to be used with paid upgrades so that users can pay to hide adverts.

Note that the functionality of this addon is largely able to be reproduced using only the advertising management system that is a core part of XenForo 2.x. This addon simply provides an alternative approach to managing these permissions which is more flexible and extensible - especially for more complex advert...

Read more about this resource...
 
@Sim: Wouldn't it makes sense to also automatically hide the Advertisings i've placed under /admin.php?advertising/?
 
@Sim: Wouldn't it makes sense to also automatically hide the Advertisings i've placed under /admin.php?advertising/?

That is what this addon is designed to do. If you wrap your adverts code with the following conditional:

PHP:
<xf:if is="$xf.visitor.show_adverts">
    Advert goes here
</xf:if>

... then it will hide the adverts for users who have the correct permissions.

Unless I've misunderstood your question?
 
Nope, you've got it right. But If i also have to wrap the advertising in the template conditional, where is the benefit of this AddOn?

I could set up a "premium" usergroup (for paid upgrades) and hide the advert for that selected usergroup. Then i don't have to wrap the code with the conditional.
 
I could set up a "premium" usergroup (for paid upgrades) and hide the advert for that selected usergroup. Then i don't have to wrap the code with the conditional.

Absolutely - you don't need this addon if your requirements are simple like that.

My setup is a little more complicated, so I need a bit more control as given by the template conditionals.
 
Latest version of this addon works with both XF2.2 and XF2.3
 
Can you give any details of how the conflict manifests?
Issue: When the other plugin was active, the "Ad settings" option did not appear.

I resolved the issue by making the following change in your plugin's "account_preferences" template:

kkulup_0h29m43s.webp

The other plugin was as follows:
kkulup_0h30m56s.webp
 
That other addon is completely hiding the code that I'm relying on for the template modification - that's a bug in their code, not in mine.

@AndrewSimm can you please check your template modification - from what I can see in the above, you're not outputting the matched helper_account template code using $0 in your template replacement?
 
Sim updated Hide Adverts with a new update entry:

v1.2.1 - bugfixes and resource standards compliance

1.2.1 (2026-10-12)​

  • Answers the hampel_admin_api_redaction code event, declaring that the add-on has no secret settings. Add-ons that report a forum's configuration use this to decide which option values they may show. It has no effect on a forum where no add-on defines that event.

1.2.0 (2026-09-27)​

  • Requires XenForo 2.2.0 or later.
  • The "Hide adverts" preference is now saved only for members with the "Can...

Read the rest of this update entry...
 
Back
Top Bottom