diff --git a/shared.php b/shared.php index e95483a..53c88f8 100644 --- a/shared.php +++ b/shared.php @@ -6,6 +6,7 @@ define('HOME_PAGE', 'blog'); // Entry page (and link for logo) define('CACHE_POSTS_TTL', 3600); // Time to cache the posts list (1h) define('POSTS_BASE', "/b/"); // Root directory of the posts (relative) + define('YT_PREVIEW', "/b/pimg-yt/"); // Directory containing local copies of the youtube thumbnails define('POSTS_ROOT', $_SERVER['DOCUMENT_ROOT'] . POSTS_BASE); // Root directory of the posts (absolute) define('POSTS_PAGE_SIZE', 10); // Numbers of posts on a page @@ -124,6 +125,7 @@ if ($matches) { $youtube['embed'] = "https://www.youtube.com/embed/" . $matches[1]; $youtube['link'] = "https://www.youtube.com/watch?v=" . $matches[1]; + $youtube['vid'] = $matches[1]; } echo '
'; @@ -132,7 +134,7 @@ if (opted_in('y')) { echo ''; } else { - echo "
Embedded content has been disabled to protect your privacy.




or click here to allow them permanently,

" . "or click here to watch the video on YouTube:
" . $youtube['link'] . "



Please note that by enabling this video, data is transferred
to YouTube LLC, and is subject to their privacy policy.
"; + echo "
Embedded content has been disabled to protect your privacy.




or click here to allow them permanently,

" . "or click here to watch the video on YouTube:
" . $youtube['link'] . "



Please note that, by enabling this video, data is transferred
to YouTube LLC, and is subject to their privacy policy.
"; } } else { // TODO: HTML5 video