forked from SteamLUG/steamlug.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
youtubedescription.php
33 lines (27 loc) · 1.29 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
33
<?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 ) {
echo slenc( $matches[1] ) . ' ' . slenc( $matches[2] ) . '<br>';
}, $note );
}
echo <<<FOOTERMSG
<br>
SteamLUG Cast is a casual, fortnightly audiocast which aims to provide interesting news and discussion for the SteamLUG and broader Linux gaming communities.<br>
Visit our site https://steamlug.org/ and the cast homepage https://steamlug.org/cast<br>
Email us feedback, questions, tips and suggestions to [email protected]<br>
We can be followed on Twitter https://twitter.com/steamlug
FOOTERMSG;
}