OpenID login and comment improoved
[living-lab-site.git] / application / models / videos_model.php
index 2b0add6..64ee48e 100644 (file)
@@ -189,6 +189,7 @@ class Videos_model extends CI_Model {
        public function get_video($id, $name = NULL)
        {
                $this->load->helper('video');
+               $this->load->helper('text');
                
                $query = $this->db->query("SELECT v.*, u.username 
                                                                FROM `videos` v, `users` u
@@ -240,6 +241,10 @@ class Videos_model extends CI_Model {
                // Thumbnails
                $video['thumbs'] = $this->get_thumbs($video['name'], $video['thumbs_count']);
                
+               // Shorted description
+               $video['shorted_description'] = character_limiter(
+                               $video['description'], 128);
+               
                return $video;
        }