feat: remplace kaubuntu by OKI

This commit is contained in:
2025-10-17 12:24:02 +04:00
parent a5fc9843e3
commit 2602d4099d
11 changed files with 71 additions and 67 deletions
+10 -8
View File
@@ -42,7 +42,7 @@ if ($categoryId && isset($allCategories[$categoryId])) {
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>"> <meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>">
<title><?php echo htmlspecialchars($categoryName); ?> - kaubuntu.re</title> <title><?php echo htmlspecialchars($categoryName); ?> - <?php echo SITE_NAME; ?></title>
<link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>"> <link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
@@ -55,24 +55,24 @@ if ($categoryId && isset($allCategories[$categoryId])) {
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Open Graph Meta Tags --> <!-- Open Graph Meta Tags -->
<meta property="og:title" content="Catégorie : <?php echo htmlspecialchars($categoryName); ?> - kaubuntu.re"> <meta property="og:title" content="Catégorie : <?php echo htmlspecialchars($categoryName); ?> - <?php echo SITE_NAME; ?>">
<meta property="og:description" content="Découvrez toutes les vidéos de la catégorie <?php echo htmlspecialchars($categoryName); ?> sur kaubuntu.re. Contenu multimédia de qualité et exclusif."> <meta property="og:description" content="Découvrez toutes les vidéos de la catégorie <?php echo htmlspecialchars($categoryName); ?> sur <?php echo SITE_NAME; ?>. Contenu multimédia de qualité et exclusif.">
<meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>"> <meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"> <meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:site_name" content="kaubuntu.re"> <meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
<meta property="og:locale" content="fr_FR"> <meta property="og:locale" content="fr_FR">
<!-- Twitter Card Meta Tags --> <!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Catégorie : <?php echo htmlspecialchars($categoryName); ?> - kaubuntu.re"> <meta name="twitter:title" content="Catégorie : <?php echo htmlspecialchars($categoryName); ?> - <?php echo SITE_NAME; ?>">
<meta name="twitter:description" content="Découvrez toutes les vidéos de la catégorie <?php echo htmlspecialchars($categoryName); ?> sur kaubuntu.re. Contenu multimédia de qualité et exclusif."> <meta name="twitter:description" content="Découvrez toutes les vidéos de la catégorie <?php echo htmlspecialchars($categoryName); ?> sur <?php echo SITE_NAME; ?>. Contenu multimédia de qualité et exclusif.">
<meta name="twitter:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>"> <meta name="twitter:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
<!-- Données structurées JSON-LD pour la page de catégorie --> <!-- Données structurées JSON-LD pour la page de catégorie -->
<?php <?php
$categoryUrl = getBaseUrl() . '/categories.php?id=' . $categoryId; $categoryUrl = getBaseUrl() . '/categories.php?id=' . $categoryId;
$categoryDescription = 'Découvrez toutes les vidéos de la catégorie ' . $categoryName . ' sur kaubuntu.re'; $categoryDescription = 'Découvrez toutes les vidéos de la catégorie ' . $categoryName . ' sur ' . SITE_NAME;
$collectionJsonLd = generateVideoCollectionJsonLd($categoryName, $categoryDescription, $videos, $categoryUrl); $collectionJsonLd = generateVideoCollectionJsonLd($categoryName, $categoryDescription, $videos, $categoryUrl);
outputJsonLd($collectionJsonLd); outputJsonLd($collectionJsonLd);
@@ -110,7 +110,7 @@ if ($categoryId && isset($allCategories[$categoryId])) {
<div class="video-section category-page" data-category-id="<?php echo $categoryId; ?>"> <div class="video-section category-page" data-category-id="<?php echo $categoryId; ?>">
<div class="section-header"> <div class="section-header">
<div class="section-logo"> <div class="section-logo">
<img src="img/logo.png" alt="kaubuntu.re"> <img src="img/logo.png" alt="<?php echo SITE_NAME; ?>">
</div> </div>
<h2 class="section-title">Catégorie : <?php echo htmlspecialchars($categoryName); ?></h2> <h2 class="section-title">Catégorie : <?php echo htmlspecialchars($categoryName); ?></h2>
</div> </div>
@@ -146,7 +146,9 @@ if ($categoryId && isset($allCategories[$categoryId])) {
<span class="channel-name"><?php echo htmlspecialchars($video['channel']); ?></span> <span class="channel-name"><?php echo htmlspecialchars($video['channel']); ?></span>
</div> </div>
<div class="video-metadata"> <div class="video-metadata">
<?php if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS): ?>
<span class="video-views"><i class="fas fa-eye"></i> <?php echo formatViewCount($video['views']); ?> vues</span> <span class="video-views"><i class="fas fa-eye"></i> <?php echo formatViewCount($video['views']); ?> vues</span>
<?php endif; ?>
<span class="video-date"><i class="far fa-calendar-alt"></i> <?php echo formatDate($video['date']); ?></span> <span class="video-date"><i class="far fa-calendar-alt"></i> <?php echo formatDate($video['date']); ?></span>
</div> </div>
</div> </div>
+10 -10
View File
@@ -12,7 +12,7 @@ setSecurityHeaders();
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>"> <meta name="csrf-token" content="<?php echo generateCSRFToken(); ?>">
<title>kaubuntu.re - Ouverture prochaine</title> <title><?php echo SITE_NAME; ?> - Ouverture prochaine</title>
<!-- Styles --> <!-- Styles -->
<link rel="stylesheet" href="css/countdown.css?v=<?php echo filemtime('css/countdown.css'); ?>"> <link rel="stylesheet" href="css/countdown.css?v=<?php echo filemtime('css/countdown.css'); ?>">
@@ -30,12 +30,12 @@ setSecurityHeaders();
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="kaubuntu.re"> <meta name="apple-mobile-web-app-title" content="<?php echo SITE_NAME; ?>">
<meta name="application-name" content="kaubuntu.re"> <meta name="application-name" content="<?php echo SITE_NAME; ?>">
<!-- Open Graph Meta Tags --> <!-- Open Graph Meta Tags -->
<meta property="og:title" content="kaubuntu.re - Ouverture prochaine"> <meta property="og:title" content="<?php echo SITE_NAME; ?> - Ouverture prochaine">
<meta property="og:description" content="La plateforme multimédia kaubuntu.re ouvrira ses portes le <?php <meta property="og:description" content="La plateforme multimédia <?php echo SITE_NAME; ?> ouvrira ses portes le <?php
$targetDate = new DateTime(COUNTDOWN_TARGET_DATE); $targetDate = new DateTime(COUNTDOWN_TARGET_DATE);
setlocale(LC_TIME, 'fr_FR.UTF-8'); setlocale(LC_TIME, 'fr_FR.UTF-8');
echo strftime('%e %B %Y', $targetDate->getTimestamp()); echo strftime('%e %B %Y', $targetDate->getTimestamp());
@@ -43,13 +43,13 @@ setSecurityHeaders();
<meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>"> <meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"> <meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:site_name" content="kaubuntu.re"> <meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
<meta property="og:locale" content="fr_FR"> <meta property="og:locale" content="fr_FR">
<!-- Twitter Card Meta Tags --> <!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="kaubuntu.re - Ouverture prochaine"> <meta name="twitter:title" content="<?php echo SITE_NAME; ?> - Ouverture prochaine">
<meta name="twitter:description" content="La plateforme multimédia kaubuntu.re ouvrira ses portes le <?php <meta name="twitter:description" content="La plateforme multimédia <?php echo SITE_NAME; ?> ouvrira ses portes le <?php
$targetDate = new DateTime(COUNTDOWN_TARGET_DATE); $targetDate = new DateTime(COUNTDOWN_TARGET_DATE);
setlocale(LC_TIME, 'fr_FR.UTF-8'); setlocale(LC_TIME, 'fr_FR.UTF-8');
echo strftime('%e %B %Y', $targetDate->getTimestamp()); echo strftime('%e %B %Y', $targetDate->getTimestamp());
@@ -65,10 +65,10 @@ setSecurityHeaders();
<div class="countdown-overlay"> <div class="countdown-overlay">
<div class="countdown-container"> <div class="countdown-container">
<!-- Logo --> <!-- Logo -->
<img src="img/logo.png" alt="Logo kaubuntu.re" class="countdown-logo"> <img src="img/logo.png" alt="Logo <?php echo SITE_NAME; ?>" class="countdown-logo">
<!-- Titre principal --> <!-- Titre principal -->
<h1 class="countdown-title">kaubuntu.re</h1> <h1 class="countdown-title"><?php echo SITE_NAME; ?></h1>
<!-- Sous-titre --> <!-- Sous-titre -->
<p class="countdown-subtitle">Plateforme Multimédia - Ouverture prochaine</p> <p class="countdown-subtitle">Plateforme Multimédia - Ouverture prochaine</p>
+11 -11
View File
@@ -22,7 +22,7 @@ $liveStream = getLiveStream();
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Direct - kaubuntu.re</title> <title>Direct - <?php echo SITE_NAME; ?></title>
<link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>"> <link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
@@ -35,18 +35,18 @@ $liveStream = getLiveStream();
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Open Graph Meta Tags --> <!-- Open Graph Meta Tags -->
<meta property="og:title" content="Direct - kaubuntu.re"> <meta property="og:title" content="Direct - <?php echo SITE_NAME; ?>">
<meta property="og:description" content="Suivez nos diffusions en direct sur kaubuntu.re. Contenu en temps réel, discussions et événements exclusifs."> <meta property="og:description" content="Suivez nos diffusions en direct sur <?php echo SITE_NAME; ?>. Contenu en temps réel, discussions et événements exclusifs.">
<meta property="og:image" content="<?php echo getBaseUrl(); ?>/img/logo.png"> <meta property="og:image" content="<?php echo getBaseUrl(); ?>/img/logo.png">
<meta property="og:url" content="<?php echo getBaseUrl(); ?>/direct.php"> <meta property="og:url" content="<?php echo getBaseUrl(); ?>/direct.php">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:site_name" content="kaubuntu.re"> <meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
<meta property="og:locale" content="fr_FR"> <meta property="og:locale" content="fr_FR">
<!-- Twitter Card Meta Tags --> <!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Direct - kaubuntu.re"> <meta name="twitter:title" content="Direct - <?php echo SITE_NAME; ?>">
<meta name="twitter:description" content="Suivez nos diffusions en direct sur kaubuntu.re. Contenu en temps réel, discussions et événements exclusifs."> <meta name="twitter:description" content="Suivez nos diffusions en direct sur <?php echo SITE_NAME; ?>. Contenu en temps réel, discussions et événements exclusifs.">
<meta name="twitter:image" content="<?php echo getBaseUrl(); ?>/img/logo.png"> <meta name="twitter:image" content="<?php echo getBaseUrl(); ?>/img/logo.png">
<!-- Données structurées JSON-LD pour la page direct --> <!-- Données structurées JSON-LD pour la page direct -->
@@ -54,17 +54,17 @@ $liveStream = getLiveStream();
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebPage", "@type": "WebPage",
"name": "Direct - kaubuntu.re", "name": "Direct - <?php echo SITE_NAME; ?>",
"description": "Suivez nos diffusions en direct sur kaubuntu.re. Contenu en temps réel du mouvement Ka-Ubuntu.", "description": "Suivez nos diffusions en direct sur <?php echo SITE_NAME; ?>. Contenu en temps réel.",
"url": "<?php echo getBaseUrl(); ?>/direct.php", "url": "<?php echo getBaseUrl(); ?>/direct.php",
"isPartOf": { "isPartOf": {
"@type": "WebSite", "@type": "WebSite",
"name": "kaubuntu.re", "name": "<?php echo SITE_NAME; ?>",
"url": "<?php echo getBaseUrl(); ?>" "url": "<?php echo getBaseUrl(); ?>"
}, },
"publisher": { "publisher": {
"@type": "Organization", "@type": "Organization",
"name": "Ka-Ubuntu", "name": "<?php echo ORGANIZATION_NAME; ?>",
"url": "<?php echo getBaseUrl(); ?>", "url": "<?php echo getBaseUrl(); ?>",
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
@@ -107,7 +107,7 @@ $liveStream = getLiveStream();
<div class="live-page"> <div class="live-page">
<div class="section-header"> <div class="section-header">
<div class="section-logo"> <div class="section-logo">
<img src="img/logo.png" alt="kaubuntu.re"> <img src="img/logo.png" alt="<?php echo SITE_NAME; ?>">
</div> </div>
<h2 class="section-title">Diffusion en direct</h2> <h2 class="section-title">Diffusion en direct</h2>
</div> </div>
+1 -1
View File
@@ -121,7 +121,7 @@ function callPeerTubeApiOriginal($endpoint, $params = []) {
curl_setopt($ch, CURLOPT_MAXREDIRS, 0); curl_setopt($ch, CURLOPT_MAXREDIRS, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, 'KaubuntuRe/1.0'); curl_setopt($ch, CURLOPT_USERAGENT, 'fediverse-oki/1.0');
// Ajouter la clé API si définie // Ajouter la clé API si définie
if (defined('API_KEY') && !empty(API_KEY)) { if (defined('API_KEY') && !empty(API_KEY)) {
+2 -2
View File
@@ -5,8 +5,8 @@ function addPWAHeaders() {
echo '<meta name="mobile-web-app-capable" content="yes">' . "\n"; echo '<meta name="mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-capable" content="yes">' . "\n"; echo '<meta name="apple-mobile-web-app-capable" content="yes">' . "\n";
echo '<meta name="apple-mobile-web-app-status-bar-style" content="default">' . "\n"; echo '<meta name="apple-mobile-web-app-status-bar-style" content="default">' . "\n";
echo '<meta name="apple-mobile-web-app-title" content="kaubuntu.re">' . "\n"; echo '<meta name="apple-mobile-web-app-title" content="' . SITE_NAME . '">' . "\n";
echo '<meta name="application-name" content="kaubuntu.re">' . "\n"; echo '<meta name="application-name" content="' . SITE_NAME . '">' . "\n";
echo '<meta name="msapplication-TileColor" content="#FF0000">' . "\n"; echo '<meta name="msapplication-TileColor" content="#FF0000">' . "\n";
echo '<meta name="msapplication-config" content="browserconfig.xml">' . "\n"; echo '<meta name="msapplication-config" content="browserconfig.xml">' . "\n";
echo '<meta name="theme-color" content="#FF0000">' . "\n"; echo '<meta name="theme-color" content="#FF0000">' . "\n";
+1 -1
View File
@@ -1,7 +1,7 @@
<!-- Sidebar de navigation --> <!-- Sidebar de navigation -->
<nav class="sidebar" role="navigation" aria-label="Navigation principale"> <nav class="sidebar" role="navigation" aria-label="Navigation principale">
<a href="/" class="logo" aria-label="Retour à l'accueil"> <a href="/" class="logo" aria-label="Retour à l'accueil">
<img src="img/logo.png" alt="Logo kaubuntu.re"> <img src="img/logo.png" alt="Logo <?php echo SITE_NAME; ?>">
</a> </a>
<?php <?php
+6 -6
View File
@@ -16,8 +16,8 @@ function generateWebSiteJsonLd() {
$data = [ $data = [
"@context" => "https://schema.org", "@context" => "https://schema.org",
"@type" => "WebSite", "@type" => "WebSite",
"name" => "kaubuntu.re", "name" => SITE_NAME,
"description" => "Plateforme multimédia indépendante du parti panifricaniste et indépendantiste réunionnais Ka-Ubuntu", "description" => SITE_DESCRIPTION,
"url" => $baseUrl, "url" => $baseUrl,
"potentialAction" => [ "potentialAction" => [
"@type" => "SearchAction", "@type" => "SearchAction",
@@ -29,7 +29,7 @@ function generateWebSiteJsonLd() {
], ],
"publisher" => [ "publisher" => [
"@type" => "Organization", "@type" => "Organization",
"name" => "Ka-Ubuntu", "name" => "OKI",
"url" => $baseUrl, "url" => $baseUrl,
"logo" => [ "logo" => [
"@type" => "ImageObject", "@type" => "ImageObject",
@@ -67,14 +67,14 @@ function generateVideoObjectJsonLd($videoData, $video) {
"name" => $video['title'], "name" => $video['title'],
"description" => !empty($video['description']) "description" => !empty($video['description'])
? truncateText(strip_tags($video['description']), 300) ? truncateText(strip_tags($video['description']), 300)
: "Regardez cette vidéo sur kaubuntu.re", : "Regardez cette vidéo sur " . SITE_NAME,
"url" => $videoUrl, "url" => $videoUrl,
"thumbnailUrl" => $thumbnailUrl, "thumbnailUrl" => $thumbnailUrl,
"uploadDate" => formatDateISO8601($video['date']), "uploadDate" => formatDateISO8601($video['date']),
"duration" => $duration, "duration" => $duration,
"publisher" => [ "publisher" => [
"@type" => "Organization", "@type" => "Organization",
"name" => "kaubuntu.re", "name" => SITE_NAME,
"url" => $baseUrl, "url" => $baseUrl,
"logo" => [ "logo" => [
"@type" => "ImageObject", "@type" => "ImageObject",
@@ -224,7 +224,7 @@ function generateVideoCollectionJsonLd($name, $description, $videos, $url) {
], ],
"publisher" => [ "publisher" => [
"@type" => "Organization", "@type" => "Organization",
"name" => "kaubuntu.re", "name" => SITE_NAME,
"url" => $baseUrl "url" => $baseUrl
] ]
]; ];
+1 -1
View File
@@ -40,7 +40,7 @@ function callWordPressApi($endpoint, $params = []) {
curl_setopt($ch, CURLOPT_MAXREDIRS, 0); curl_setopt($ch, CURLOPT_MAXREDIRS, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, 'KaubuntuRe-WordPress-Integration/1.0'); curl_setopt($ch, CURLOPT_USERAGENT, 'fediverse-oki-WordPress-Integration/1.0');
// Exécuter la requête // Exécuter la requête
$response = curl_exec($ch); $response = curl_exec($ch);
+11 -9
View File
@@ -52,7 +52,7 @@ if ($resultsCount > 0) {
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?>kaubuntu.re</title> <title><?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?><?php echo SITE_NAME; ?></title>
<link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>"> <link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
@@ -65,18 +65,18 @@ if ($resultsCount > 0) {
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Open Graph Meta Tags --> <!-- Open Graph Meta Tags -->
<meta property="og:title" content="<?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?>kaubuntu.re"> <meta property="og:title" content="<?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?><?php echo SITE_NAME; ?>">
<meta property="og:description" content="<?php echo !empty($query) ? 'Résultats de recherche pour \"' . htmlspecialchars($query) . '\" sur kaubuntu.re. Découvrez des vidéos correspondantes à votre recherche.' : 'Recherchez des vidéos sur kaubuntu.re. Plateforme multimédia avec un contenu de qualité et exclusif.'; ?>"> <meta property="og:description" content="<?php echo !empty($query) ? 'Résultats de recherche pour \"' . htmlspecialchars($query) . '\" sur ' . SITE_NAME . '. Découvrez des vidéos correspondantes à votre recherche.' : 'Recherchez des vidéos sur ' . SITE_NAME . '. Plateforme multimédia avec un contenu de qualité et exclusif.'; ?>">
<meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>"> <meta property="og:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"> <meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:site_name" content="kaubuntu.re"> <meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
<meta property="og:locale" content="fr_FR"> <meta property="og:locale" content="fr_FR">
<!-- Twitter Card Meta Tags --> <!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="<?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?>kaubuntu.re"> <meta name="twitter:title" content="<?php echo !empty($query) ? 'Recherche: ' . htmlspecialchars($query) . ' - ' : 'Recherche - '; ?><?php echo SITE_NAME; ?>">
<meta name="twitter:description" content="<?php echo !empty($query) ? 'Résultats de recherche pour \"' . htmlspecialchars($query) . '\" sur kaubuntu.re. Découvrez des vidéos correspondantes à votre recherche.' : 'Recherchez des vidéos sur kaubuntu.re. Plateforme multimédia avec un contenu de qualité et exclusif.'; ?>"> <meta name="twitter:description" content="<?php echo !empty($query) ? 'Résultats de recherche pour \"' . htmlspecialchars($query) . '\" sur ' . SITE_NAME . '. Découvrez des vidéos correspondantes à votre recherche.' : 'Recherchez des vidéos sur ' . SITE_NAME . '. Plateforme multimédia avec un contenu de qualité et exclusif.'; ?>">
<meta name="twitter:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>"> <meta name="twitter:image" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/img/logo.png'; ?>">
<?php if (!empty($query) && !empty($currentPageVideos)): ?> <?php if (!empty($query) && !empty($currentPageVideos)): ?>
@@ -84,8 +84,8 @@ if ($resultsCount > 0) {
<?php <?php
$searchUrl = getBaseUrl() . '/recherche.php?q=' . urlencode($query); $searchUrl = getBaseUrl() . '/recherche.php?q=' . urlencode($query);
$searchDescription = $isTagSearch $searchDescription = $isTagSearch
? 'Vidéos avec le tag ' . htmlspecialchars($searchTag) . ' sur kaubuntu.re' ? 'Vidéos avec le tag ' . htmlspecialchars($searchTag) . ' sur ' . SITE_NAME
: 'Résultats de recherche pour "' . htmlspecialchars($query) . '" sur kaubuntu.re'; : 'Résultats de recherche pour "' . htmlspecialchars($query) . '" sur ' . SITE_NAME;
$searchTitle = $isTagSearch $searchTitle = $isTagSearch
? 'Tag: ' . htmlspecialchars($searchTag) ? 'Tag: ' . htmlspecialchars($searchTag)
: 'Recherche: ' . htmlspecialchars($query); : 'Recherche: ' . htmlspecialchars($query);
@@ -128,7 +128,7 @@ if ($resultsCount > 0) {
<div class="video-section search-page" data-search-query="<?php echo htmlspecialchars($query); ?>"> <div class="video-section search-page" data-search-query="<?php echo htmlspecialchars($query); ?>">
<div class="section-header"> <div class="section-header">
<div class="section-logo"> <div class="section-logo">
<img src="img/logo.png" alt="kaubuntu.re"> <img src="img/logo.png" alt="<?php echo SITE_NAME; ?>">
</div> </div>
<?php if (!empty($query)): ?> <?php if (!empty($query)): ?>
<?php if ($isTagSearch): ?> <?php if ($isTagSearch): ?>
@@ -174,7 +174,9 @@ if ($resultsCount > 0) {
<span class="channel-name"><?php echo htmlspecialchars($video['channel']); ?></span> <span class="channel-name"><?php echo htmlspecialchars($video['channel']); ?></span>
</div> </div>
<div class="video-metadata"> <div class="video-metadata">
<?php if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS): ?>
<span class="video-views"><i class="fas fa-eye"></i> <?php echo formatViewCount($video['views']); ?> vues</span> <span class="video-views"><i class="fas fa-eye"></i> <?php echo formatViewCount($video['views']); ?> vues</span>
<?php endif; ?>
<span class="video-date"><i class="far fa-calendar-alt"></i> <?php echo formatDate($video['date']); ?></span> <span class="video-date"><i class="far fa-calendar-alt"></i> <?php echo formatDate($video['date']); ?></span>
</div> </div>
</div> </div>
+3 -3
View File
@@ -1,6 +1,6 @@
const CACHE_NAME = 'kaubuntu-14092025-1128'; const CACHE_NAME = 'fediverse-oki-16102025-1128';
const STATIC_CACHE_NAME = 'kaubuntu-static-14092025-1128'; const STATIC_CACHE_NAME = 'fediverse-oki-static-16102025-1128';
const DYNAMIC_CACHE_NAME = 'kaubuntu-dynamic-14092025-1128'; const DYNAMIC_CACHE_NAME = 'fediverse-oki-dynamic-16102025-1128';
// Ressources à mettre en cache immédiatement // Ressources à mettre en cache immédiatement
const STATIC_ASSETS = [ const STATIC_ASSETS = [
+6 -6
View File
@@ -119,7 +119,7 @@ if (empty($videoData) || isset($videoData['error'])) {
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo !empty($video['title']) ? htmlspecialchars($video['title']) . ' - ' : ''; ?>kaubuntu.re</title> <title><?php echo !empty($video['title']) ? htmlspecialchars($video['title']) . ' - ' : ''; ?><?php echo SITE_NAME; ?></title>
<link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>"> <link rel="stylesheet" href="css/styles.css?v=<?php echo filemtime('css/styles.css'); ?>">
<link rel="stylesheet" href="css/video-page.css?v=<?php echo filemtime('css/video-page.css'); ?>"> <link rel="stylesheet" href="css/video-page.css?v=<?php echo filemtime('css/video-page.css'); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
@@ -133,19 +133,19 @@ if (empty($videoData) || isset($videoData['error'])) {
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Meta tags pour le partage sur les réseaux sociaux --> <!-- Meta tags pour le partage sur les réseaux sociaux -->
<meta property="og:title" content="<?php echo !empty($video['title']) ? htmlspecialchars($video['title']) : 'Vidéo'; ?> - kaubuntu.re"> <meta property="og:title" content="<?php echo !empty($video['title']) ? htmlspecialchars($video['title']) : 'Vidéo'; ?> - <?php echo SITE_NAME; ?>">
<meta property="og:description" content="<?php echo !empty($video['description']) ? htmlspecialchars(substr(strip_tags($video['description']), 0, 200)) . '...' : 'Regardez cette vidéo sur kaubuntu.re'; ?>"> <meta property="og:description" content="<?php echo !empty($video['description']) ? htmlspecialchars(substr(strip_tags($video['description']), 0, 200)) . '...' : 'Regardez cette vidéo sur ' . SITE_NAME; ?>">
<?php if (isset($videoData['thumbnailPath'])): ?> <?php if (isset($videoData['thumbnailPath'])): ?>
<meta property="og:image" content="<?php echo PEERTUBE_URL . $videoData['thumbnailPath']; ?>"> <meta property="og:image" content="<?php echo PEERTUBE_URL . $videoData['thumbnailPath']; ?>">
<?php endif; ?> <?php endif; ?>
<meta property="og:url" content="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>"> <meta property="og:url" content="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">
<meta property="og:type" content="video.other"> <meta property="og:type" content="video.other">
<meta property="og:site_name" content="kaubuntu.re"> <meta property="og:site_name" content="<?php echo SITE_NAME; ?>">
<!-- Meta tags pour Twitter --> <!-- Meta tags pour Twitter -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="<?php echo !empty($video['title']) ? htmlspecialchars($video['title']) : 'Vidéo'; ?> - kaubuntu.re"> <meta name="twitter:title" content="<?php echo !empty($video['title']) ? htmlspecialchars($video['title']) : 'Vidéo'; ?> - <?php echo SITE_NAME; ?>">
<meta name="twitter:description" content="<?php echo !empty($video['description']) ? htmlspecialchars(substr(strip_tags($video['description']), 0, 200)) . '...' : 'Regardez cette vidéo sur kaubuntu.re'; ?>"> <meta name="twitter:description" content="<?php echo !empty($video['description']) ? htmlspecialchars(substr(strip_tags($video['description']), 0, 200)) . '...' : 'Regardez cette vidéo sur ' . SITE_NAME; ?>">
<?php if (isset($videoData['thumbnailPath'])): ?> <?php if (isset($videoData['thumbnailPath'])): ?>
<meta name="twitter:image" content="<?php echo PEERTUBE_URL . $videoData['thumbnailPath']; ?>"> <meta name="twitter:image" content="<?php echo PEERTUBE_URL . $videoData['thumbnailPath']; ?>">
<?php endif; ?> <?php endif; ?>