'name' => 'featured'
);
}
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'title',
+ 'display' => 'Title',
+ 'opts' => array('class' => 'text','size'=>50)
+ );
$e[] = array(
'type' => 'text',
'req' => true,
{
$r = array();
- $r[] = array(
- 'element' => 'video_url',
- 'message' => 'ERROR: Invalid URL format (http)',
- 'type' => 'checkURI',
- 'format' => array(
- 'allowed_schemes' => array('http'),
- 'strict' => false
- ),
- 'validation' => $this->validationType,
- 'reset' => false,
- 'force' => false
- );
+ $r[] = array(
+ 'element' => 'video_url',
+ 'message' => 'ERROR: Invalid URL format (http)',
+ 'type' => 'checkURI',
+ 'format' => array(
+ 'allowed_schemes' => array('http', 'https'),
+ 'strict' => false
+ ),
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
$this->setupRules($r);
$video = new Toolkit_Videos_Video();
}
$video->setVideo_url($values['video_url'])
+ ->setTitle($values['title'])
->setFeatured($values['featured'])
->setActive($values['active']);
{
protected $id;
+ protected $title;
protected $video_url;
protected $pos;
protected $featured;
}
return $this;
}
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ public function setTitle($title)
+ {
+ $this->title = $title;
+ return $this;
+ }
/**
* video_url getter
*/
public function getVideoTitle()
{
+ return $this->getTitle();
$url = "http://gdata.youtube.com/feeds/api/videos/". $this->getVideoCode();
$ch = curl_init();
$curlOptions = array(
if ($res) {
$video = new Toolkit_Videos_Video();
$video->setId($res['id'])
+ ->setTitle($res['title'])
->setVideo_url($res['video_url'])
->setActive($res['active'])
->setfeatured($res['featured'])
$this->addColumn(
new Structures_DataGrid_Column(
- 'Video Url',
- 'video_url',
+ 'Title',
+ 'title',
null
)
);
$vidCode = $match[1];
}
$thumb = ($vidCode)
- ? '<a href="http://www.youtube.com/embed/'.$vidCode.'?rel=0" class="various fancybox.iframe vidimg"><img src="http://img.youtube.com/vi/'.$vidCode.'/default.jpg"></a>'
+ ? '<a href="http://www.youtube.com/embed/'.$vidCode.'?rel=0" class="colorbox"><img src="http://img.youtube.com/vi/'.$vidCode.'/default.jpg"></a>'
: '';
return $thumb;
}