Add manual subreddit/YouTube channel configuration (manage.php)

Browser-based feed selection layered on top of config/feeds.php:

- manage.php (password + CSRF gated, session based): add subreddits
  (name / r/name / URL) and YouTube channels (@handle / UC id / URL,
  handle resolved to channel_id once, youtube.com only); enable/disable
  toggles; remove manual feeds; config feeds are hidden, not deleted.
- New feeds are validated with one immediate fetch (bypassing the
  per-refresh host cap): HTTP 404 rejects the entry, 429 keeps it for
  a later refresh. YouTube labels adopt the real channel title.
- feeds table gains origin (config|manual) and enabled columns, with
  a guarded ALTER migration for existing databases.
- Only enabled feeds are refreshed and served: getItems/countItems
  filter by feed_url in enabled feeds, so deselected feeds' cached
  stories are hidden, not deleted; re-adding a URL re-enables it.
- Dashboard header gets a Manage link; manage page styled with the
  existing design tokens; README documents the feature.
This commit is contained in:
Harwinder Sekhon
2026-10-05 18:58:38 -04:00
parent 403fd2c604
commit 41f07b6ad8
14 changed files with 1123 additions and 28 deletions
+8 -5
View File
@@ -59,11 +59,14 @@ $total = (int) $page['total'];
<span class="brand-mark" aria-hidden="true"></span>
<span class="brand-text">RSS <em>Feed</em> Dashboard</span>
</a>
<div class="header-meta d-none d-md-flex align-items-center">
<span class="pulse" aria-hidden="true"></span>
<span class="mono"><?= $total ?> stories</span>
<span class="sep">/</span>
<span class="mono">YouTube · Reddit · RT</span>
<div class="d-flex align-items-center gap-3">
<div class="header-meta d-none d-md-flex align-items-center">
<span class="pulse" aria-hidden="true"></span>
<span class="mono"><?= $total ?> stories</span>
<span class="sep">/</span>
<span class="mono">YouTube · Reddit · RT</span>
</div>
<a class="manage-link" href="manage.php">Manage</a>
</div>
</div>
<div class="spectrum-rail" aria-hidden="true"></div>