feat: hide video count

This commit is contained in:
2025-10-17 12:24:56 +04:00
parent 2602d4099d
commit 4b4cffa0f3
4 changed files with 12 additions and 2 deletions
+3 -1
View File
@@ -109,7 +109,9 @@ foreach ($videos as $video) {
$html .= ' <h3 class="video-title">' . htmlspecialchars($video['title']) . '</h3>'; $html .= ' <h3 class="video-title">' . htmlspecialchars($video['title']) . '</h3>';
$html .= ' <div class="video-channel">' . htmlspecialchars($video['channel']) . '</div>'; $html .= ' <div class="video-channel">' . htmlspecialchars($video['channel']) . '</div>';
$html .= ' <div class="video-metadata">'; $html .= ' <div class="video-metadata">';
$html .= ' <span class="video-views"><i class="fas fa-eye"></i> ' . formatViewCount($video['views']) . ' vues</span>'; if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS) {
$html .= ' <span class="video-views"><i class="fas fa-eye"></i> ' . formatViewCount($video['views']) . ' vues</span>';
}
$html .= ' <span class="video-date"><i class="far fa-calendar-alt"></i> ' . formatDate($video['date']) . '</span>'; $html .= ' <span class="video-date"><i class="far fa-calendar-alt"></i> ' . formatDate($video['date']) . '</span>';
$html .= ' </div>'; $html .= ' </div>';
$html .= ' </div>'; $html .= ' </div>';
+2
View File
@@ -19,7 +19,9 @@ foreach ($featuredVideos as $video):
<h3 class="video-title"><?php echo $video['title']; ?></h3> <h3 class="video-title"><?php echo $video['title']; ?></h3>
<div class="video-channel"><?php echo $video['channel']; ?></div> <div class="video-channel"><?php echo $video['channel']; ?></div>
<div class="video-metadata"> <div class="video-metadata">
<?php if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS): ?>
<span class="video-views"><?php echo formatViewCount($video['views']); ?> vues</span> <span class="video-views"><?php echo formatViewCount($video['views']); ?> vues</span>
<?php endif; ?>
<span class="video-date"><?php echo formatDate($video['date']); ?></span> <span class="video-date"><?php echo formatDate($video['date']); ?></span>
</div> </div>
</div> </div>
+2
View File
@@ -19,7 +19,9 @@ foreach ($recentVideos as $video):
<h3 class="video-title"><?php echo $video['title']; ?></h3> <h3 class="video-title"><?php echo $video['title']; ?></h3>
<div class="video-channel"><?php echo $video['channel']; ?></div> <div class="video-channel"><?php echo $video['channel']; ?></div>
<div class="video-metadata"> <div class="video-metadata">
<?php if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS): ?>
<span class="video-views"><?php echo formatViewCount($video['views']); ?> vues</span> <span class="video-views"><?php echo formatViewCount($video['views']); ?> vues</span>
<?php endif; ?>
<span class="video-date"><?php echo formatDate($video['date']); ?></span> <span class="video-date"><?php echo formatDate($video['date']); ?></span>
</div> </div>
</div> </div>
+5 -1
View File
@@ -141,7 +141,7 @@ if (empty($videoData) || isset($videoData['error'])) {
<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="<?php echo SITE_NAME; ?>"> <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'; ?> - <?php echo SITE_NAME; ?>"> <meta name="twitter:title" content="<?php echo !empty($video['title']) ? htmlspecialchars($video['title']) : 'Vidéo'; ?> - <?php echo SITE_NAME; ?>">
@@ -216,7 +216,9 @@ if (empty($videoData) || isset($videoData['error'])) {
<div class="video-info"> <div class="video-info">
<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" aria-hidden="true"></i> <?php echo formatViewCount($video['views']); ?> vues</span> <span class="video-views"><i class="fas fa-eye" aria-hidden="true"></i> <?php echo formatViewCount($video['views']); ?> vues</span>
<?php endif; ?>
<span class="video-date"><i class="far fa-calendar-alt" aria-hidden="true"></i> <time datetime="<?php echo $video['date']; ?>"><?php echo formatDate($video['date']); ?></time></span> <span class="video-date"><i class="far fa-calendar-alt" aria-hidden="true"></i> <time datetime="<?php echo $video['date']; ?>"><?php echo formatDate($video['date']); ?></time></span>
</div> </div>
@@ -440,7 +442,9 @@ if (empty($videoData) || isset($videoData['error'])) {
<span class="channel-name"><?php echo $suggestedVideo['channel']; ?></span> <span class="channel-name"><?php echo $suggestedVideo['channel']; ?></span>
</div> </div>
<div class="suggested-video-metadata"> <div class="suggested-video-metadata">
<?php if (defined('SHOW_VIDEO_VIEWS') && SHOW_VIDEO_VIEWS): ?>
<span class="suggested-video-views"><?php echo formatViewCount($suggestedVideo['views']); ?> vues</span> <span class="suggested-video-views"><?php echo formatViewCount($suggestedVideo['views']); ?> vues</span>
<?php endif; ?>
<span class="suggested-video-date"><?php echo formatDate($suggestedVideo['date']); ?></span> <span class="suggested-video-date"><?php echo formatDate($suggestedVideo['date']); ?></span>
</div> </div>
</div> </div>