/** * Display page content * * @access public */ public function display_content() { Html::header_authors(VGet::author()); if (!empty($this->_content)) { if (!VSession::html5()) { echo '<ul id="authors">'; } foreach ($this->_content as $user) { Html::author($user->_publicname, $user->_email, $user->_website, $user->_msn, $user->_twitter, $user->_facebook, $user->_google, $user->_avatar, $user->_bio); } if (!VSession::html5()) { echo '</ul>'; } } else { Html::no_content('Wanted user doesn\'t exist'); } }
/** * Display page content * * @access public */ public function display_content() { if (!empty($this->_content)) { Html::header_links(); if (!VSession::html5()) { echo '<ul id="links">'; } foreach ($this->_content as $link) { Html::related_link($link->_name, $link->_link, $link->_rss_link, $link->_notes, $link->_priority); } if (!Vsession::html5()) { echo '</ul>'; } } else { Html::header_links(); if (!VSession::html5()) { echo '<ul id="links">'; } Html::no_content('There\'s no link registered yet.'); if (!Vsession::html5()) { echo '</ul>'; } } }
/** * Display albums listing * * @access private */ private function display_albums() { if (!empty($this->_content)) { Html::header_albums($this->_category); if (!VSession::html5()) { echo '<ul id="listing_albums">'; } else { echo '<section id="listing_albums">'; } foreach ($this->_content as $album) { Html::album_label($album->_id, $album->_name, $album->_permalink, $album->_description); } if (!VSession::html5()) { echo '</ul>'; } else { echo '</section>'; } } else { Html::header_albums($this->_category); if (!VSession::html5()) { echo '<ul>'; } Html::no_content('There\'s no albums right now.'); if (!VSession::html5()) { echo '</ul>'; } } }
/** * 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()); } }
/** * Display an error message what says there's no result for the search * * @access private */ private function display_error() { if (!empty($this->_search)) { $msg = $this->_search; } elseif (!empty($this->_by_date)) { $msg = date('M Y', strtotime($this->_by_date)); } elseif (!empty($this->_tag)) { $msg = $this->_tag; } elseif (!empty($this->_cat)) { try { $cat = new Category($this->_cat); $msg = ucwords($cat->_name); } catch (Exception $e) { header('Location: 404.php'); } } if (!VSession::html5()) { echo '<ul id="listing_articles">'; } Html::no_content('No results founded for "' . $msg . '"'); if (!VSession::html5()) { echo '</ul>'; } }
/** * 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>'; } } }