66 Commits

Author SHA1 Message Date
Blake Erickson
b0c95114ea
FIX: Calculate no ads for groups server side (#200)
If the selected group to not display ads to had its visibility set to
not be visible then this setting wouldn't work correctly because that
group wouldn't be available client side. The change moves that group
check to be server side so that we can correctly see all the groups that
should not see ads.
2024-02-15 14:52:15 -07:00
Blake Erickson
9581367239
FIX: Add exclude groups for each ad platforms (#197)
With the new group system for displaying ads we no longer can check if a
user belongs to a trust level group lower than specified. The other
problem is that ALL users including staff and higher trust levels all
belong to trust level 0. So without this fix if we say that an ad should
be visible to trust level 0 users then it will be shown to all users.

This fix adds a new default setting for each ad platform for excluding
trust level 3, 4, and staff users from being shown ads.

- Make display_groups hidden (they will be removed in a later commit)
- Switch to using only exclude_groups instead of display groups and
  exclude groups
- rename showToDisplayGroups to showXAds for each provider
2024-02-08 19:42:40 -07:00
Blake Erickson
6f8ff34ffa
DEV: Convert TL settings to groups (#195)
* DEV: Convert TL settings to groups

This change converts the TL site settings in this plugin to use groups
instead.

See: https://meta.discourse.org/t/283408

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-01-31 11:04:24 -07:00
Arpit Jalan
5901a52dbc
FEATURE: support placing ads between topic list for house ads (#143)
* init

* more

* Pass td and colspan to component

* various fixes for house ads between n topics and add a test

* Make adComponents condition easier to read

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
Co-authored-by: romanrizzi <rizziromanalejandro@gmail.com>
2022-07-07 08:53:29 -03:00
Lawrence Thorpe
50788a876e
Add support for adsense fluid format for in-feed (#89) 2020-08-21 09:53:34 -04:00
jjaffeux
75fb2bf892 FIX: defines an enabled_site_setting
This will amongst other things prevent to load plugin's code if the plugin is disabled.
2020-08-01 17:31:28 +02:00
Bianca Nenciu
3fc872520e
FIX: CodeFund is shutting down (#85) 2020-07-10 18:09:32 +03:00
Neil Lalonde
116f9dd238 FEATURE: add support for fluid ad size in Google Ad Manager
No width or height will be set on containers when ad size is fluid.
2020-01-15 16:52:02 -05:00
discoursehosting
19f0457e8c AdButler support (#80) 2019-09-16 14:26:17 -04:00
Neil Lalonde
2ad24e4a60 FEATURE: add option to disable ads in restricted categories
Use the new setting "no ads for restricted categories".
2019-07-22 11:43:39 -04:00
Neil Lalonde
333f6cef81 FEATURE: support multiple ad sizes in AdSense and Ad Manager
Each ad placement in the AdSense and Ad Manager settings takes a list
of ad sizes instead of only one size. If given multiple sizes, the sizes
will alternate in order for each ad that's rendered.
2019-07-08 15:10:25 -04:00
Neil Lalonde
ad939a851a FEATURE: option to disable ads on personal messages
Use the new setting "no ads for personal messages".
2019-06-27 14:13:51 -04:00
Neil Lalonde
3054f2539a FEATURE: use a different Ad Manager publisher ID for mobile
If you want to use one Ad Manager publisher on desktop and a different
one on mobile, use the new dfp_publisher_id_mobile setting.
By default, dfp_publisher_id will be used for both desktop and mobile.
2019-06-19 11:52:23 -04:00
Neil Lalonde
31efc7025d FEATURE: new setting to disable ads based on tags
Enter a list of tags in the new setting no_ads_for_tags to prevent
ads from being rendered on topics with one or more of those tags,
and on topic list pages for those tags.
2019-06-14 14:44:09 -04:00
Neil Lalonde
7af8f1d46b FEATURE: new setting to disable ads based on category of current page
Use the "no ads for categories" setting to define which category pages
(topic list and topics) should not render any ads.
2019-06-05 16:00:24 -04:00
Penar Musaraj
f745ecfbdc Rename adsense_ads_txt setting to ads_txt 2019-06-03 11:39:28 -04:00
Neil Lalonde
4bd2035866 FEATURE: house ads can be configured to alternate with other ads
Use the new "house ads frequency" site setting to configure how often
house ads should show, as a percentage. This only applies in ad
placements where other ad networks are configured to appear.
2019-05-07 19:52:51 -04:00
Neil Lalonde
1bd80e1afe FEATURE: House Ads
Allows creating ads within Discourse admin at Plugins > House Ads.
Write the ads in html and style them with CSS in themes.
2019-05-03 11:39:34 -04:00
Neil Lalonde
5272995e74 FEATURE: use groups to control who sees ads 2019-05-03 11:39:34 -04:00
Neil Lalonde
369d5dfc9e oops revert again "FEATURE: use groups to control who sees ads" and all later" 2019-04-17 16:02:19 -04:00
Neil Lalonde
e6bcd96d8e FEATURE: use groups to control who sees ads" and all later 2019-04-17 15:40:50 -04:00
Neil Lalonde
50d258dc37 Revert "FEATURE: use groups to control who sees ads" and all later
Revert "Updates to codefund-ad"
Revert "Updates to carbonads-ad"
Revert "Updates to amazon-product-links"
2019-04-17 15:37:09 -04:00
Neil Lalonde
4fd7caffd6 FEATURE: use groups to control who sees ads
A new setting has been added in Admin > Settings > Ad Plugin called
"no ads for groups". Add group names to this list. If a user belongs
to any of the groups, they will not see any ads. This is an alternative
to using trust level settings like "adsense through trust level".
2019-04-17 11:36:50 -04:00
Diego Barreiro
c5272db7f3 UX: Init Carbon Ads 2019-04-15 11:54:18 -04:00
Penar Musaraj
ccad3ca226 FEAT: ads.txt support
Adds a plugin setting that holds text content served on a new /ads.txt route.
2019-02-04 16:14:43 -05:00
Penar Musaraj
9172a8f405 Revert "Add support for ads.txt redirect"
This reverts commit f6c7c2d1af361f04ecaaaf5b8bb1cecdc11e6c7d.

Ads.txt redirection can be done directly in core, in admin/customize/permalinks.
2019-01-29 16:22:00 -05:00
Penar Musaraj
4aa6da8913 Add support for ads.txt redirect 2019-01-28 21:39:49 -05:00
Eric Berry
cb445eaaa7 Remove need to only allow UUID as CodeFund Property ID (#71)
* Remove need to only allow UUID as CodeFund Property ID

* Do not apply format check
2019-01-14 17:08:19 -05:00
Eric Berry
9e84a89f76 Refactors per review 2018-06-20 09:15:15 -06:00
Eric Berry
1cd33da722 Add CodeFund 2018-06-07 17:17:19 -06:00
Neil Lalonde
725ddabf5a add more sizes for DFP ad units 2017-06-05 15:19:59 -04:00
Neil Lalonde
9df93c03a7 AdSense: allow choosing ad size for mobile, including responsive 2017-05-30 18:13:49 -04:00
Neil Lalonde
62377e6111 Support for AdSense responsive ad size 2017-05-30 15:54:59 -04:00
Neil Lalonde
0c50f723ee add more ad sizes for adsense 2016-07-29 12:11:02 -04:00
Neil Lalonde
65a631e885 add regex to adsense settings, and better description for adsense_publisher_code 2016-07-21 11:54:35 -04:00
Neil Lalonde
96307749e7 add 690x250 to dfp 2016-06-30 14:36:44 -04:00
Neil Lalonde
fb68af47d5 add 970x250 billboard 2016-06-24 15:26:13 -04:00
Neil Lalonde
3d85141a42 add more dfp ad sizes 2016-06-23 13:56:59 -04:00
Neil Lalonde
8ce3acfb3b add ad sizes settings for mobile DFP 2016-06-21 13:13:37 -04:00
Neil Lalonde
6dd726e168 Improve descriptions of DFP settings and re-order them a bit for clarity. 2016-04-21 18:53:39 -04:00
Neil Lalonde
240f281dab Improve description of DFP and AdSense settings. People keep putting javascript into those fields. Also add a constraint on the fields so people get an error when they paste javascript. 2016-04-04 13:42:42 -04:00
Sarah Ni
fe9c53ce58 removed all disable boxes and changed trust levels for amazon 2015-09-21 10:44:37 +10:00
vi
0adc5bfca7 Refactored to only have amazon link/banner ads and refactored for check trust levels 2015-09-16 12:11:50 +10:00
vi
cc2572e3f1 Added working product links 2015-09-16 11:44:31 +10:00
Sarah Ni
b4f177d947 Product and Easy Ads work, still building Native Ads 2015-09-11 16:33:55 +10:00
Sarah Ni
2d752d8b2f basic amazon product link inputs added and works 2015-09-10 22:48:14 +10:00
Sarah Ni
082f4e336d amazon settings 2015-09-10 12:23:36 +10:00
Sarah Ni
647eecd95b master - more consistent naming for dfp settings and removed test folder 2015-09-10 12:07:36 +10:00
vi
9e9d056d75 edited sizes for post bottom and fixed dfp googletag reload 2015-09-04 14:52:08 +10:00
Sarah Ni
8fc9f91a53 Value_list instead of user_list 2015-09-03 18:41:06 +10:00