diff --git a/inc/config.php b/inc/config.php index 64a57297..5cee7ce1 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1018,33 +1018,19 @@ // Enable embedding (see below). $config['enable_embedding'] = false; + // Youtube.js embed HTML code + $config['youtube_js_html'] = '
'. + ''. + ''. + '
'; + // Custom embedding (YouTube, vimeo, etc.) // It's very important that you match the entire input (with ^ and $) or things will not work correctly. $config['embedding'] = array( array( - '/^https?:\/\/(?:\w+\.)?(?:youtube\.com\/watch\?|youtu\.be\/)(?:(?:&?v=)?([a-zA-Z0-9\-_]{10,11})\??|&?(start=\d*)|&?(end=\d*)|(?:&?[^&]+))*$/i', - '' + '/^https?:\/\/(?:\w+\.)?(?:youtube\.com\/watch\?|youtu\.be\/)(?:(?:&?v=)?([a-zA-Z0-9\-_]{10,11}))$/i', + $config['youtube_js_html'] ), - array( - '/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i', - '
' - ), - array( - '/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i', - '' - ) ); // Embedding width and height. @@ -1681,12 +1667,6 @@ // is the absolute maximum, because MySQL cannot handle table names greater than 64 characters. $config['board_regex'] = '[0-9a-zA-Z\+$_\x{0080}-\x{FFFF}]{1,58}'; - // Youtube.js embed HTML code - $config['youtube_js_html'] = '
'. - ''. - ''. - '
'; - // Use read.php? // read.php is a file that dynamically displays pages to users instead of the build on demand system in use in Tinyboard since 2010. // diff --git a/inc/instance-config.php b/inc/instance-config.php index 9dcf6e0b..fba06740 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -190,34 +190,6 @@ 'message' => sprintf(_('On this board, to prevent raids only %d threads can be made per hour. Please try again later, or post in an existing thread.'), $config['hour_max_threads']) ); - - $config['embedding'] = array( - array( - '/^https?:\/\/(?:\w+\.)?(?:youtube\.com\/watch\?|youtu\.be\/)(?:(?:&?v=)?([a-zA-Z0-9\-_]{10,11})\??|&?(start=\d*)|&?(end=\d*)|(?:&?[^&]+))*$/i', - $config['youtube_js_html'] - ), - array( - '/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i', - '
' - ), - array( - '/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i', - '' - ), - array( - '/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i', - '' - ) - ); - $config['gzip_static'] = false; $config['hash_masked_ip'] = true; $config['force_subject_op'] = false;