From eb6855ca8bfefe3a4188646f3d96417177f91ded Mon Sep 17 00:00:00 2001 From: 8chan Date: Mon, 16 Feb 2015 16:33:13 -0800 Subject: [PATCH] New templates: ad_top and ad_bottom. Make blank pages if you're not using them --- 404.php | 3 +++ templates/index.html | 8 ++++++-- templates/themes/catalog/catalog.html | 4 +++- templates/thread.html | 8 ++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/404.php b/404.php index b660857f..e74eb65b 100644 --- a/404.php +++ b/404.php @@ -32,7 +32,10 @@ if (preg_match('!'.$config['board_regex'].'/'.$config['dir']['res'].'\d+\.html!u $return_link = ''; } +$ad = Element("ad_top.html", array()); + $page = <<$ad

[ Home ]{$return_link}

diff --git a/templates/index.html b/templates/index.html index e422b8bc..2af65bf8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -37,7 +37,9 @@ {% include 'attention_bar.html' %} - {{ config.ad.top }} + {% if board.uri not in config.banned_ad_boards %} + {% include 'ad_top.html' %} + {% endif %} {% if not no_post_form %} {% include 'post_form.html' %} @@ -74,7 +76,9 @@ {{ boardlist.bottom }} - {{ config.ad.bottom }} + {% if board.uri not in config.banned_ad_boards %} + {% include 'ad_bottom.html' %} + {% endif %}