layout improved; About page completed
authorCalin Burloiu <calin.burloiu@gmail.com>
Thu, 25 Aug 2011 15:13:34 +0000 (18:13 +0300)
committerCalin Burloiu <calin.burloiu@gmail.com>
Thu, 25 Aug 2011 15:13:34 +0000 (18:13 +0300)
28 files changed:
application/config/routes.php
application/controllers/article.php
application/controllers/catalog.php
application/helpers/video_helper.php [new file with mode: 0644]
application/language/english/ui_lang.php
application/language/romanian/ui_lang.php
application/models/videos_model.php
application/views/article/english/about.php
application/views/article/english/install-plugins.php [new file with mode: 0644]
application/views/article/romanian/install-plugins.php [new file with mode: 0644]
application/views/catalog/category_view.php
application/views/catalog/index_view.php
application/views/echo.php
application/views/header.php
application/views/main.php [new file with mode: 0644]
application/views/video/watch_view.php
css/catalog.css
css/default.css
img/firefox-icon.png [new file with mode: 0644]
img/header.png [new file with mode: 0644]
img/html5-icon.png [new file with mode: 0644]
img/ie-icon.png [new file with mode: 0644]
img/linux-icon.png [new file with mode: 0644]
img/macosx-icon.png [new file with mode: 0644]
img/vlc-icon.png [new file with mode: 0644]
img/windows-icon.png [new file with mode: 0644]
system/core/Controller.php
system/core/Model.php

index 8b85ff6..5a01524 100644 (file)
@@ -46,6 +46,7 @@ $route['watch/([\d]+)/(.+)'] = "video/watch/$1/$2";
 // Article pages
 $route['about'] = 'article/about';
 $route['help'] = 'article/help';
+$route['install-plugins'] = 'article/install-plugins';
 
 
 
index dda09f7..4ff9ba6 100644 (file)
@@ -43,11 +43,11 @@ class Article extends Article_Controller {
                $this->load->view('html_begin', $this->html_head_params);
                $this->load->view('header', array('selected_menu' => $method));
                
-               $this->load->view('echo', 
-                       array('output' => $this->_load($method, $params),
-                               'clear' => TRUE)
-                       );
-               
+               $main_params['content'] = $this->_load($method, $params);
+               // TODO side
+               $main_params['side'] = '<h1>Side Box</h1><p>TODO: Put side box content here</p>';
+               $this->load->view('main', $main_params); 
+                               
                $this->load->view('footer');
                $this->load->view('html_end');
        }
index 23a2f17..f3df836 100644 (file)
@@ -57,7 +57,10 @@ class Catalog extends CI_Controller {
                $this->load->view('html_begin', $this->html_head_params);
                $this->load->view('header', array('selected_menu' => 'home'));
                
-               $this->load->view('catalog/index_view', $data);
+               $main_params['content'] = $this->load->view('catalog/index_view', $data, TRUE);
+               // TODO: side
+               $main_params['side'] = '<h1>Side Box</h1><p>TODO: Put side box content here</p>';
+               $this->load->view('main', $main_params);
                
                $this->load->view('footer');
                $this->load->view('html_end');
@@ -65,7 +68,25 @@ class Catalog extends CI_Controller {
        
        public function test($page = 0)
        {
+               $params = array(        'title' => 'Test - '. $this->config->item('site_name'),
+                                                       'css' => array(
+                                                               'jquery-ui.css'
+                                                               ),
+                                                       //'js' => array(),
+                                                       //'metas' => array('description'=>'','keywords'=>'')
+                       );
+               $this->load->library('html_head_params', $params);
                
+               // **
+               // ** LOADING VIEWS
+               // **
+               $this->load->view('html_begin', $this->html_head_params);
+               $this->load->view('header', array('selected_menu' => 'home'));
+               
+               $this->load->view('echo', array('output'=>'Test Page', 'clear'=>TRUE));
+               
+               $this->load->view('footer');
+               $this->load->view('html_end');
        }
        
        public function category($category_id, $offset = 0)
@@ -101,7 +122,10 @@ class Catalog extends CI_Controller {
                        $vs_data, TRUE);
                
                $params = array(        'title' => $this->config->item('site_name'),
-                                                       'css' => array('catalog.css'),
+                                                       'css' => array(
+                                                               'catalog.css', 
+                                                               'jquery-ui.css'
+                                                               ),
                                                        //'js' => array(),
                                                        //'metas' => array('description'=>'','keywords'=>'')
                                                        );
@@ -113,7 +137,10 @@ class Catalog extends CI_Controller {
                $this->load->view('html_begin', $this->html_head_params);
                $this->load->view('header');
                
-               $this->load->view('catalog/category_view', $data);
+               $main_params['content'] = $this->load->view('catalog/category_view', $data, TRUE);
+               // TODO: side
+               $main_params['side'] = '<h1>Side Box</h1><p>TODO: Put side box content here</p>';
+               $this->load->view('main', $main_params);
                
                $this->load->view('footer');
                $this->load->view('html_end');
diff --git a/application/helpers/video_helper.php b/application/helpers/video_helper.php
new file mode 100644 (file)
index 0000000..64efee5
--- /dev/null
@@ -0,0 +1,104 @@
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/**
+ * Tests if parameter is a resolution string with format [width]x[height].
+ * @param string $res
+ * @return boolean
+ */
+function is_res($res)
+{
+       if (strpos($res, 'x') === FALSE)
+       return FALSE;
+
+       return TRUE;
+}
+
+/**
+ * Return the width from a resolution string with format [width]x[height].
+ * @param string $res
+ */
+function res_to_width($res)
+{
+       if (! is_res($res))
+       return FALSE;
+
+       return intval( substr($res, 0, strpos($res, 'x')) );
+}
+
+/**
+* Return the height from a resolution string with format [width]x[height].
+* @param string $res
+*/
+function res_to_height($res)
+{
+       if (! is_res($res))
+       return FALSE;
+
+       return intval( substr($res, strpos($res, 'x') + 1) );
+}
+
+/**
+ * Compares two resolution strings $a and $b with format [width]x[height] based
+ * on theirs megapixels number by return -1, 0 or 1 like any compare function.
+ * @param string $a
+ * @param string $b
+ * @param function $access_function    filters input parameters by doing something
+ * like $a = $access_function($a). Leave it NULL for no filtering.
+ */
+function megapixels_cmp($a, $b, $access_function = NULL)
+{
+       if ($access_function !== NULL)
+       {
+               $a = $access_function($a);
+               $b = $access_function($b);
+       }
+
+       $a_w = intval( substr($a, 0, strpos($a, 'x')) );
+       $a_h = intval( substr($a, strpos($a, 'x') + 1) );
+       if ($a_w === FALSE || $a_h === FALSE)
+       return 0;
+       $a_Mp = $a_w * $a_h;
+       $b_w = intval( substr($b, 0, strpos($b, 'x')) );
+       $b_h = intval( substr($b, strpos($b, 'x') + 1) );
+       if ($b_w === FALSE || $b_h === FALSE)
+       return 0;
+       $b_Mp = $b_w * $b_h;
+
+       if ($a_Mp == $b_Mp)
+       return 0;
+
+       return $a_Mp > $b_Mp ? 1 : -1;
+}
+
+/**
+ * Return the index of the $haystack element which has the closest resolution
+ * to $needle resolution string.
+ * @param array $haystack
+ * @param string $needle
+ * @param function $access_function    filters input parameters by doing something
+ * like $a = $access_function($a). Leave it NULL for no filtering.
+ */
+function get_closest_res($haystack, $needle, $access_function = NULL)
+{
+       $d_min = INF;
+       $i_min = FALSE;
+
+       foreach($haystack as $i => $elem)
+       {
+               if ($access_function !== NULL)
+               $elem = $access_function($elem);
+
+               $d = abs(res_to_width($elem) * res_to_height($elem)
+               - res_to_width($needle) * res_to_height($needle));
+               if ($d < $d_min)
+               {
+                       $d_min = $d;
+                       $i_min = $i;
+               }
+       }
+
+       return $i_min;
+}
+
+/* End of file video_helper.php */
+/* Location: ./application/helpers/video_helper.php */
\ No newline at end of file
index 00be54a..adbbb0c 100644 (file)
@@ -2,6 +2,7 @@
 
 // Navigation Menu
 $lang['ui_nav_menu_home'] = 'Home';
+$lang['ui_nav_menu_install_plugins'] = 'Install Plugins';
 $lang['ui_nav_menu_about'] = 'About';
 $lang['ui_nav_menu_log_in'] = 'Log In';
 $lang['ui_nav_menu_register'] = 'Register';
index df457a9..7417d32 100644 (file)
@@ -2,6 +2,7 @@
 
 // Navigation Menu
 $lang['ui_nav_menu_home'] = 'Acasă';
+$lang['ui_nav_menu_install_plugins'] = 'Instalare Plugin-uri';
 $lang['ui_nav_menu_about'] = 'Despre';
 $lang['ui_nav_menu_log_in'] = 'Autentificare';
 $lang['ui_nav_menu_register'] = 'Înregistrare';
index 922efd4..ec7bb39 100644 (file)
@@ -7,7 +7,7 @@
  * @author             Călin-Andrei Burloiu
  */
 class Videos_model extends CI_Model {
-       private $db = NULL;
+       public $db = NULL;
        
        public function __construct()
        {
@@ -119,6 +119,8 @@ class Videos_model extends CI_Model {
         */
        public function get_video($id, $name = NULL)
        {
+               $this->load->helper('video');
+               
                $query = $this->db->query('SELECT * 
                                                                FROM `videos` 
                                                                WHERE id = ?', $id);
@@ -143,6 +145,12 @@ class Videos_model extends CI_Model {
                asort($video['tags']);
                $video['tags'] = array_reverse($video['tags'], TRUE);
                
+               // Sort assets by their megapixels number.
+               function access_function($a) { return $a['res']; }
+               function assets_cmp($a, $b) 
+                       { return megapixels_cmp($a, $b, "access_function"); }
+               usort($video['assets'], "assets_cmp");
+               
                // Torrents
                $video['url'] = array();
                foreach ($video['assets'] as & $asset)
index 204d9c4..af88507 100644 (file)
@@ -1 +1,71 @@
-About <strong>us</strong>!
\ No newline at end of file
+<h1>P2P-Next</h1>
+<p><a title="P2P-Next" href="http://www.p2p-next.org/">P2P-Next</a> is an integrated FP7 EU project involving more than 20 partners, including <a title="University Politehnica of Bucharest" href="http://www.upb.ro">University Politehnica of Bucharest</a> (UPB).</p>
+<p>P2P-Next aims to build the next generation Peer-to-Peer (P2P) content delivery platform.</p>
+<p>This site provides information on UPB's contribution to the P2P-Next project activities. We are currently part of WP4 (Work Package 4 - IPvNext Networking Fabric) and WP8 (Work Package 8 - Living Lab Trials).</p>
+
+<h1>NextShare Video Plugins</h1>
+<dl>
+       <dt><a href="http://www.tribler.org/trac/wiki/BrowserPlugin" target="_blank">NextSharePC</a></dt>
+       <dd>a media-player browser plugin which uses <a href="http://www.videolan.org/vlc/" target="_blank">VLC</a> libraries for video rendering and incorporates P2P technology for VideoOnDemand (VoD) and LiveStreaming content delivery. The plugin is currently working with Internet Explorer and Firefox on Windows.</dd>
+</dl>
+<dl>
+       <dt><a href="http://www.tribler.org/trac/wiki/SwarmPlayer" target="_blank">SwarmPlayer</a></dt>
+       <dd>a browser plugin which uses the new HTML5 rendering and incorporates P2P technology for VideoOnDemand (VoD) and LiveStreaming content delivery</dd>
+</dl>
+
+<table>
+       <tr>
+               <th></th>
+               <th>Video Rendering</th>
+               <th>Operating Systems</th>
+               <th>Web Browsers</th>
+       </tr>
+       <tr>
+               <th>
+                       <a href="http://www.tribler.org/trac/wiki/BrowserPlugin" target="_blank">NextSharePC</a>
+               </th>
+               <td>
+                       <a href="http://www.videolan.org/vlc/" target="_blank"><img src="<?php echo site_url('img/vlc-icon.png') ?>" alt="win" /> VLC</a>
+               </td>
+               <td>
+                       <p><img src="<?php echo site_url('img/windows-icon.png') ?>" alt="win" /> Windows</p>
+                       <p><img src="<?php echo site_url('img/macosx-icon.png') ?>" alt="win" /> Mac OS X</p>
+               </td>
+               <td>
+                       <p><img src="<?php echo site_url('img/firefox-icon.png') ?>" alt="win" /> <a href="http://www.mozilla.com/" target="_blank">Mozilla Firefox</a> 3.5 or greater</p>
+                       <p><img src="<?php echo site_url('img/ie-icon.png') ?>" alt="win" /> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home" target="_blank">Internet Explorer</a> 7.0 or greater</p>
+               </td>
+       </tr>
+       <tr>
+               <th>
+                       <a href="http://www.tribler.org/trac/wiki/SwarmPlayer" target="_blank">SwarmPlayer</a>
+               </th>
+               <td>
+                       <a href="http://www.w3.org/TR/html5/" target="_blank"><img src="<?php echo site_url('img/html5-icon.png') ?>" alt="win" /> HTML5</a>
+               </td>
+               <td>
+                       <p><img src="<?php echo site_url('img/windows-icon.png') ?>" alt="win" /> Windows</p>
+                       <p><img src="<?php echo site_url('img/linux-icon.png') ?>" alt="win" /> Linux</p>
+                       <p><img src="<?php echo site_url('img/macosx-icon.png') ?>" alt="win" /> Mac OS X</p>
+               </td>
+               <td>
+                       <p><img src="<?php echo site_url('img/firefox-icon.png') ?>" alt="win" /> <a href="http://www.mozilla.com/" target="_blank">Mozilla Firefox</a> 3.5 or greater</p>
+                       <p><img src="<?php echo site_url('img/ie-icon.png') ?>" alt="win" /> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home" target="_blank">Internet Explorer</a> 7.0 or greater</p>
+               </td>
+       </tr>
+</table>
+
+<h1>Video Assets</h1>
+<p>To take a look at the NextShare plugins in action, all you have to do is <a href="<?php echo site_url('install-plugins'); ?>">install them</a> and then watch any video asset from this site.</p>
+<p>Through the use of P2P technology, you will be able to stream movies from various categories:</p>
+<ul>
+       <li>from <a href="<?php site_url('catalog/category/1') ?>">feature films</a></li>
+       <li>from <a href="<?php echo site_url('catalog/category/2') ?>"><em>TechTalks</em> technical presentations</a></li>
+       <li>or from <a href="<?php site_url('catalog/category/3') ?>">various events</a> from our faculty</li>
+       <li>from <a href="<?php site_url('catalog/category/4') ?>">karaoke parties</a> in <a href="http://acs.pub.ro/" target="_blank">Automatic Control and Computers Faculty</a></li>
+</ul>
+<p>All available movies are currently seeded by 5 peers with high bandwidth (1Gbit) kindly provided by the<a title="NCIT-Cluster" href="http://cluster.ncit.pub.ro/" target="_blank"> NCIT-Cluster</a>. Anyone that watches a movie will take part in the swarm and ensure greater availability to provided content.</p>
+
+<!--<h1>Contact and support</h1>
+<p>In case there are issues getting the SwarmPlugin to work or for any other information, please contact us at <a title="P2P-Next Contact Address" href="mailto:p2p-next-contact@cs.pub.ro">p2p-next-contact@cs.pub.ro</a>.</p>
+<p>Please access <a title="Swarm Plugin Demo" href="extra/SwarmPluginDemo.wmv">this link</a> in order to download a small demo movie about using the <a title="Swarm Plugin" href="http://www.tribler.org/trac/wiki/BrowserPlugin">SwarmPlugin</a> on <a title="P2P-Next UPB Trial Site">this site</a>.</p>-->
\ No newline at end of file
diff --git a/application/views/article/english/install-plugins.php b/application/views/article/english/install-plugins.php
new file mode 100644 (file)
index 0000000..1ef7494
--- /dev/null
@@ -0,0 +1,11 @@
+<h1>Install Plugins</h1>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
+<p>install plugins instructions</p>
\ No newline at end of file
diff --git a/application/views/article/romanian/install-plugins.php b/application/views/article/romanian/install-plugins.php
new file mode 100644 (file)
index 0000000..3fec15f
--- /dev/null
@@ -0,0 +1 @@
+Instalare Plugin-uri
\ No newline at end of file
index dccd2ed..c4c2ba3 100644 (file)
@@ -1,7 +1 @@
-<div id="main">
-<div id="content">
-
-<?php echo $video_summary ?>
-
-</div>
-</div>
+<?php echo $video_summary ?>
\ No newline at end of file
index ac9a001..03ab7e5 100644 (file)
@@ -1,9 +1,3 @@
-<div id="main">
-<div id="content">
-
 <?php foreach ($videos_summaries as $videos_summary):
        echo $videos_summary;
-endforeach ?>
-
-</div>
-</div>
+endforeach ?>
\ No newline at end of file
index 3c94e8c..ad4a9fd 100644 (file)
@@ -1,4 +1,4 @@
-<?php if ($clear): ?>
+<?php if (isset($clear) && $clear): ?>
        <div style="clear: both"></div>
 <?php endif ?>
 <?php echo $output; //print_r(get_defined_vars());
\ No newline at end of file
index 156aef7..3ec4f1e 100644 (file)
@@ -3,7 +3,11 @@
 endif ?>
 
 <ul id="nav-menu">
-       <li class="menu-left"><a href="<?php echo site_url() ?>" <?php echo ($selected_menu == 'home' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_home') ?></a></li>
+       <li class="menu-left"><a href="<?php echo site_url() ?>"
+               <?php echo ($selected_menu == 'home' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_home') ?></a></li>
+       
+       <li class="menu-left"><a href="<?php echo site_url('install-plugins') ?>"
+               <?php echo ($selected_menu == 'install-plugins' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_install_plugins') ?></a></li>
        
        <li class="menu-left"><a href="<?php echo site_url('about') ?>" 
                <?php echo ($selected_menu == 'about' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_about') ?></a></li>
diff --git a/application/views/main.php b/application/views/main.php
new file mode 100644 (file)
index 0000000..b26e7ad
--- /dev/null
@@ -0,0 +1,17 @@
+<?php 
+       if (! isset($content))
+               $content = '';
+       if (! isset($side))
+               $side = '';
+?>
+
+<div style="clear: both"></div>
+<div id="main">
+       <div id="content">
+               <?php echo $content ?>
+       </div>
+       <div id="side">
+               <?php echo $side ?>
+       </div>
+       <div style="clear: both"></div>
+</div>
\ No newline at end of file
index 9d83add..231b702 100644 (file)
@@ -3,96 +3,94 @@
        siteUrl = '<?php echo site_url() ?>';
 </script>
 
-<div id="main">
-       <?php // Invalid name in URL ?>
-       <?php if (isset($video['err'])):
-               if ($video['err'] == 'INVALID_NAME'):
-                       $suggestion = site_url(sprintf("video/watch/%d/%s", $video['id'], 
-                               $video['name']))
-                       ?>
-                       <p>Invalid URL <em><?php echo current_url() ?></em> .</p>
-                       <p>Did you mean <a href="<?php echo $suggestion ?>">
-                               <?php echo $suggestion ?></a> ?</p>
-               <?php elseif($video['err'] == 'INVALID_ID'): ?>
-                       <p>Invalid ID in URL.</p>
-               <?php endif ?>
-               
-       <?php // Correct URL ?>
-       <?php else: ?>
-               <h1><?php echo $video['title'] ?></h1>
-               
-               <div id="video-widget-tabs">
-                       <ul>
-                               <li>
-                                       <a id="switch-to-ns-html5" href="#video-widget">HTML5</a>
-                               </li>
-                               <li>
-                                       <a id="switch-to-ns-vlc" href="#video-widget">VLC</a>
-                               </li>
-                       </ul>
-                       
-                       <div id="video-widget"></div>
-               </div>
+<?php // Invalid name in URL ?>
+<?php if (isset($video['err'])):
+       if ($video['err'] == 'INVALID_NAME'):
+               $suggestion = site_url(sprintf("video/watch/%d/%s", $video['id'], 
+                       $video['name']))
+               ?>
+               <p>Invalid URL <em><?php echo current_url() ?></em> .</p>
+               <p>Did you mean <a href="<?php echo $suggestion ?>">
+                       <?php echo $suggestion ?></a> ?</p>
+       <?php elseif($video['err'] == 'INVALID_ID'): ?>
+               <p>Invalid ID in URL.</p>
+       <?php endif ?>
+       
+<?php // Correct URL ?>
+<?php else: ?>
+       <h1><?php echo $video['title'] ?></h1>
+       
+       <div id="video-widget-tabs">
+               <ul>
+                       <li>
+                               <a id="switch-to-ns-html5" href="#video-widget">HTML5</a>
+                       </li>
+                       <li>
+                               <a id="switch-to-ns-vlc" href="#video-widget">VLC</a>
+                       </li>
+               </ul>
                
-               <div id="video-info" style="clear: both">
-               <div id="video-upload-info">
-                       <?php echo $this->lang->line('ui_uploaded_by') ?>
-                               <span id="video-date"><?php echo $video['user_name'] ?></span>
-                               <?php echo $this->lang->line('ui_on_date') ?>
-                               <span id="video-date"><?php echo $video['date'] ?></span>
-               </div>
-               
-               <div id="video-popularity">
-                       <div id="video-views">
-                               <?php echo $video['views'] . ' '
-                                       . ($video['views'] == 1 ? 
-                                               $this->lang->line('ui_view') : 
-                                               $this->lang->line('ui_views') );
-                               ?>
-                       </div>
-                       
-                       <div><span id="video-likes">
-                               <?php echo $video['likes'] . ' '
-                                       . ($video['likes'] == 1 ? 
-                                               $this->lang->line('ui_like') : 
-                                               $this->lang->line('ui_likes') );
-                               ?></span>,
-                       <span id="video-dislikes">
-                               <?php echo $video['dislikes'] . ' '
-                                       . ($video['dislikes'] == 1 ? 
-                                               $this->lang->line('ui_dislike') : 
-                                               $this->lang->line('ui_dislikes') );
-                               ?>
-                       </span></div>
-               </div>
-               
-               <div id="video-description"><?php echo $video['description'] ?></div>
-               
-               <dl id="video-category">
-                       <dt><?php echo ucwords($this->lang->line('ui_category'))
-                               . ': ' ?></dt>
-                       <dd><?php echo $video['category_title'] ?></dd>
-               </dl>
-               
-               <dl id="video-tags">
-                       <dt><?php echo ucwords($this->lang->line('ui_tags')). ': ' ?></dt>
-                       <dd><?php if (isset($video['tags'])): 
-                       foreach ($video['tags'] as $tag => $score): ?>
-                       <a href="<?php echo site_url('catalog/search/'. $tag) ?>" class="video-tag">
-                               <?php echo "$tag " // TODO print score in future ?>
-                       </a>
-                       <?php endforeach; endif ?></dd>
-               </dl>
-               
-               <dl id="video-license">
-                       <dt><?php echo ucwords($this->lang->line('ui_license')).': ' ?></dt>
-                       <dd><?php echo $video['license'] ?></dd>
-               </dl>
+               <div id="video-widget"></div>
+       </div>
+       
+       <div id="video-info" style="clear: both">
+       <div id="video-upload-info">
+               <?php echo $this->lang->line('ui_uploaded_by') ?>
+                       <span id="video-date"><?php echo $video['user_name'] ?></span>
+                       <?php echo $this->lang->line('ui_on_date') ?>
+                       <span id="video-date"><?php echo $video['date'] ?></span>
+       </div>
+       
+       <div id="video-popularity">
+               <div id="video-views">
+                       <?php echo $video['views'] . ' '
+                               . ($video['views'] == 1 ? 
+                                       $this->lang->line('ui_view') : 
+                                       $this->lang->line('ui_views') );
+                       ?>
                </div>
                
+               <div><span id="video-likes">
+                       <?php echo $video['likes'] . ' '
+                               . ($video['likes'] == 1 ? 
+                                       $this->lang->line('ui_like') : 
+                                       $this->lang->line('ui_likes') );
+                       ?></span>,
+               <span id="video-dislikes">
+                       <?php echo $video['dislikes'] . ' '
+                               . ($video['dislikes'] == 1 ? 
+                                       $this->lang->line('ui_dislike') : 
+                                       $this->lang->line('ui_dislikes') );
+                       ?>
+               </span></div>
+       </div>
+       
+       <div id="video-description"><?php echo $video['description'] ?></div>
+       
+       <dl id="video-category">
+               <dt><?php echo ucwords($this->lang->line('ui_category'))
+                       . ': ' ?></dt>
+               <dd><?php echo $video['category_title'] ?></dd>
+       </dl>
+       
+       <dl id="video-tags">
+               <dt><?php echo ucwords($this->lang->line('ui_tags')). ': ' ?></dt>
+               <dd><?php if (isset($video['tags'])): 
+               foreach ($video['tags'] as $tag => $score): ?>
+               <a href="<?php echo site_url('catalog/search/'. $tag) ?>" class="video-tag">
+                       <?php echo "$tag " // TODO print score in future ?>
+               </a>
+               <?php endforeach; endif ?></dd>
+       </dl>
+       
+       <dl id="video-license">
+               <dt><?php echo ucwords($this->lang->line('ui_license')).': ' ?></dt>
+               <dd><?php echo $video['license'] ?></dd>
+       </dl>
+       </div>
+       
 
-       <?php endif // if (isset($video['err'])): ?>
-</div>
+<?php endif // if (isset($video['err'])): ?>
 
 <?php // Javascript bindings when document is ready ?>
 <script type="text/javascript">
index b5d7896..da5da85 100644 (file)
@@ -1,12 +1,12 @@
 .videos-summary
 {
        position: relative;
+       margin-bottom: 1em;
 }
 
 .category-title
 {
-       border-bottom: 1px solid rgb(108,162,222);
-       /*border-bottom: 1px solid rgb(171,209,255);*/
+       /* border-bottom: 1px solid rgb(108,162,222); */
 }
 
 .video-icon
index c5be6b3..900e049 100644 (file)
@@ -111,13 +111,52 @@ h1
        /*position: absolute;
        top: 90px;
        width: 100%;*/
-       margin: 12px;
+       /* padding: 12px; */
+       margin: 0 auto;
+       width: 1024px;
+       text-align: justify;
+}
+
+#main h1
+{
+       font-size:18px;
+       font-weight: bold;
+       color: #000D60;
+       text-align: left;
+       padding: 10px 0px 0px 10px;
+       background: url(/devel/img/header.png) top repeat-x;
+       clear: both;
+}
+
+#main table
+{
+       width: 100%;
+       border-collapse: collapse;
+}
+#main th, #main td
+{
+       /* border: 1px solid rgb(108,162,222); */
+       vertical-align: top;
+}
+#main table img
+{
+       vertical-align: middle;
 }
 
 #content
 {
        float: left;
-       width: 616px;
+       width: 752px;
+       margin: 8px;
+       /* outline: 2px outset gray; */
+}
+
+#side
+{
+       float: right;
+       width: 240px;
+       margin: 8px;
+       /* outline: 2px outset gray; */
 }
 
 #footer
diff --git a/img/firefox-icon.png b/img/firefox-icon.png
new file mode 100644 (file)
index 0000000..434ea40
Binary files /dev/null and b/img/firefox-icon.png differ
diff --git a/img/header.png b/img/header.png
new file mode 100644 (file)
index 0000000..cf18cb8
Binary files /dev/null and b/img/header.png differ
diff --git a/img/html5-icon.png b/img/html5-icon.png
new file mode 100644 (file)
index 0000000..df9bbdf
Binary files /dev/null and b/img/html5-icon.png differ
diff --git a/img/ie-icon.png b/img/ie-icon.png
new file mode 100644 (file)
index 0000000..b6b88f1
Binary files /dev/null and b/img/ie-icon.png differ
diff --git a/img/linux-icon.png b/img/linux-icon.png
new file mode 100644 (file)
index 0000000..0ce4492
Binary files /dev/null and b/img/linux-icon.png differ
diff --git a/img/macosx-icon.png b/img/macosx-icon.png
new file mode 100644 (file)
index 0000000..f775536
Binary files /dev/null and b/img/macosx-icon.png differ
diff --git a/img/vlc-icon.png b/img/vlc-icon.png
new file mode 100644 (file)
index 0000000..54c3854
Binary files /dev/null and b/img/vlc-icon.png differ
diff --git a/img/windows-icon.png b/img/windows-icon.png
new file mode 100644 (file)
index 0000000..3ca7442
Binary files /dev/null and b/img/windows-icon.png differ
index 76c5306..38afc78 100644 (file)
  */
 class CI_Controller {
        
-       // TODO remove development declaration (used for Eclipse)
-       /**
-       * @var CI_Config
-       */
-       var $config;
-       /**
-        * @var CI_DB_active_record
-        */
-       var $db;
-       /**
-        * @var CI_Email
-        */
-       var $email;
-       /**
-        * @var CI_Form_validation
-        */
-       var $form_validation;
-       /**
-        * @var CI_Input
-        */
-       var $input;
-       /**
-        * @var CI_Loader
-        */
-       var $load;
-       /**
-        * @var CI_Router
-        */
-       var $router;
-       /**
-        * @var CI_Session
-        */
-       var $session;
-       /**
-        * @var CI_Table
-        */
-       var $table;
-       /**
-        * @var CI_Unit_test
-        */
-       var $unit;
-       /**
-        * @var CI_URI
-        */
-       var $uri;
-       /**
-        * @var CI_Pagination
-        */
-       var $pagination;
+       // TODO remove development declarations (used for Eclipse)
+//     /**
+//     * @var CI_Config
+//     */
+//     var $config;
+//     /**
+//      * @var CI_DB_active_record
+//      */
+//     var $db;
+//     /**
+//      * @var CI_Email
+//      */
+//     var $email;
+//     /**
+//      * @var CI_Form_validation
+//      */
+//     var $form_validation;
+//     /**
+//      * @var CI_Input
+//      */
+//     var $input;
+//     /**
+//      * @var CI_Loader
+//      */
+//     var $load;
+//     /**
+//      * @var CI_Router
+//      */
+//     var $router;
+//     /**
+//      * @var CI_Session
+//      */
+//     var $session;
+//     /**
+//      * @var CI_Table
+//      */
+//     var $table;
+//     /**
+//      * @var CI_Unit_test
+//      */
+//     var $unit;
+//     /**
+//      * @var CI_URI
+//      */
+//     var $uri;
+//     /**
+//      * @var CI_Pagination
+//      */
+//     var $pagination;
+//      My declarations
+//     /**
+//      * @var Videos_model
+//      */
+//     var $videos_model;
 
        private static $instance;
 
index 8dbe57f..fc7e546 100644 (file)
 class CI_Model {
        
        // TODO remove development declaration (used for Eclipse)
-       /**
-        * @var CI_Config
-        */
-       var $config;
-       /**
-        * @var CI_DB_active_record
-        */
-       var $db;
-       /**
-        * @var CI_Email
-        */
-       var $email;
-       /**
-        * @var CI_Form_validation
-        */
-       var $form_validation;
-       /**
-        * @var CI_Input
-        */
-       var $input;
-       /**
-        * @var CI_Loader
-        */
-       var $load;
-       /**
-        * @var CI_Router
-        */
-       var $router;
-       /**
-        * @var CI_Session
-        */
-       var $session;
-       /**
-        * @var CI_Table
-        */
-       var $table;
-       /**
-        * @var CI_Unit_test
-        */
-       var $unit;
-       /**
-        * @var CI_URI
-        */
-       var $uri;
-       /**
-        * @var CI_Pagination
-        */
-       var $pagination;
-
+//     /**
+//      * @var CI_Config
+//      */
+//     var $config;
+//     /**
+//      * @var CI_DB_active_record
+//      */
+//     var $db;
+//     /**
+//      * @var CI_Email
+//      */
+//     var $email;
+//     /**
+//      * @var CI_Form_validation
+//      */
+//     var $form_validation;
+//     /**
+//      * @var CI_Input
+//      */
+//     var $input;
+//     /**
+//      * @var CI_Loader
+//      */
+//     var $load;
+//     /**
+//      * @var CI_Router
+//      */
+//     var $router;
+//     /**
+//      * @var CI_Session
+//      */
+//     var $session;
+//     /**
+//      * @var CI_Table
+//      */
+//     var $table;
+//     /**
+//      * @var CI_Unit_test
+//      */
+//     var $unit;
+//     /**
+//      * @var CI_URI
+//      */
+//     var $uri;
+//     /**
+//      * @var CI_Pagination
+//      */
+//     var $pagination;
+       // My declarations
+//     /**
+//      * @var Videos_model
+//      */
+//     var $videos_model;
+       
+       
        /**
         * Constructor
         *