06/16 Phase 6 (continue)

This commit is contained in:
2026-06-17 17:06:43 -04:00
parent 479afde2fa
commit 68a842d6b6
26 changed files with 1027 additions and 61 deletions
+4
View File
@@ -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