# movmaker-webui (MVL) PHP web UI for publishing and managing MVLog videos on **bubulescu.org**. ## Production location - Web root: `/var/www/html/mvlog` - Public URLs: - `https://bubulescu.org/` - `https://bubulescu.org/new.php` - `https://bubulescu.org/login.php` - `https://bubulescu.org/feed.php` - `https://bubulescu.org/contact.php` ## Main structure - `index.php` — public landing page (rendered videos) - `new.php` — authenticated admin UI - `feed.php` — RSS feed - `contact.php` — contact form - `auth.php` — session auth helpers - `config.php` — app config - `style.css` — shared styles - `_header.php`, `_footer.php`, `_footer_admin.php` — shared layout includes Important dirs: - `in-dir/` — input/article dirs - `out-dir/` — rendered videos - `thumbs/` — custom video poster images - `cache/` — metadata/search/push caches ## Public page (`index.php`) - Randomized header title text (`

`), fixed HTML title `MVL` - Header actions: notifications, RSS, contact - Search supports: - general keyword (title/teaser/quote_da/description) - `date=...` - `location=...` / `place=...` - Case-insensitive + accent-insensitive matching - Shows title/date/location/teaser/description/quote_da - **No generated timestamp is shown on cards** - Optional map image per video (hidden when source article has `.mvlog-hide-map`) - Optional custom video poster from `thumbs/` ## Admin (`new.php`) Requires login via PHP session. Tabs: - **New** — create input dirs + upload media - **Edit** — edit metadata/media/order/toggles - **Videos** — manage orphan output videos Implemented behavior: - Article identity uses `.mvlog-id` (immutable ID), with legacy dir-name fallback - Draft metadata is read/written from `in-dir//data.txt` - Supports metadata fields: `title`, `teaser`, `quote_da`, `date`, `place`, `description` - Manual media reordering via `order.json` (AJAX action `reorder_file`) - Per-article toggles: - Preview (`set_preview`) - Render (`set_enabled`) - Show (`set_visible`) - Hide map (`set_map_hidden` -> `.mvlog-hide-map`) - Custom video poster selection from input images (`set_video_thumb`) - Describe button uses `lib/generate_data_sync.php` - Job status polling via `job_status.php` every 32s ## Ordering rules For visual media ordering in admin/render flow: 1. `order.json` (authoritative when present) 2. embedded metadata datetime 3. filename datetime 4. filesystem datetime `order.json` is web/admin-owned (worker consumes it). ## Contact form (`contact.php`) - Fields: name, email, message + honeypot anti-spam field - Uses PHP `mail()` - On success: redirects to `https://bubulescu.org/` - Recipient is configured in `contact.php` (`$to_email`) ## Push notifications Files: - `push_config.php` — exposes only public VAPID key - `push_subscribe.php` — stores subscriptions in `cache/push_subscriptions.json` - `lib/send_push.php` + `send_push.js` — server-side send logic - `api/enable_show.php` — triggers push on Show enable - `sw.js` — service worker fallback notification text Current text behavior: - payload body: `New aticle @ MVL!` - SW fallback title/body: `MVL` / `New article @ MVL!` Push config is loaded from first available: - `/etc/mvlog/push.php` - `/etc/mvlog/push.json` - `/var/www/html/mvlog/push.json` - `~/.config/mvlog/push.json` ## Auth - Session cookie name: `MVLOGSESSID` - Cookie path: `/` - Auth config: `/etc/mvlog/auth.php` ## Runtime config (`config.php`) ```php return [ "site_name" => "Admin MVLog", "videos_dir" => __DIR__ . "/out-dir", "thumbs_dir" => __DIR__ . "/thumbs", "uploads_dir" => __DIR__ . "/in-dir", "public_videos" => "out-dir", "public_thumbs" => "thumbs", "items_per_page" => 8, ]; ``` ## Notes - `contact.php` is currently in `.gitignore`. - Keep secrets out of git (`push.json`, private keys, auth secrets). - Worker/rendering is handled by separate movmaker worker project.