Blame view

frontend/modules/map/views/item/vparts/video.php 424 Bytes
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <?php
  /**
   *
   * @author FilamentV <vortex.filament@gmail.com>
   * @copyright (c), Thread
   */
  
  $r = explode('&', $model['youtube_link']);
  $name = '';
  foreach ($r as $itemr) {
      if (mb_substr($itemr, 0, 2) == 'v=') {
          $name = mb_substr($itemr, 2);
          break;
      }
  }
  
  ?>
  <div class="tab-pane fade" id="video">
      <iframe width="100%" height="350" src="https://www.youtube.com/embed/<?= $name ?>"></iframe>
  </div>