Advertisement Management

How to choose which forum to serve ads - Advertisement Management

How to choose which forum to serve ads

by umarizal » Thu Jan 04, 2018 9:23 pm

Friends, how to choose which forums an ad will appear on?

Thank you ;-)
EN: Do to others what you would want them to do to you.
ES: Haz a los demás todo lo que quieras que te hagan a ti.
PT: Faça aos outros o que você gostaria que fizessem a você.
User avatar
umarizal
Registered User
Posts: 176
Joined: Mon Mar 17, 2008 2:03 am
Location: São Paulo - SP - Brasil
Name: Leandro dos Santos
Contact:

Re: How to choose which forum to serve ads

by Senky » Thu Jan 11, 2018 6:17 pm

Hi umarizal,
currently, this is not possible.
Senky
Extension Customisations
Extension Customisations
Posts: 2227
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: How to choose which forum to serve ads

by umarizal » Thu Jan 11, 2018 6:26 pm

Senky wrote:Hi umarizal,
currently, this is not possible.
It would be interesting to include this functionality in the future, do not you think?
EN: Do to others what you would want them to do to you.
ES: Haz a los demás todo lo que quieras que te hagan a ti.
PT: Faça aos outros o que você gostaria que fizessem a você.
User avatar
umarizal
Registered User
Posts: 176
Joined: Mon Mar 17, 2008 2:03 am
Location: São Paulo - SP - Brasil
Name: Leandro dos Santos
Contact:

Re: How to choose which forum to serve ads

by Senky » Sun Jan 14, 2018 3:43 pm

Yes,
and if time allows, we will test it along with ability to display ad only on specific page type. But it might be rejected because of too much additional load to the SQL query.
Senky
Extension Customisations
Extension Customisations
Posts: 2227
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: How to choose which forum to serve ads

by umarizal » Wed Jan 17, 2018 12:09 am

Some forums have material that is not allowed by systems like Adsense, because they have nudity or little content (text).

It would be very nice to be able to choose which forums to display or not ads ... as well as display or not on pages like login / registration.
EN: Do to others what you would want them to do to you.
ES: Haz a los demás todo lo que quieras que te hagan a ti.
PT: Faça aos outros o que você gostaria que fizessem a você.
User avatar
umarizal
Registered User
Posts: 176
Joined: Mon Mar 17, 2008 2:03 am
Location: São Paulo - SP - Brasil
Name: Leandro dos Santos
Contact:

Re: How to choose which forum to serve ads

by MrMoney1 » Tue May 15, 2018 8:18 pm

Also looking forward to seeing the features mentioned soon 😎
MrMoney1
Registered User
Posts: 4
Joined: Tue Dec 12, 2017 2:26 pm
Contact:

Re: How to choose which forum to serve ads

by spacebiscuit » Thu Jun 14, 2018 7:43 pm

If you want to hide ads from some forums you can do the following:

Open: ext\phpbb\ads\styles\all\template\phpbb_ads_default.html

Code: Select all

{% if PHPBB_ADS_CODE %}
    [b]<!-- IF FORUM_ID neq '5' -->[/b]
        <div class="phpbb-ads-center" style="{{ PHPBB_ADS_STYLE }}" data-ad-id="{{ PHPBB_ADS_ID|e('html_attr') }}">
            {{ PHPBB_ADS_CODE }}
        </div>
    [b]<!-- ENDIF -->[/b]
{% endif %}
The lines to add are in bold, in this case the ads will show on all forums except for id = 5. You can adjust the logic as desired for your use case. Of course even updates to the extension will lose this feature.
spacebiscuit
Registered User
Posts: 35
Joined: Thu Nov 17, 2011 10:36 am
Contact:

Re: How to choose which forum to serve ads

by umarizal » Sat Sep 07, 2019 2:52 am

Senky wrote:Hi umarizal,
currently, this is not possible.
Is there any plan for this to be implemented soon? Thank you ;-)
EN: Do to others what you would want them to do to you.
ES: Haz a los demás todo lo que quieras que te hagan a ti.
PT: Faça aos outros o que você gostaria que fizessem a você.
User avatar
umarizal
Registered User
Posts: 176
Joined: Mon Mar 17, 2008 2:03 am
Location: São Paulo - SP - Brasil
Name: Leandro dos Santos
Contact:

Re: How to choose which forum to serve ads

by whitewaterjet » Fri Jan 10, 2020 5:44 pm

spacebiscuit wrote:If you want to hide ads from some forums you can do the following:

Open: ext\phpbb\ads\styles\all\template\phpbb_ads_default.html

Code: Select all

{% if PHPBB_ADS_CODE %}
    [b]<!-- IF FORUM_ID neq '5' -->[/b]
        <div class="phpbb-ads-center" style="{{ PHPBB_ADS_STYLE }}" data-ad-id="{{ PHPBB_ADS_ID|e('html_attr') }}">
            {{ PHPBB_ADS_CODE }}
        </div>
    [b]<!-- ENDIF -->[/b]
{% endif %}
The lines to add are in bold, in this case the ads will show on all forums except for id = 5. You can adjust the logic as desired for your use case. Of course even updates to the extension will lose this feature.
Could we create a code that shows IF the forum is a certain ID, we can tell it to display a specific ad only?
whitewaterjet
Registered User
Posts: 9
Joined: Fri Nov 15, 2019 1:20 am
Contact:


cron