Theme editor

Hide Adverts

Hide Adverts

Hide Adverts 1.1.2

💲XF 2.3 Add-ons · by Staraddons · StarAddons Verified Vendor
0 Downloads 24 Views 1 Version
Adds a permission setting "Can hide adverts" to assign user groups permissions to hide adverts.
Price
Free
Available
Download

Overview Version (1) Discussion (1)

  • Hide Adverts
    Hide Adverts
    Adds a permission setting "Can hide adverts" to assign user groups permissions to hide adverts.
    permissions
    adverts
    hide adverts
    About this resource
    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:
    Hide Adverts.webp


    User preference:
    Hide Adverts


    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
    Example:
    PHP:
    Expand Collapse Copy
    <xf:if is="$xf.visitor.show_adverts">
        Advert goes here
    </xf:if>

    Options:
    There are two options allowing you to customise the display of adverts.
    Hide Adverts


    Disabled Nodes is a comma separated list of nodes which should never show adverts. This affects all "forum_view*" and "thread_view*" templates.

    Disabled Usergroups is a comma separated list of usergroups who should never see adverts. This overrides the "Can hide adverts" permissions - so do not use this setting for usergroups where you want a user to retain the ability to show adverts.
  • Version
    1.1.2 Stable Available Dec 17, 2025 · 0
    File size: 20.9 KB
    SHA-256: 6d0c5c51ca995e4b97d0cc658a0786c7416ca5d3cb96c051931d5769caf052b4
    SHA-256 verified Package valid Compatibility checked Last verified:
    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:
    View attachment 2273

    User preference:
    View attachment 2274

    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
    Example:
    PHP:
    Expand Collapse Copy
    <xf:if is="$xf.visitor.show_adverts">
        Advert goes here
    </xf:if>

    Options:
    There are two options allowing you to customise the display of adverts.
    View attachment 2275

    Disabled Nodes is a comma separated list of nodes which should never show adverts. This affects all "forum_view*" and "thread_view*" templates.

    Disabled Usergroups is a comma separated list of usergroups who should never see adverts. This overrides the "Can hide adverts" permissions - so do not use this setting for usergroups where you want a user to retain the ability to show adverts.
  • Discussion

    This resource has a discussion thread on the forum where you can ask questions, report issues, and talk with the author and other users.

    Join the discussion (1)

Resource information
Category 💲XF 2.3 Add-ons
Author Staraddons
Date Dec 17, 2025
Latest version 1.1.2
SHA-256 6d0c5c51ca995e4b97d0cc658a0786c7416ca5d3cb96c051931d5769caf052b4
Security
File integrity SHA-256 verified
SHA-256
6d0c5c51ca995e4b97d0cc658a0786c7416ca5d3cb96c051931d5769caf052b4
How to verify this file
Statistics
Views 24
Downloads 0
Version 1
Developer
Staraddons
Resource author
More resources
Back
Top