forked from leftypol/leftypol
display youtube video thumbnail (with local url) in embeds
This commit is contained in:
parent
5216f2e189
commit
2c6628b7cd
2 changed files with 13 additions and 7 deletions
|
@ -366,15 +366,18 @@ $config['additional_javascript'][] = 'js/download-original.js';
|
|||
|
||||
$config['enable_embedding'] = true;
|
||||
|
||||
$config['youtube_js_html'] = '<div class="video-container" data-video="$2">'.
|
||||
'<a href="https://youtu.be/$2" target="_blank" class="file">'.
|
||||
'https://youtu.be/$2'.
|
||||
'</a></div>';
|
||||
$config['youtube_js_html']
|
||||
= '<div class="video-container" data-video="$2">'
|
||||
. '<a href="https://youtu.be/$2" target="_blank" class="file">'
|
||||
. '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image"/>'
|
||||
. '</a></div>';
|
||||
|
||||
$config['embedding'] = array();
|
||||
$config['embedding'][0] = array(
|
||||
'/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
|
||||
$config['youtube_js_html']);
|
||||
$config['embedding'][0] =
|
||||
array(
|
||||
'/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
|
||||
$config['youtube_js_html']
|
||||
);
|
||||
$config['additional_javascript'][] = 'js/youtube.js';
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue