From 6343ebf6541a035fccb91c71f0a35545c55bd149 Mon Sep 17 00:00:00 2001 From: hbrain Date: Mon, 1 Jun 2026 07:59:13 +0200 Subject: [PATCH] Ttitles cleanup and logo positioning --- index.php | 24 +++++++++------- new.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- style.css | 4 +-- 3 files changed, 94 insertions(+), 16 deletions(-) diff --git a/index.php b/index.php index b8f0688..a801c81 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,17 @@ function map_hidden_outputs($config){ return $hidden; } +function video_thumb_public_url($config, $videoName){ + $videoName = basename((string)$videoName); + if ($videoName === '') return ''; + $base = pathinfo($videoName, PATHINFO_FILENAME); + foreach (['jpg','jpeg','png','webp','gif'] as $ext) { + $file = $config['thumbs_dir'] . '/' . $base . '.' . $ext; + if (is_file($file)) return $config['public_thumbs'] . '/' . rawurlencode($base . '.' . $ext) . '?v=' . filemtime($file); + } + return ''; +} + function video_metadata($path){ $base = pathinfo($path, PATHINFO_FILENAME); $meta = [ @@ -246,20 +257,12 @@ $headerTitles = [ 'Many Voices of Life', 'Many Views of Life', 'Modern Vagabond Log', - 'Motorcycle Wanderlust Log', - 'Mapped Wanderings Log', - 'Miles Beyond Reason', - 'Miles Beyond Reality', 'Motion, Velocity & Lunacy', - 'Miles, Wind & Luck', 'Maps, Villages & Legends', - 'Multi-Vision Log', - 'Multi-Vista Log', 'Mutable View Log', 'Mistakes, Victories & Lessons', 'Mostly Verified Legends', 'Mostly Vague Logistics', - 'Marginally Viable Leadership', 'Mileage Versus Luck', 'Mechanical Violence Log', 'Moderately Violent Leisure', @@ -272,7 +275,7 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)]; -<?=h($siteHeaderTitle)?> +MVL @@ -338,6 +341,7 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)]; $name = basename($v); $url = $config['public_videos'].'/'.rawurlencode($name); $m = $videoCache[$name]['metadata'] ?? video_metadata($v); + $posterUrl = video_thumb_public_url($config, $name); $dateFilterUrl = query_url(['q' => 'date=' . (string)($m['date'] ?? '')]); $locFilterUrl = query_url(['q' => 'location=' . (string)($m['location'] ?? '')]); ?> @@ -352,7 +356,7 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];

- + true, + 'message' => $message, + 'dir' => basename($dir), + 'id' => $articleId, + 'written' => $written, + ]); + } + header('Location: new.php?tab=edit&id=' . rawurlencode((string)$articleId) . '&edit=' . rawurlencode(basename($dir)) . '&msg=' . rawurlencode($message)); + exit; } elseif ($action === 'update') { $dir = resolve_input_dir_from_request($config['uploads_dir'], $_POST['id'] ?? '', $_POST['dir'] ?? '', $articleIndex); $articleId = ensure_state_article_id($dir); @@ -984,13 +1040,13 @@ $editDir = null; $editStatus = ''; $editRunning = false; $editData = ['title'=>' if ($editName !== '' || $editId !== '') { try { $editDir = resolve_input_dir_from_request($config['uploads_dir'], $editId, $editName, $articleIndex); $editStatus = input_dir_status($editDir); $editRunning = input_dir_running($editDir); if (!$editRunning) { $editData = read_data($editDir); $editFiles = media_sort_files($editDir, list_files($editDir)); } } catch (Throwable $e) { $err = $e->getMessage(); } } $runningJobs = active_worker_jobs($config); ?> -Admin - <?=h($config['site_name'])?> - +MVL Admin +

Videos without input dir

No orphan videos.


MB
-

No input directories yet.

(string)($data['title'] ?? ''),'teaser'=>(string)($data['teaser'] ?? ''),'date'=>(string)($data['date'] ?? ''),'location'=>(string)($data['place'] ?? ''),'quote_da'=>(string)($data['quote_da'] ?? ''),'description'=>(string)($data['description'] ?? '')]; $currentSignature=$info['signature'] ?? ''; $fullFingerprint=is_array($state)?(string)($state['fingerprint'] ?? ''):''; $previewFingerprint=is_array($state)?(string)($state['preview_fingerprint'] ?? ''):''; $editedSinceRender=$hasFullVideo && $currentSignature !== '' && $fullFingerprint !== '' && $currentSignature !== $fullFingerprint; $editedSincePreview=!$hasFullVideo && $previewVideo && $currentSignature !== '' && $previewFingerprint !== '' && $currentSignature !== $previewFingerprint; $staleLabel=$editedSinceRender ? 'Edited since render' : ($editedSincePreview ? 'Edited since preview' : ''); ?>
Map
No video yet
+

No input directories yet.

(string)($data['title'] ?? ''),'teaser'=>(string)($data['teaser'] ?? ''),'date'=>(string)($data['date'] ?? ''),'location'=>(string)($data['place'] ?? ''),'quote_da'=>(string)($data['quote_da'] ?? ''),'description'=>(string)($data['description'] ?? '')]; $currentSignature=$info['signature'] ?? ''; $fullFingerprint=is_array($state)?(string)($state['fingerprint'] ?? ''):''; $previewFingerprint=is_array($state)?(string)($state['preview_fingerprint'] ?? ''):''; $editedSinceRender=$hasFullVideo && $currentSignature !== '' && $fullFingerprint !== '' && $currentSignature !== $fullFingerprint; $editedSincePreview=!$hasFullVideo && $previewVideo && $currentSignature !== '' && $previewFingerprint !== '' && $currentSignature !== $previewFingerprint; $staleLabel=$editedSinceRender ? 'Edited since render' : ($editedSincePreview ? 'Edited since preview' : ''); ?>
Map
No video yet
@@ -1034,7 +1090,7 @@ $runningJobs = active_worker_jobs($config);
RenderingEdit

No videoPreview video

โ€œโ€

ยท files

Edit input dir

in-dir/

This input directory is . Editing is disabled until the job completes.
-

Edit input dir

in-dir/

Files and captions

No caption for audio files
+

Edit input dir

in-dir/

Files and captions

No caption for audio files

Add new movie input