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 management systems which do not use the core advertising placements.
A specific feature of this addon which is not available in the core, is the ability for users to over-ride the advert hiding mechanism allowing them to show the adverts.
I use this functionality to show adverts to myself so I know what is displaying and what isn't, while other admins automatically have adverts hidden. Similarly, my "business" members who pay to show their own adverts on the site while also getting the ability to hide adverts when browsing - might choose to temporarily show adverts so that they can check how their adverts display.
New permission :
User preference :
How to use :
For use with account upgrades, ensure that the Registered usergroup has the Can hide adverts permission set to "No". Then for any upgrade usergroups, plus moderators and administrators (assuming you want to hide ads for them), set the Can hide adverts permission to "Yes".
Any advertisement placement you want to use with these permissions, should be placed within an "if" statement in the template which checks the $xf.visitor.show_adverts flag.
This can also be used for the display settings on widgets.
show_adverts will be set to true when:
Télécharger 1.0.0b2 :
Version 1.1.0 Two new features :
-1- disable all adverts for specified nodes (forum_view and thread_view templates)
-2- disable all adverts for specified user groups (overrides Can hide adverts permissions)
Télécharger 1.1.0b :
Version 1.1.1 - now works with XF 2.3 :
_ Fixed template modification to work with XF2.3 as well
Télécharger 1.1.1 :
Version 1.1.2 - minor UI update :
- No change in functionality - just a minor UI update to "disable" the option to hide adverts if the user doesn't have permission to do so.
Télécharger V1.1.2 :
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 management systems which do not use the core advertising placements.
A specific feature of this addon which is not available in the core, is the ability for users to over-ride the advert hiding mechanism allowing them to show the adverts.
I use this functionality to show adverts to myself so I know what is displaying and what isn't, while other admins automatically have adverts hidden. Similarly, my "business" members who pay to show their own adverts on the site while also getting the ability to hide adverts when browsing - might choose to temporarily show adverts so that they can check how their adverts display.
New permission :
User preference :
How to use :
For use with account upgrades, ensure that the Registered usergroup has the Can hide adverts permission set to "No". Then for any upgrade usergroups, plus moderators and administrators (assuming you want to hide ads for them), set the Can hide adverts permission to "Yes".
Any advertisement placement you want to use with these permissions, should be placed within an "if" statement in the template which checks the $xf.visitor.show_adverts flag.
This can also be used for the display settings on widgets.
show_adverts will be set to true when:
- the user does not have permission to hide adverts
- the user does have permission to hide adverts, but has deselected the "Hide adverts" checkbox in their preferences
HTML:
<xf:if is="$xf.visitor.show_adverts">
Advert goes here
</xf:if>
Télécharger 1.0.0b2 :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
Version 1.1.0 Two new features :
-1- disable all adverts for specified nodes (forum_view and thread_view templates)
-2- disable all adverts for specified user groups (overrides Can hide adverts permissions)
Télécharger 1.1.0b :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
Version 1.1.1 - now works with XF 2.3 :
_ Fixed template modification to work with XF2.3 as well
Télécharger 1.1.1 :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
Version 1.1.2 - minor UI update :
- No change in functionality - just a minor UI update to "disable" the option to hide adverts if the user doesn't have permission to do so.
Télécharger V1.1.2 :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
1.1.3 (2025-12-11)
- RunenqueuePostUpgradeCleanUp() during upgrades on XenForo 2.3 and later.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 hide adverts" permission. Saving account preferences without the permission used to switch the preference off, so a member granted the permission later — by an account upgrade, say — kept seeing adverts until they ticked the box. Members affected before this release may need to tick it again.
show_advertsandcanHideAdverts()answer for the user they are called on, rather than always for the current visitor.- Advert positions no longer fail when a template is rendered without a controller reply.
- The preference's hint text no longer refers to account upgrades.
- Renamed the
xf_user_optioncolumnhide_advertstohampel_hideadverts_hide_adverts, as XenForo's resource standards require for columns on core tables. The upgrade keeps every member's setting, and$xf.visitor.show_advertsis unchanged — but a template reading$xf.visitor.Option.hide_advertsdirectly must be updated. On older MySQL and MariaDB versions the rename rebuildsxf_user_option, which can take some time on a large forum.
Version 1.2.1 (2026-10-12)
- Answers the
hampel_admin_api_redactioncode 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.
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.

