function handle_bbcode_video(&$parser, $videoid, $videotitle)
{
global $vbulletin, $stylevar;
if (!$video = $vbulletin->db->query_first("SELECT video.*
FROM " . TABLE_PREFIX . "video AS video WHERE videoid = '" . $videoid . "'"))
{
$video['error'] = 'THIS VIDEO DOES NOT EXIST';
eval('$HTMLembed = "' . fetch_template('video_bbcode') . '";');
return $HTMLembed;
}
require_once(DIR . '/includes/functions_videodirectory.php');
require_once(DIR . '/includes/class_videosharingservice.php');
require_once(DIR . '/includes/videoserviceapi/class_' . strtolower($video['videoservice']) . '.php');
$classname = "vB_VideoSharingService_$video[videoservice]";
$obj = new $classname($vbulletin);
$showful = $vbulletin->options['videodirectory_showful'];
$showrel = $vbulletin->options['videodirectory_showrel'];
$showsta = $vbulletin->options['videodirectory_showsta'];
$video['embed'] = $obj->fetch_embedcode($video['videoidservice'], false, $showful, $showrel, $showsta);
$video['url'] = construct_video_url($video);
if (empty($videotitle)) { $videotitle = $video['title']; }
eval('$HTMLembed = "' . fetch_template('video_bbcode') . '";');
return $HTMLembed;
}
Bookmarks