вопрос
Здравствуйте. Помогите пожалуйста соединить скрипт Re:Video Part с грабером https://dle-faq.ru/faq/phpquest/6710-debager-php-skripta.html
<?php
/*
=============================================================================
Re:Video Part - Модуль табов
=============================================================================
Автор модуля: Gameer
-----------------------------------------------------
URL: http://gameer.name/
-----------------------------------------------------
email: gameer.jp@gmail.gom
-----------------------------------------------------
skype: gameerblog
=============================================================================
Файл: re_video_part.php
=============================================================================
Версия модуля : Re:Video Part .3 Stable Release
=============================================================================
*/
if( !defined( 'DATALIFEENGINE' )) return;
global $row;
$newsid = intval($_REQUEST["newsid"]);
if(!$row && !$newsid) return;
if(!$row) $row = $db->super_query("SELECT `id`, `xfields` FROM " . PREFIX . "_post WHERE `id`=" . $newsid);
$name = $db->safesql(trim(strip_tags(stripslashes($xfname))));
$tabs = is_numeric($tabs) ? intval($tabs) : 5;
$xfield = xfieldsdataload( $row['xfields'] );
if(empty($xfield[$name])) return;
$get_cookie = isset($_COOKIE["last_seria_" . $name . "_" . $newsid]) ? intval($_COOKIE["last_seria_" . $name . "_" . $newsid]) : 0;
$i = 0;
$_tpl = new dle_template();
$_tpl->dir = TEMPLATE_DIR;
$_tpl->load_template( '/re_video_part/re_video_part.tpl' );
function vk_video($code) {
include_once('/engine/modules/simple_html_dom.php');
$code_dom = str_get_html($code);
$url_in = $code_dom->find('iframe', 0)->src;
$html = file_get_html($url_in);
$img = $html->find('#player_thumb', 0)->src;
echo ''.$img.'';
}
foreach(explode("{PART}", $xfield[$name]) as $val)
{
if(count(explode("|", $val)) == 2)
{ $key = explode("|", $val); $key = current($key); $key = str_ireplace(array("<br>", "\n", "\r", "<br />"), "", $key); }
else
$key = "" . ($i + 1);
if($i == $get_cookie)
{
$seria .= "<div id=\"{$name}_{$i}\" class=\"epizode b-img b-cards__item-preview\">
<a class=\"search-results-img-link preview-image\" onclick=\"re_video_part('{$name}', {$i}, {$newsid});\">
<span class=\"preview-image-inner\" style=\"background-image:url('/uploads/anime/{$newsid}.jpg');\"><span class=\"seria-numb\">« Серия {$key} »</span></span>
<i class=\"g-icon g-icon-play\"><i class=\"fa fa-play\"></i></i>
</a>
</div>";
if(count(explode("|", $val)) == 2)
{ $video = explode("|", $val); $video = end($video); $video = str_ireplace(array("<br>", "\n", "\r", "<br />"), "", $video);}
else
$video = str_replace(array("<br>", "\n", "\r", "<br />"), "", $val);
}
else
$seria .= "<div id=\"{$name}_{$i}\" class=\"epizode b-img b-cards__item-preview\">
<a class=\"search-results-img-link preview-image\" onclick=\"re_video_part('{$name}', {$i}, {$newsid});\">
<span class=\"preview-image-inner\" style=\"background-image:url('$image')\"><span class=\"seria-numb\">« Серия {$key} »</span></span>
<i class=\"g-icon g-icon-play\"><i class=\"fa fa-play\"></i></i>
</a>
</div>";
$i++;
}
if($i >= $tabs)
$_tpl->set( '[flag]', "display:block;");
else
$_tpl->set( '[flag]', "");
if($i > 1)
$_tpl->set_block("'\\[video:block\\](.*?)\\[/video:block\\]'si", "\\1");
else
$_tpl->set_block("'\\[video:block\\](.*?)\\[/video:block\\]'si", "");
$_tpl->set( '[seria:val]', $seria);
$_tpl->set( '[video:val]', $video);
$_tpl->set( '[field:name]', $name);
$_tpl->compile('re_video_part');
$_tpl->clear();
echo $_tpl->result['re_video_part'];;
unset($_tpl->result['re_video_part']);
?>
Re:Video Part + Превью картинки видео ВКонтакте?
— Тогда мы идём к вам!