06/16 Phase 6 (continue)
This commit is contained in:
@@ -10,6 +10,7 @@ from app.extensions import db
|
||||
from app.models.ads import Ad
|
||||
from app.services.ads import (get_ad, record_impression, record_click,
|
||||
active_sponsors)
|
||||
from app.services.settings import get_setting
|
||||
|
||||
ads_bp = Blueprint("ads", __name__)
|
||||
|
||||
@@ -43,6 +44,9 @@ def inject_ads():
|
||||
Returns ad slots for use in templates.
|
||||
Ads suppressed for subscribers (ad_free plan limit).
|
||||
"""
|
||||
if not get_setting("ads_enabled", True):
|
||||
return {"ads": {}, "show_ads": False}
|
||||
|
||||
show_ads = True
|
||||
if current_user.is_authenticated:
|
||||
plan = current_user.tier
|
||||
|
||||
Reference in New Issue
Block a user