X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fvideo.php;h=3637f14fbce918396375d8da07ddc17706592c19;hb=3393d7d6a6968abebf0bdabb81f17eff8b46b477;hp=6f22400d107fb2b7ae920a7ace04181e35df1d21;hpb=ad7daf2de4288cff974e97ec9290533ba732df3b;p=living-lab-site.git diff --git a/application/controllers/video.php b/application/controllers/video.php index 6f22400..3637f14 100644 --- a/application/controllers/video.php +++ b/application/controllers/video.php @@ -33,29 +33,31 @@ class Video extends CI_Controller { { $this->load->helper('url'); + // ** + // ** LOADING MODEL + // ** // Retrieve video information. $this->load->model('videos_model'); + $this->videos_model->inc_video_var($id, 'views'); $data['video'] = $this->videos_model->get_video($id, $name); + $categories = $this->config->item('categories'); + $data['video']['category_name'] = + $categories[ $data['video']['category_id'] ]; $data['plugin_type'] = ($plugin === NULL ? 'auto' : $plugin); // Display page. $params = array( 'title' => $data['video']['title'] . ' -- ' . $this->config->item('site_name'), 'css' => array( - 'jquery-ui.css', 'jquery.ui.nsvideo.css', 'video.css' ), 'js' => array( - 'jquery.js', - 'jquery-ui.js', 'jquery.ui.nsvideo.js' ), //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); - $this->load->view('html_begin', $this->html_head_params); - $this->load->view('header'); // Preloading video plugin. // TODO plugin auto: type and format @@ -67,6 +69,13 @@ class Video extends CI_Controller { // $data['plugin_content'] = $this->_plugin('ns-html5', // $data['video']['url'][0], TRUE); + // ** + // ** LOADING VIEWS + // ** + $this->load->view('html_begin', $this->html_head_params); + $this->load->view('header'); + + //$main_params['content'] = $this->load->view('video/watch_view', $data, TRUE); $this->load->view('video/watch_view', $data); $this->load->view('footer');