( ( isset( $settings[ 'disable_index' ] ) && $settings[ 'disable_index' ] == 'true' ) ? 'NOINDEX, NOFOLLOW' : 'INDEX, FOLLOW' ), 'default_artwork' => getArtwork( null ), 'og_image' => ( ( empty( $settings[ 'fb_shareimg' ] ) ) ? $settings[ 'url' ] . getArtwork( null ) : $settings[ 'fb_shareimg' ] ), 'og_site_title' => ( ( !empty( $settings[ 'site_title' ] ) ) ? '' : ' ' ), 'icon_size' => ( !is_numeric( $settings[ 'playlist_icon_size' ] ) ) ? 32 : $settings[ 'playlist_icon_size' ], 'json_settings' => json_encode( ## Handle array which is passed to javascript for language and settings array( 'lang' => $lang, 'analytics' => ( !empty( $settings[ 'google_analytics' ] ) ? $settings[ 'google_analytics' ] : false ), 'channel' => array(), 'title' => str_to_utf8( $settings[ 'title' ] ), 'artist_length' => $settings[ 'artist_maxlength' ], 'title_length' => $settings[ 'title_maxlength' ], 'default_artist' => str_to_utf8( $settings[ 'artist_default' ] ), 'default_title' => str_to_utf8( $settings[ 'title_default' ] ), 'default_channel' => str_to_utf8( $settings[ 'default_channel' ] ), 'default_volume' => ( ( isset( $settings[ 'default_volume' ] ) && $settings[ 'default_volume' ] >= 1 && $settings[ 'default_volume' ] <= 100 ) ? $settings[ 'default_volume' ] : 50 ), 'dynamic_title' => ( isset( $settings[ 'dynamic_title' ] ) ) ? $settings[ 'dynamic_title' ] : false, 'usecookies' => ( isset( $settings[ 'cookie_support' ] ) ) ? $settings[ 'cookie_support' ] : false, 'stats_refresh' => ( is_numeric( $settings[ 'stats_refresh' ] ) && $settings[ 'stats_refresh' ] > 5 ) ? $settings[ 'stats_refresh' ] : 15, 'autoplay' => ( isset( $_GET[ 'autoplay' ] ) && $_GET[ 'autoplay' ] == 'false' ) ? false : $settings[ 'autoplay' ], 'history' => ( isset( $settings[ 'history' ] ) && $settings[ 'history' ] == 'true' ) ? 'true' : false, 'template' => $settings[ 'template' ] ) ), ); // Output buffer should also minify stuff (8192 byte buffer) ob_start( function( $buffer ) use ( $settings ) { // Prior using our buffer, apply template to it $buffer = template( $buffer, $settings ); // Array with replacement matching (regex) $regex = array( ## REGEX ## REPLACE WITH "/|\t/s" => "", "/\>([\s\t]+)?([ ]{2,}+)?\ "><" ); // Replace tabs, empty spaces etc etc... $html_out = preg_replace( array_keys( $regex ), $regex, $buffer ); // Optimize '; }, $html_out ); // Optimize "; }, $html_out ); // Finally out put our content =) return $html_out; }, 8192 ); // Template loader if ( !is_file( ".{$list[ $settings[ 'template' ] ][ 'path' ]}/{$list[ $settings[ 'template' ] ][ 'template' ]}" ) ) { die( 'Unable to find the template file!' ); } else { echo file_get_contents( ".{$list[ $settings[ 'template' ] ][ 'path' ]}/{$list[ $settings[ 'template' ] ][ 'template' ]}" ); } ?>