forked from SteamLUG/steamlug.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyoutubedescription.php
32 lines (25 loc) · 1.28 KB
/
youtubedescription.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
header('Content-Type: text/html; charset=UTF-8');
include_once('includes/functions_cast.php');
function slenc($u)
{
return htmlentities($u,ENT_QUOTES, "UTF-8");
}
/* User wanting to see a specific cast, and shownotes file exists */
if ( $season !== "00" && $episode !== "00" && ($meta = getCastHeader( $slug ) ) ) {
$shownotes = getCastBody( $slug );
$meta['RECORDED'] = ( $meta['RECORDED'] === '' ? "N/A" : $meta['RECORDED'] );
echo "{$meta['DESCRIPTION']}<br>\n<br>\n";
echo "Shownotes featuring full descriptions and links can be found at https://steamlug.org/cast/{$meta['SLUG']}<br>\n";
echo "This cast was recorded on {$meta['RECORDED']}<br>\n<br>\n";
foreach ( $shownotes as $note ) {
preg_replace_callback(
'/(\d+:\d+:\d+)\s+\*(.*)\*/',
function($matches) { print slenc($matches[1]) . " " . slenc($matches[2]) . "<br>"; },
$note );
}
echo "<br>\nSteamLUG Cast is a casual, fortnightly audiocast which aims to provide interesting news and discussion for the SteamLUG and broader Linux gaming communities.<br>\n";
echo "Visit our site http://steamlug.org/ and the cast homepage http://steamlug.org/cast<br>\n";
echo "Email us feedback, questions, tips and suggestions to [email protected]<br>\n";
echo "We can be followed on Twitter http://twitter.com/steamlug\n";
}