-
Notifications
You must be signed in to change notification settings - Fork 1
/
video.php
24 lines (19 loc) · 1.01 KB
/
video.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Plugin_video extends Plugin
{
function youtube()
{
$id = ($this->attribute('id') ? $this->attribute('id') : 'oHg5SJYRHA0');
$width = ($this->attribute('width') ? $this->attribute('width') : '100%');
$height = ($this->attribute('height') ? $this->attribute('height') : '315');
return '<iframe src="http://www.youtube.com/embed/'.$id.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
}
function vimeo()
{
$id = ($this->attribute('id') ? $this->attribute('id') : '42722025');
$width = ($this->attribute('width') ? $this->attribute('width') : '100%');
$height = ($this->attribute('height') ? $this->attribute('height') : '315');
return '<iframe src="http://player.vimeo.com/video/'.$id.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
}
}
/* End of file Plugin_video.php */