/**
  * Display a single album with all pictures
  *
  * @access	private
  */
 private function display_album()
 {
     Html::header_albums($this->_album->_name);
     Html::album_details($this->_album->_id, $this->_album->_author_name, $this->_album->_date, nl2br($this->_album->_description), $this->_album->_name, WS_URL . '?ctl=' . $this->_pid . '&album=' . $this->_album->_id);
     Html::html5('o', 'id="album">');
     echo '<ul>';
     foreach ($this->_content as $picture) {
         $permalink = $picture->_permalink;
         $folder = dirname($permalink) . '/';
         $file = basename($permalink);
         Html::album_picture($folder . '150-' . $file, $permalink, $picture->_name, $picture->_description);
     }
     echo '</ul>';
     Html::html5('c');
 }
 /**
  * Display a specific post
  *
  * @access	private
  */
 private function display_news()
 {
     if (!empty($this->_content)) {
         $cats = explode(',', $this->_content[0]->_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($this->_content[0]->_content);
         $tags = explode(',', $this->_content[0]->_tags);
         foreach ($tags as &$tag) {
             $tag = Helper\Posts::make_tag_link($tag);
         }
         $link = WS_URL . '?ctl=posts&news=' . $this->_content[0]->_title;
         Html::html5('o', 'id="news_alone">');
         Html::article_alone($this->_content[0]->_title, $this->_content[0]->_date, $this->_content[0]->_author_name, $cats, $content, $tags, $link, $this->_content[0]->_updated, $this->_content[0]->_update_author_name);
         if (VSession::renderer() != 'mobile') {
             //create comment section
             if ($this->_content[0]->_allow_comment == 'open') {
                 $c = new Comments($this->_content[0]->_id);
                 $c->display_content();
             } else {
                 Html::comment_closed();
             }
         }
         Html::html5('c');
     }
 }
 /**
  * Display retrieved comments
  *
  * @access	private
  */
 private function display_comments()
 {
     if (!empty($this->_comments)) {
         $com_link = $this->build_link();
         Html::html5('o');
         foreach ($this->_comments as $comment) {
             Html::comment($comment->_id, $comment->_name, $comment->_date, $com_link, nl2br($comment->_content), $comment->_email);
         }
         Html::html5('c');
     }
 }
 /**
  * Display message after contact form has been submitted
  *
  * @static
  * @access	public
  * @param	mixed [$result]
  */
 public static function contact_submitted($result)
 {
     MHtml::html5('o', 'id="contact_form">');
     if ($result === 'false email') {
         echo '<span id="c_error">Your e-mail is not a valid one</span>';
     } elseif ($result === false) {
         echo '<span id="c_error">You need to fill all inputs</span>';
     } else {
         echo '<span id="c_well">Your message has been sent</span>';
     }
     MHtml::html5('c');
 }
 /**
  * Display page content
  *
  * @access	public
  */
 public function display_content()
 {
     if (VGet::cat()) {
         $add = $this->_menu[VGet::cat()];
     } else {
         $add = null;
     }
     Html::header_videos($add);
     if (!empty($this->_content)) {
         Html::html5('o', 'id="videos">');
         if (!VSession::html5()) {
             echo '<ul>';
         }
         foreach ($this->_content as $video) {
             Html::video($video->_name, $video->_author_publicname, $video->_permalink, $video->_embed_code, nl2br($video->_description), $video->_date);
         }
         if (!VSession::html5()) {
             echo '</ul>';
         }
         Html::html5('c');
     } else {
         if (!VSession::html5()) {
             echo '<ul>';
         }
         Html::no_content('There\'s no videos right now.');
         if (!VSession::html5()) {
             echo '</ul>';
         }
     }
 }