This commit is contained in:
Ty Clifford
2026-05-20 21:08:23 -04:00
commit 6ab3058a92
187 changed files with 18355 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
<?php
/**
* admanager/config.php
* ─────────────────────────────────────────────────────────────────────────────
* Central configuration for the ad management system.
* Both admanager/index.php and live/index.php read from here.
*/
// ── Data store ────────────────────────────────────────────────────────────────
// Absolute path to the ads JSON file.
define('ADS_JSON_PATH', __DIR__ . '/ads.json');
// ── Authentication ────────────────────────────────────────────────────────────
// Plain string key — change this before deploying.
// Used by save.php to gate all write operations.
define('ADS_ADMIN_KEY', 'change-me-before-deploy');
// ── Site identity (used in manager UI) ───────────────────────────────────────
define('ADS_SITE_NAME', 'TyClifford.com');
define('ADS_MANAGER_TITLE', 'Ad Manager');
// ── Placement labels ──────────────────────────────────────────────────────────
// These map to the 'placement' field on each ad.
define('ADS_PLACEMENTS', serialize([
'above' => 'Above stream',
'below' => 'Below stream',
]));
// ── Standard ad sizes ─────────────────────────────────────────────────────────
// Each size has:
// key — internal identifier (used as CSS class suffix)
// label — human-readable name shown in the manager
// width — px width of the creative
// height — px height of the creative
// min_screen — minimum viewport width (px) at which this size is shown
// max_screen — maximum viewport width (px) at which this size is shown
// (null = no upper limit)
//
// An ad can have multiple sizes. The live page renders ALL size variants
// for each ad and uses CSS media queries to show exactly one at a time.
define('ADS_SIZES', serialize([
[
'key' => 'mobile-banner',
'label' => 'Mobile Banner (320×50)',
'width' => 320,
'height' => 50,
'min_screen' => 0,
'max_screen' => 479,
],
[
'key' => 'mobile-rect',
'label' => 'Mobile Rectangle (300×250)',
'width' => 300,
'height' => 250,
'min_screen' => 0,
'max_screen' => 599,
],
[
'key' => 'tablet-banner',
'label' => 'Tablet Banner (468×60)',
'width' => 468,
'height' => 60,
'min_screen' => 480,
'max_screen' => 767,
],
[
'key' => 'leaderboard',
'label' => 'Leaderboard (728×90)',
'width' => 728,
'height' => 90,
'min_screen' => 768,
'max_screen' => 1023,
],
[
'key' => 'billboard',
'label' => 'Billboard (970×90)',
'width' => 970,
'height' => 90,
'min_screen' => 1024,
'max_screen' => null,
],
[
'key' => 'large-rect',
'label' => 'Large Rectangle (336×280)',
'width' => 336,
'height' => 280,
'min_screen' => 600,
'max_screen' => null,
],
[
'key' => 'custom',
'label' => 'Custom size',
'width' => null,
'height' => null,
'min_screen' => 0,
'max_screen' => null,
],
]));