Add Social Scheduler — global social media post scheduling

- New /social page with left/right layout (form + post list)
- Social topbar link
- Tables: social_posts, social_targets (project-agnostic posts, per-target project refs)
- CRUD: create, edit, duplicate, delete, retry
- Image upload (JPEG/PNG/GIF/WebP, 10MB max) stored in data/social-uploads/
- Per-platform image toggle (Discord multipart, Mastodon /api/v2/media, LinkedIn Assets API)
- bin/dispatch-social.php cron dispatcher (every minute via /etc/cron.d)
- Settings: eligible projects section to enable bot projects as social account sources
- Platforms: Discord (webhook), Mastodon, LinkedIn personal profile

Cron setup:
  * * * * * www-data /usr/bin/php /opt/hackmancms/bin/dispatch-social.php >> /var/log/hackman_social.log 2>&1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-06-03 17:01:03 +03:00
parent 45b9e15152
commit ac5c262bfb
9 changed files with 1081 additions and 0 deletions

View file

@ -35,6 +35,9 @@ if ($uri === '/' || $uri === '/dashboard') {
} elseif ($uri === '/audit') {
include ROOT . '/views/audit.php';
} elseif ($uri === '/social') {
include ROOT . '/views/social.php';
} elseif (preg_match('#^/project/(\d+)$#', $uri, $m)) {
$project_id = (int)$m[1];
include ROOT . '/views/project/view.php';