Помогите вывести код баннера во фрейме под видео
Здравствуйте! Уже неделю бьюсь над кодом и не могу разобраться :cray: Помогите установить код баннера под видео во всплывающем фрейме.
Пример: ![]() Вид видео во фрейме на сайте: http://videotube.pp.ua/moskovskij-regionalnyj-bank/ Некоторые файлы которые возможно помогут: /*! * Lightview - The jQuery Lightbox - v3.4.0 * (c) 2008-2014 Nick Stakenburg * * [url]http://projects.nickstakenburg.com/lightview[/url] * * License: [url]http://projects.nickstakenburg.com/lightview/license[/url] */ ;var Lightview = { version: '3.4.0', extensions: { flash: 'swf', image: 'bmp gif jpeg jpg png', iframe: 'asp aspx cgi cfm htm html jsp php pl php3 php4 php5 phtml rb rhtml shtml txt', quicktime: 'avi mov mpg mpeg movie mp4' }, pluginspages: { quicktime: 'http://www.apple.com/quicktime/download', flash: 'http://www.adobe.com/go/getflashplayer' } }; Lightview.Skins = { // every possible property is defined on the base skin // all other skins inherit from this skin 'base': { ajax: { type: 'get' }, background: { color: '#000', opacity: 1 }, border: { size: 0, color: '#ccc', opacity: 1 }, continuous: false, controls: { close: 'relative', slider: { items: 5 }, text: { previous: "Prev", // when modifying this on skins images/css might have to be changed next: "Next" }, thumbnails: { spinner: { color: '#777' }, mousewheel: true }, type: 'relative' }, effects: { caption: { show: 180, hide: 180 }, content: { show: 280, hide: 280 }, overlay: { show: 240, hide: 280 }, sides: { show: 150, hide: 180 }, spinner: { show: 50, hide: 100 }, slider: { slide: 180 }, thumbnails: { show: 120, hide: 0, slide: 180, load: 340 }, window: { show: 120, hide: 50, resize: 200, position: 180 } }, errors: { 'missing_plugin': "The content your are attempting to view requires the <a href='#{pluginspage}' target='_blank'>#{type} plugin<\/a>." }, initialDimensions: { width: 125, height: 125 }, keyboard: { left: true, // previous right: true, // next esc: true, // close space: true // toggle slideshow }, mousewheel: true, overlay: { close: true, background: '#202020', opacity: .85 }, padding: 10, position: { at: 'center', offset: { x: 0, y: 0 } }, preload: true, radius: { size: 0, position: 'background' }, shadow: { blur: 1, color: '#000', opacity: .15 }, slideshow: { delay: 5000 }, spacing: { relative: { horizontal: 60, vertical: 60 }, thumbnails: { horizontal: 60, vertical: 60 }, top: { horizontal: 60, vertical: 60 } }, spinner: { }, thumbnail: { icon: false }, viewport: 'scale', wrapperClass: false, initialTypeOptions: { ajax: { keyboard: false, mousewheel: false, viewport: 'crop' }, flash: { width: 550, height: 400, params: { allowFullScreen: 'true', allowScriptAccess: 'always', wmode: 'transparent' }, flashvars: {}, keyboard: false, mousewheel: false, thumbnail: { icon: 'video' }, viewport: 'scale' }, iframe: { width: '100%', height: '100%', attr: { scrolling: 'auto' }, keyboard: false, mousewheel: false, viewport: 'crop' }, image: { viewport: 'scale' }, inline: { keyboard: false, mousewheel: false, viewport: 'crop' }, quicktime: { width: 640, height: 272, params: { autoplay: true, controller: true, enablejavascript: true, loop: false, scale: 'tofit' }, keyboard: false, mousewheel: false, thumbnail: { icon: 'video' }, viewport: 'scale' } } }, // reserved for resetting options on the base skin 'reset': { }, // the default skin 'dark': { border: { size: 0, color: '#000', opacity: .25 }, radius: { size: 5 }, background: '#141414', shadow: { blur: 5, opacity: .08 }, overlay: { background: '#2b2b2b', opacity: .85 }, spinner: { color: '#777' } }, 'light': { border: { opacity: .25 }, radius: { size: 5 }, spinner: { color: '#333' } }, 'mac': { background: '#fff', border: { size: 0, color: '#dfdfdf', opacity: .3 }, shadow: { blur: 3, opacity: .08 }, overlay: { background: '#2b2b2b', opacity: .85 } } }; <?php require_once 'Google/autoload.php'; require_once 'Google/Client.php'; require_once 'Google/Service/YouTube.php'; function get_youtube_video($key) { $DEVELOPER_KEY = 'ключ'; $client = new Google_Client(); $client->setDeveloperKey($DEVELOPER_KEY); // Define an object that will be used to make all API requests. $youtube = new Google_Service_YouTube($client); // Call the search.list method to retrieve results matching the specified // query term. $searchResponse = $youtube->search->listSearch('id,snippet', array( 'q' => $key, 'maxResults' => 50, )); $videos = ''; $channels = ''; $playlists = ''; /* echo '<pre>'; var_dump($searchResponse['items']); echo '</pre>'; */ echo '<div>'; foreach($searchResponse['items'] as $searchResult) { switch ($searchResult['id']['kind']) { case 'youtube#video': $videoId=$searchResult['id']['videoId']; $title=$searchResult['snippet']['title']; $desc=$searchResult['snippet']['description']; $img = 'https://i.ytimg.com/vi/'.$videoId.'/mqdefault.jpg'; // [0, 1, 2, 3, default, mqdefault, hqdefault, maxresdefault] http://shpargalkablog.ru/2013/06/youtube.html $a1='<a href="http://www.youtube.com/embed/'.$videoId.'?autoplay=1&autohide=1&border=0&egm=0&showinfo=0" data-lightview-type="iframe" class="lightview" data-lightview-options="width: 638,height: 360">'; $a2='</a>'; echo '<div class="video">'.'<br>'; echo $a1.'<img style="float: left;" src="'.$img.'" title="'.$title.'" alt="'.$title.'">'.$a2; echo $a1.$title.$a2.'<br>'; echo $desc.'<br>'; echo '</div>'; echo '<div style="clear: both"></div>'; } } echo '</div>'; } |
Интересно зачем понадобился switch с единственным case, и кусочками echo $desc.'<br>'; echo '</div>'; выводить данные не выгодно.
|
Что никто не знает?
|
Часовой пояс GMT +3, время: 20:07. |