Ejemplo n.º 1
0
 public function showPage(GWF_Page $page)
 {
     $page->increase('page_views', 1);
     $robot = $page->isOptionEnabled(GWF_PAGE::INDEXED) ? 'index,' : 'noindex,';
     $robot .= $page->isOptionEnabled(GWF_PAGE::FOLLOW) ? 'follow' : 'nofollow';
     GWF_Website::addMeta(array('robots', $robot, 0), true);
     GWF_Website::setMetaDescr($page->getVar('page_meta_desc'));
     GWF_Website::setMetaTags($page->getVar('page_meta_tags'));
     GWF_Website::setPageTitle($page->getVar('page_title'));
     GWF_Website::addInlineCSS($page->getVar('page_inline_css'));
     $translations = $this->getPageTranslations($page);
     $user = GWF_User::getStaticOrGuest();
     $tVars = array('page' => $page, 'page_views' => $page->getVar('page_views'), 'title' => $page->display('page_title'), 'author' => $page->display('page_author_name'), 'created' => GWF_Time::displayDate($page->getVar('page_create_date')), 'modified' => GWF_Time::displayDate($page->getVar('page_date')), 'content' => $this->getPageContent($page), 'comments' => $this->getPageComments($page), 'form_reply' => $this->getPageCommentsForm($page), 'pagemenu' => $this->getPagemenuComments($page), 'translations' => $translations, 'trans_string' => $this->getPageTranslationsString($page, $translations), 'similar' => $this->getSimilarPages($page), 'edit_permission' => $page->isOwner($user) || $this->module->isAuthor($user));
     return $this->module->template('show_page.tpl', $tVars);
 }