Guest User

Untitled

a guest
Sep 19th, 2016
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <?php
  3. $dpfields = array();
  4. foreach ($this->item->dpfields as $f) { $dpfields[$f->alias] = $f; }
  5. $video = $dpfields['video'];
  6. $urlvideo=$video->value;
  7. if (!empty($urlvideo)) :
  8. echo '<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class="embed-container"><iframe src="http://www.youtube.com/embed/'.$urlvideo.'" frameborder="0" allowfullscreen></iframe></div>';
  9. ?>
  10. <?php endif; ?>
RAW Paste Data