hello
I am trying to create a video gallery from flv files,when i am uploading the file it is creating the thumbnails but when I am opening the pages it is only showing the title and description but not the file,it is not playing the file and there is no error also.i have used the devlopment mode still i did not got any error.I got the code in this forum provided by UncleCheese, The code for the pages are given below.
Video.php
<?php
class Video extends DataObject
{
static $db = array (
'Title' => 'Varchar(100)',
'Description' => 'Text'
);
static $has_one = array (
// Make sure this comes first
'Video' => 'FLV'
);
}
?>
VideoPage.php
class VideoPage extends Page
{
static $has_many = array (
'Videos' => 'Video'
);
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Videos", new FileDataObjectManager(
$this,
'Videos',
'Video',
'Video',
array('Title' => 'Title', 'Description' => 'Description'),
new FieldSet(
new TextField('Title'),
new TextareaField('Description')
)
));
return $fields;
}
}
class VideoPage_Controller extends Page_Controller
{
}
VideoPage.ss
<% control Video %>
$Video (no control needed)
<% end_control %>
Please help me to run my video gallery
thanks in advance,special request to UncleCheese