forked from leftypol/leftypol
config.php: adjust youtube embedding for youtube.js
This commit is contained in:
parent
4787e98c02
commit
3c282852a3
1 changed files with 14 additions and 12 deletions
|
@ -1196,13 +1196,21 @@
|
|||
// It's very important that you match the entire input (with ^ and $) or things will not work correctly.
|
||||
$config['embedding'] = array(
|
||||
[
|
||||
'/^https?:\/\/(\w+\.)?youtube\.com\/shorts\/([a-zA-Z0-9\-_]{10,11})$/i',
|
||||
'<iframe style="float: left; padding: 0.6em 1em 0.2em 0.2em;" width="240" height="426" frameborder="0" id="ytplayer" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/$2"></iframe>'
|
||||
],
|
||||
array(
|
||||
'/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
|
||||
'<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="http://www.youtube.com/embed/$2"></iframe>'
|
||||
),
|
||||
'<div class="video-container" data-video-id="$2" data-iframe-width="360" data-iframe-height="202">
|
||||
<a href="https://youtu.be/$2" target="_blank" class="file">
|
||||
<img style="width:360px;height:202px;object-fit:cover" src="https://img.youtube.com/vi/$2/0.jpg" class="post-image"/>
|
||||
</a>
|
||||
</div>'
|
||||
],
|
||||
[
|
||||
'/^https?:\/\/(\w+\.)?youtube\.com\/shorts\/([a-zA-Z0-9\-_]{10,11})(\?.*)?$/i',
|
||||
'<div class="video-container" data-video-id="$2" data-iframe-width="202" data-iframe-height="360">
|
||||
<a href="https://youtu.be/$2" target="_blank" class="file">
|
||||
<img style="width:202px;height:360px;object-fit:cover" src="https://img.youtube.com/vi/$2/0.jpg" class="post-image"/>
|
||||
</a>
|
||||
</div>'
|
||||
],
|
||||
array(
|
||||
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',
|
||||
'<iframe src="https://player.vimeo.com/video/$2" style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
|
||||
|
@ -2015,12 +2023,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'] = '<div class="video-container" data-video="$2">'.
|
||||
'<a href="https://youtu.be/$2" target="_blank" class="file">'.
|
||||
'<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>'.
|
||||
'</a></div>';
|
||||
|
||||
// Slack Report Notification
|
||||
$config['slack'] = false;
|
||||
$config['slack_channel'] = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue