/**
  * Class constructor
  *
  * @access	public
  */
 public function __construct()
 {
     parent::__construct();
     $this->_title = 'Links';
     $this->_menu = array('External sources you should take a look to');
     $this->get_content();
 }
 /**
  * Class constructor
  *
  * @access	public
  */
 public function __construct()
 {
     parent::__construct();
     parent::build_title();
     $this->_menu = array('Description of website author(s)');
     $this->get_content();
 }
 /**
  * Class constructor
  *
  * @access	public
  */
 public function __construct()
 {
     parent::__construct();
     parent::build_title();
     $this->_menu = array('You can use this form to contact an author');
     $this->get_users();
     $this->send();
 }
 /**
  * Class constructor
  *
  * @access	public
  */
 public function __construct()
 {
     parent::__construct();
     Helper\Helper::get_categories($this->_menu, 'video');
     $this->build_menu();
     //If try to select an inexistant category, redirect to 404
     if (VGet::cat() && !isset($this->_menu[VGet::cat()])) {
         header('Location: 404.php');
     }
     $this->get_content();
     $this->_title = 'Videos';
 }
 /**
  * Class constructor
  *
  * @access	public
  * @param	integer [$id] Element id
  */
 public function __construct($id)
 {
     if (empty($id)) {
         throw new Exception('Element id missing');
     }
     parent::__construct();
     $this->_id = $id;
     $this->get_content();
     $this->_comment = new Comment();
     if (VSession::visitor_name(false) && VSession::visitor_email(false)) {
         $this->_comment->_name = VSession::visitor_name();
         $this->_comment->_email = VSession::visitor_email();
     }
     $this->question();
     if (VGet::respond_to()) {
         $this->_comment->_content = '@' . VGet::respond_to();
     }
     if (VPost::submit_comment(false)) {
         $this->create();
     }
 }
 /**
  * Redefine master method for the title
  *
  * @access	protected
  */
 protected function build_title()
 {
     parent::build_title();
     if (VGet::album() && !empty($this->_album)) {
         $this->_title = ucwords($this->_album->_name);
     }
 }
 /**
  * Display the posts listing
  *
  * @access	private
  */
 private function display_listing()
 {
     if (!VSession::html5() || VSession::renderer() == 'mobile') {
         echo '<ul id="listing_articles">';
     }
     if (!empty($this->_content)) {
         foreach ($this->_content as $article) {
             $crop_length = Helper\Posts::crop_length($article->_content);
             $cats = explode(',', $article->_category);
             try {
                 foreach ($cats as &$cat) {
                     $id = $cat;
                     $infos = new Category($id);
                     $cat = Helper\Posts::make_category_link($id, $infos->_name);
                 }
             } catch (Exception $e) {
                 @error_log($e->getMessage() . ' file: ' . __FILE__ . '; line: ' . __LINE__, 1, WS_EMAIL);
             }
             $content = nl2br(substr($article->_content, 0, $crop_length));
             Html::listing_article($article->_title, $article->_permalink, $cats, $article->_date, $article->_author_name, $content);
         }
     } else {
         Html::no_content('There\'s no post right now.');
     }
     if (!VSession::html5() || VSession::renderer() == 'mobile') {
         echo '</ul>';
     }
     if (VSession::renderer() != 'mobile' && !empty($this->_content)) {
         Html::navigation($this->_page, $this->_nb_pages, parent::link_navigation());
     }
 }