public function onStartup() { $this->onLoadLanguage(); GWF_Website::addJavascript(GWF_WEB_ROOT . 'tpl/konz/js/konzert.js?v=5'); GWF_Website::addJavascriptOnload('initKonzert();'); GWF_Website::setMetaTags($this->lang('meta_tags')); GWF_Website::setMetaDescr($this->lang('meta_descr')); }
public function execute() { GWF_Website::setPageTitle($this->module->lang('pt_tut')); GWF_Website::setMetaTags($this->module->lang('mt_tut')); GWF_Website::setMetaDescr($this->module->lang('md_tut')); $tVars = array(); return $this->module->templatePHP('tutorial.php', $tVars); }
public function templateSearch(array $matches, $term) { GWF_Website::setPageTitle($this->module->lang('pt_search')); GWF_Website::setMetaTags($this->module->lang('mt_search')); GWF_Website::setMetaDescr($this->module->lang('md_search')); $tVars = array('cloud' => $this->module->templateCloud(), 'matches' => $this->module->templateLinks($matches, '#', '', ''), 'form' => $this->templateQuickSearch(), 'term' => $term); return $this->module->templatePHP('search.php', $tVars); }
public function onStartup() { require_once 'PT.php'; require_once 'PT_Menu.php'; self::$instance = $this; $this->onLoadLanguage(); // GWF_Website::setPageTitlePre('PoolTool'); GWF_Website::setMetaTags($this->lang('mt_about')); GWF_Website::setMetaDescr($this->lang('md_about')); }
private function templateMibbit() { if (!$this->module->cfgMibbit()) { return GWF_HTML::err('ERR_MODULE_DISABLED', array('Chat_Mibbit')); } GWF_Website::setPageTitle($this->module->lang('pt_irc_chat')); GWF_Website::setMetaTags($this->module->lang('mt_irc_chat')); GWF_Website::setMetaDescr($this->module->lang('md_irc_chat')); $tVars = array('href_webchat' => GWF_WEB_ROOT . 'chat', 'href_ircchat' => GWF_WEB_ROOT . 'irc_chat', 'href_ircchat_full' => GWF_WEB_ROOT . 'irc_chat_fullscreen', 'mibbit_url' => $this->module->cfgMibbitURL(), 'mibbit' => $this->module->cfgMibbit(), 'gwf_chat' => $this->module->cfgGWFChat()); return $this->module->templatePHP('mibbit.php', $tVars); }
public function execute() { $module = $this->module; $module instanceof Module_PageBuilder; $user = GWF_User::getStaticOrGuest(); GWF_Website::setMetaTags($module->lang('mt_overview')); GWF_Website::setMetaDescr($module->lang('md_overview')); GWF_Website::setPageTitle($module->lang('overview_title')); $tVars = array('add_perms' => $module->isAuthor($user), 'add_guest' => $module->cfgLockedPosting(), 'href_add' => GWF_WEB_ROOT . 'index.php?mo=PageBuilder&me=Add', 'href_search' => GWF_WEB_ROOT . 'index.php?mo=PageBuilder&me=Search'); return $this->module->template('overview.tpl', $tVars); }
public function execute() { if (false !== ($error = $this->sanitize())) { return $error; } GWF_Website::setPageTitle($this->module->lang('pt_board', array($this->board->getVar('board_title')))); GWF_Website::setMetaDescr($this->module->lang('md_board', array($this->board->getVar('board_descr')))); GWF_Website::setMetaTags($this->module->lang('mt_board')); if (false !== Common::getGet('mark_all_read')) { return $this->markAllRead() . $this->templateForum(); } return $this->templateForum(); }
public function execute() { if (false === ($user = GWF_User::getByName(Common::getGet('username')))) { return GWF_HTML::err('ERR_UNKNOWN_USER'); } if ($user->isDeleted()) { return GWF_HTML::err('ERR_UNKNOWN_USER'); } $uname = $user->displayUsername(); GWF_Website::setPageTitle($this->module->lang('pt_profile', array($uname, $uname))); GWF_Website::setMetaTags($this->module->lang('mt_profile', array($uname, $uname))); GWF_Website::setMetaDescr($this->module->lang('md_profile', array($uname, $uname))); return $this->profile($user); }
public function templateShow() { if (false === ($news = GWF_News::getNewsQuick($this->module->getNewsPerPage(), $this->catid, $this->page, GWF_Language::getCurrentID()))) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } $date = count($news) > 0 ? $news[0]['news_date'] : GWF_Settings::getSetting('gwf_site_birthday') . '090000'; $date = GWF_Time::displayDate($date); GWF_Website::setPageTitle($this->module->lang('pt_news', array($date))); GWF_Website::setMetaTags($this->module->lang('mt_news', array($date))); GWF_Website::setMetaDescr($this->module->lang('md_news', array($this->page, $this->nPages))); // $mod_forum = GWF_Module::getModule('Forum', true); $tVars = array('news' => $news, 'titles' => GWF_News::getTitlesQuick($this->catid, GWF_Language::getCurrentID()), 'cats' => GWF_News::getCategories(), 'catid' => $this->catid, 'cat' => GWF_HTML::display($this->catTitle), 'page_menu' => $this->getPageMenu(), 'page' => $this->page, 'can_sign' => $this->module->canSignNewsletter(GWF_Session::getUser()), 'href_sign_news' => $this->module->hrefSignNewsletter(), 'may_add' => GWF_User::isAdminS() || GWF_User::isStaffS(), 'href_add' => $this->module->hrefAddNews()); return $this->module->templatePHP('show.php', $tVars); }
private function setPageDescription($tag) { $which = (string) $this->getWhich(); if ($tag !== '') { $tag = " {$tag} "; } if ($tag !== '') { $this->pageTitle = $this->module->lang('pt_sites_' . $which . '_tagged', array($tag)); } else { $this->pageTitle = $this->module->lang('pt_sites_' . $which); } GWF_Website::setPageTitle($this->pageTitle); GWF_Website::setMetaDescr($this->module->lang('md_sites_' . $which)); GWF_Website::setMetaTags($this->module->lang('mt_sites_' . $which)); }
private function templateRanking(GWF_Language $lang, $user) { $db = gdo_db(); $ipp = 50; $iso = $lang->getISO(); $langid = $lang->getID(); $users = GWF_TABLE_PREFIX . 'user'; $regat = GWF_TABLE_PREFIX . 'wc_regat'; # Count number of users playing this language. $query = "SELECT COUNT(DISTINCT regat_uid) AS c FROM {$regat} WHERE regat_langid={$langid} AND regat_options&4=0"; if (false === ($result = $db->queryFirst($query))) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } # Page Menu $nItems = intval($result['c']); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); list($page, $hl_rank) = $this->getPageRank($langid, $ipp, $user); GWF_Website::setPageTitle($this->module->lang('pt_langrank', array($lang->displayName(), $page, $nPages))); GWF_Website::setMetaTags($this->module->lang('mt_ranking_lang', array($lang->displayName()))); GWF_Website::setMetaDescr($this->module->lang('md_ranking_lang', array($lang->displayName(), $page, $nPages))); // echo 'PAGE:'; // var_dump($page); // // echo 'RANK:'; // var_dump($hl_rank); // $page = Common::clamp($page, 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); # Query Data $query = "SELECT r1.regat_uid AS user_id, user_name, user_level, user_countryid, r1.regat_sid, r1.regat_solved AS solved, r2.sum AS sum " . "FROM {$regat} AS r1 " . "JOIN (SELECT regat_uid,SUM(regat_score) AS sum FROM {$regat} WHERE regat_langid={$langid} GROUP BY regat_uid ORDER BY SUM(regat_score) DESC LIMIT {$from},{$ipp}) AS r2 ON r1.regat_uid=r2.regat_uid " . "JOIN {$users} AS u ON u.user_id=r1.regat_uid " . "WHERE regat_options&4=0 " . "ORDER BY sum DESC "; if (false === ($result = $db->queryRead($query))) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } // var_dump($query); $data = array(); while (false !== ($row = $db->fetchAssoc($result))) { $uid = intval($row['user_id']); if (!isset($data[$uid])) { $data[$uid] = new GWF_User($row); } $sid = $row['regat_sid']; $data[$uid]->setVar('ss_' . $sid, (double) $row['solved']); } $db->free($result); # Show template $tVars = array('rank' => $from + 1, 'hlrank' => $hl_rank, 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'lang_ranking/' . $iso . '/page-%PAGE%'), 'langname' => $lang->displayName(), 'users' => $data, 'sites' => WC_Site::getSitesLang($langid), 'form_action' => $this->getMethodHref(), 'iso' => $lang->getISO()); return $this->module->templatePHP('ranking_lang.php', $tVars); }
public function execute() { # SEO GWF_Website::setMetaTags($this->module->lang('mt_list')); GWF_Website::setMetaDescr($this->module->lang('md_list')); GWF_Website::setPageTitle($this->module->lang('pt_list')); $user = GWF_Session::getUser(); # Permission // if ((false === ($user = GWF_Session::getUser())) && (!$this->module->cfgAnonDown())) { // return GWF_HTML::err('ERR_NO_PERMISSION'); // } if (false !== ($mod_pay = GWF_Module::getModule('Payment'))) { $mod_pay->onInclude(); } return $this->templateList($user); }
private function templatePage() { $ipp = $this->module->cfgIPP(); $shouts = GDO::table('GWF_Shoutbox'); $by = Common::getGet('by', 'shout_date'); $dir = Common::getGet('dir', 'ASC'); $orderby = $shouts->getMultiOrderby($by, $dir); $nItems = $shouts->countRows(); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); $page = Common::clamp(intval(Common::getGet('page', $nPages)), 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); GWF_Website::setPageTitle($this->module->lang('pt_history', array($page, $nPages))); GWF_Website::setMetaDescr($this->module->lang('md_history')); GWF_Website::setMetaTags($this->module->lang('mt_history')); $tVars = array('data' => $shouts->selectAll('*', '', $orderby, array('shout_uid'), $ipp, $from, GDO::ARRAY_O), 'sort_url' => GWF_WEB_ROOT . 'shoutbox/history/by/%BY%/%DIR%/page-1', 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'shoutbox/history/by/' . urlencode($by) . '/' . urlencode($dir) . '/page-%PAGE%'), 'form_action' => $this->module->hrefShout()); return $this->module->templatePHP('history.php', $tVars); }
public function templateRanking() { if (false === ($site = WC_Site::getByID(Common::getGet('sid')))) { return $this->module->error('err_site'); } $ipp = $this->module->cfgItemsPerPage(); $nItems = $site->getLinkcount() - $this->getLinkcountUnranked($site->getID()); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); $page = Common::clamp(intval(Common::getGet('page', 1)), 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); $args = array($site->displayName(), $page); $title = $this->module->lang('pt_site_ranking', $args); GWF_Website::setPageTitle($title); GWF_Website::setMetaTags($this->module->lang('mt_site_ranking', $args)); GWF_Website::setMetaDescr($this->module->lang('md_site_ranking', $args)); $tVars = array('userdata' => $this->getRankedUsers($site, $from, $ipp), 'site' => $site, 'sites' => $site->getSimilarSites(), 'site_quickjump' => $this->module->templateSiteQuickjumpRanking(), 'rank' => $from + 1, 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'site/ranking/for/' . $site->getID() . '/' . $site->urlencodeSEO('site_name') . '/page-%PAGE%'), 'page_title' => $title); return $this->module->templatePHP('site_ranking.php', $tVars); }
private function templateSingle($cid, $user) { if (false === ($country = GWF_Country::getByID($cid))) { return GWF_HTML::err('ERR_UNKNOWN_COUNTRY'); } require_once GWF_CORE_PATH . 'module/WeChall/WC_RegAt.php'; $cid = $country->getID(); $ipp = 50; $nItems = GDO::table('GWF_User')->countRows("user_countryid={$cid}"); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); list($page, $hlrank) = $this->getSinglePageRank($cid, $ipp, $user); $page = Common::clamp($page, 1, $nPages); $rank = ($page - 1) * $ipp + 1; $from = GWF_PageMenu::getFrom($page, $ipp); $cname = $country->display('country_name'); GWF_Website::setPageTitle($this->module->lang('pt_crank', array($cname, $page))); GWF_Website::setMetaTags($this->module->lang('mt_crank', array($cname, $cname))); GWF_Website::setMetaDescr($this->module->lang('md_crank', array($cname, $page))); $tVars = array('country' => $country, 'cid' => $cid, 'cname' => $cname, 'rank' => $rank, 'hl_rank' => $hlrank, 'page' => $page, 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'country_ranking/for/' . $cid . '/' . $country->urlencodeSEO('country_name') . '/page-%PAGE%'), 'data' => $this->getDataForCountry($country, $ipp, $from)); return $this->module->templatePHP('ranking_country.php', $tVars); }
private function setPageDescr($for_userid, $from_userid, $tag, $challcount) { $dtag = GWF_HTML::display($tag); GWF_Website::setPageTitle($this->getTableTitle($for_userid, $from_userid, $tag, $challcount), false); if ($for_userid != 0) { $for_user = GWF_User::getByIDOrGuest($for_userid); $for_username = $for_user->displayUsername(); GWF_Website::setMetaTags($this->module->lang('mt_challs_for', array($dtag, $for_username)), false); GWF_Website::setMetaDescr($this->module->lang('md_challs_for', array($dtag, $for_username)), false); } else { if ($from_userid != 0) { $from_user = GWF_User::getByIDOrGuest($from_userid); $from_username = $from_user->displayUsername(); GWF_Website::setMetaTags($this->module->lang('mt_challs_from', array($dtag, $from_username)), false); GWF_Website::setMetaDescr($this->module->lang('md_challs_from', array($dtag, $from_username)), false); } else { GWF_Website::setMetaTags($this->module->lang('mt_challs', array($dtag, GWF_HTML::display($tag))), false); GWF_Website::setMetaDescr($this->module->lang('md_challs', array($dtag, GWF_HTML::display($tag))), false); } } }
private function templateHistory(GWF_User $user) { require_once GWF_CORE_PATH . 'module/WeChall/WC_SiteDescr.php'; require_once GWF_CORE_PATH . 'module/WeChall/WC_HistoryUser2.php'; $uid = $user->getID(); $ipp = 50; $history = GDO::table('WC_HistoryUser2'); $nItems = $history->countRows("userhist_uid={$uid}"); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); $page = Common::clamp(Common::getGet('page', 1), 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); $by = Common::getGet('by', ''); $dir = Common::getGet('dir', ''); $orderby = $history->getMultiOrderby($by, $dir); $uuname = $user->urlencode2('user_name'); $duname = $user->displayUsername(); GWF_Website::setPageTitle($this->module->lang('pt_texthis', array($duname))); GWF_Website::setMetaDescr($this->module->lang('md_texthis', array($duname))); GWF_Website::setMetaTags($this->module->lang('mt_texthis', array($duname))); $tVars = array('user' => $user, 'duname' => $duname, 'sites' => WC_Site::getSites('site_id'), 'data' => $history->selectObjects('*', "userhist_uid={$uid}", $orderby, $ipp, $from), 'sort_url' => GWF_WEB_ROOT . 'history/for/' . $uuname . '/by/%BY%/%DIR%/page-1', 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'history/for/' . $uuname . '/by/' . urlencode($by) . '/' . urlencode($dir) . '/page-%PAGE%')); return $this->module->templatePHP('text_history.php', $tVars); }
private function page() { $db = gdo_db(); $users = GWF_TABLE_PREFIX . 'user'; $ag = GWF_TABLE_PREFIX . 'user_avatar_g'; $has_av = GWF_User::HAS_AVATAR; $usert = GDO::table('GWF_User'); $num_x = $this->module->cfgAvatarsX(); $num_y = $this->module->cfgAvatarsY(); $ipp = $num_x * $num_y; $nItems = $usert->countRows("user_options&{$has_av}>0"); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); $page = Common::clamp(intval(Common::getGet('page', 1)), 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); $limit = $usert->getLimit($ipp, $from); $query = "SELECT user_id,user_name,user_avatar_v,ag_hits,user_level FROM {$users} LEFT JOIN {$ag} ON ag_uid=user_id AND ag_version=user_avatar_v WHERE user_options&{$has_av}>0 ORDER BY ag_hits DESC, user_level DESC {$limit}"; GWF_Website::setPageTitle($this->module->lang('pt_avatars')); GWF_Website::setMetaDescr($this->module->lang('md_avatars')); GWF_Website::setMetaTags($this->module->lang('mt_avatars')); $tVars = array('page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'avatar/gallery/page-%PAGE%'), 'avatars' => $db->queryAll($query), 'num_x' => $num_x, 'num_y' => $num_y); return $this->module->templatePHP('avatars.php', $tVars); }
private function setPageTitles() { if ($this->user1 === false) { GWF_Website::setPageTitle($this->module->lang('pt_stats', array('Unknown'))); GWF_Website::setMetaTags($this->module->lang('mt_stats', array('Unknown'))); GWF_Website::setMetaDescr($this->module->lang('md_stats', array('Unknown'))); return; } $name1 = $this->user1->displayUsername(); $name2 = $this->user2 === false ? '' : $this->user2->displayUsername(); if ($name2 === '') { $args = array($name1); GWF_Website::setPageTitle($this->module->lang('pt_stats', $args)); GWF_Website::setMetaTags($this->module->lang('mt_stats', $args)); GWF_Website::setMetaDescr($this->module->lang('md_stats', $args)); } else { $args = array($name1, $name2); GWF_Website::setPageTitle($this->module->lang('pt_stats2', $args)); GWF_Website::setMetaTags($this->module->lang('mt_stats2', $args)); GWF_Website::setMetaDescr($this->module->lang('md_stats2', $args)); } }
private function templateRanking() { require_once GWF_CORE_PATH . 'module/WeChall/WC_SiteCats.php'; $tag = Common::getGet('tag', self::DEFAULT_TAG); if (0 === ($bit = WC_SiteCats::getBitForCat($tag))) { $bit = 1; $tag = $_GET['tag'] = WC_SiteCats::getCatForBit($bit); } $ipp = 50; $nItems = $this->countItems($bit); list($page, $hlrank) = $this->getPageNum($ipp, $bit); $nPages = GWF_PageMenu::getPagecount($ipp, $nItems); $page = Common::clamp($page, 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); $rank = ($page - 1) * $ipp + 1; $data = $bit === 0 ? array() : $this->selectPage($bit, $from, $ipp); $dtag = GWF_HTML::display($tag); GWF_Website::setPageTitle($this->module->lang('pt_tagrank', array($dtag))); GWF_Website::setMetaTags($this->module->lang('mt_tagrank', array($dtag, $dtag))); GWF_Website::setMetaDescr($this->module->lang('md_tagrank', array($dtag, $page, $nPages))); $tVars = array('rank' => $rank, 'hlrank' => $hlrank, 'sites' => WC_Site::getSimilarSitesS($bit, true), 'data' => $data, 'tag' => $dtag, 'form_action' => GWF_WEB_ROOT . 'category_ranking', 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . sprintf('category_ranking/%s/page-%%PAGE%%', urlencode($tag))), 'select' => $this->getTagSelect()); return $this->module->templatePHP('ranking_tag.php', $tVars); }
public function onStartup() { self::$instance = $this; // Register login hook GWF_Hook::add(GWF_HOOK::LOGIN_PRE, array(__CLASS__, 'hookLoginPre')); GWF_Hook::add(GWF_HOOK::LOGIN_AFTER, array(__CLASS__, 'hookLoginAfter')); GWF_Hook::add(GWF_HOOK::VOTED_SCORE, array(__CLASS__, 'hookVoteScore')); GWF_Hook::add(GWF_HOOK::ACTIVATE, array(__CLASS__, 'hookRegister')); GWF_Hook::add(GWF_HOOK::CHANGE_PASSWD, array(__CLASS__, 'hookChangePass')); GWF_Hook::add(GWF_HOOK::DELETE_USER, array(__CLASS__, 'hookDeleteUser')); GWF_Hook::add(GWF_HOOK::CHANGE_UNAME, array(__CLASS__, 'hookDeleteUser')); $this->onLoadLanguage(); if (Common::getGet('mo') !== 'WeChall') { $this->onInclude(); } GWF_Website::addJavascriptOnload('wcjsInit();'); GWF_Website::setPageTitlePre('[WeChall] '); GWF_Website::setMetaTags(WC_HTML::lang('mt_wechall')); GWF_Website::setMetaDescr(WC_HTML::lang('md_wechall')); GWF_Website::addJavascript('/js/module/WeChall/wc.js?v=5.1'); }
?> " alt="<?php echo $tLang->lang('it_graph_sitechalls', array($name)); ?> "></img></div> <?php } ?> <?php #} ?> <div class="cl"></div> <?php } ?> <?php if ('0' !== ($tid = $site->getVar('site_threadid'))) { $_GET['tid'] = $tid; $_GET['last_page'] = true; if (false !== ($forum = GWF_Module::loadModuleDB('Forum', true, true))) { GWF_ForumBoard::init(true, false); echo $forum->requestMethodB('ShowThread'); } } $dtitle = $site->getVar('site_name'); $args = array($dtitle); GWF_Website::setPageTitle($tLang->lang('pt_site_detail', $args)); GWF_Website::setMetaTags($tLang->lang('mt_site_detail', $args)); GWF_Website::setMetaDescr($tLang->lang('md_site_detail', $args));
echo wcProfileOwnLinks($u, $mod_links); } # Challs if (WC_Challenge::getScoreForUser($u) > 0) { Module_WeChall::includeForums(); // GWF_Module::getModule('Forum')->onInclude(); # Profile Challs $method = $wechall->getMethod('ChallsProfile'); $method instanceof WeChall_ChallsProfile; echo $method->templateChalls($u); # Created By if ($u->getID() !== '1') { $method = $wechall->getMethod('Challs'); $method instanceof WeChall_Challs; echo $method->templateChalls(false, $u->getID(), '', '', '', false, false); } } # Guestbook echo wcProfileGuestbook($u); # Groups echo wcProfileUsergroup($u, GWF_User::isLoggedIn()); GWF_Website::setPageTitle($tLang->lang('pt_profile', array($u->displayUsername()))); GWF_Website::setMetaDescr($tLang->lang('md_profile', array($u->displayUsername()))); GWF_Website::addMetaDescr(' ' . GWF_Module::getModule('WeChall')->getMethod('API_Bot')->showGlobal($u->getVar('user_name'))); //$tags = ''; //foreach ($regats as $regat) //{ // $regat instanceof WC_RegAt; // $tags .= ', '.$regat->getSite()->displayName(); //} //GWF_Website::addMetaTags($tags);
if (defined('WC_HTML_HEAD__DEFINED')) { return; } $_GET['mo'] = 'WeChall'; $_GET['me'] = 'null'; require_once 'protected/config.php'; require_once '../gwf3.class.php'; $gwf = new GWF3(dirname(dirname(__FILE__) . '../'), array('init' => true, 'bootstrap' => false, 'website_init' => true, 'autoload_modules' => true, 'load_module' => false, 'load_config' => false, 'start_debug' => true, 'get_user' => true, 'do_logging' => true, 'log_request' => true, 'blocking' => !defined('GWF_SESSION_NOT_BLOCKING'), 'no_session' => false, 'store_last_url' => true, 'ignore_user_abort' => true)); if (false === ($wechall = GWF_Module::loadModuleDB('WeChall', true, true))) { die('GWF3/WC5 not installed?'); } //$error = GWF_Module::startup(); if (defined('GWF_PAGE_TITLE')) { GWF_Website::setPageTitle(GWF_PAGE_TITLE); GWF_Website::setMetaDescr(GWF_PAGE_TITLE . ' challenge on WeChall'); GWF_Website::setMetaTags(GWF_PAGE_TITLE . ', Challenge, WeChall'); } # Include Needed Modules //GWF_Module::getModule('Votes', true); GWF_Module::loadModuleDB('Forum', true); //GWF_Module::getModule('WeChall', true)->onLoadLanguage(); require_once GWF_CORE_PATH . 'module/WeChall/WC_ChallSolved.php'; //GWF_ForumBoard::init(true); if (isset($_GET['ajax'])) { GWF_Website::plaintext(); return; } $mb = WC_HTML::wantFooter() ? ' style="margin-bottom: -48px;"' : ''; # HTML Header //echo GWF_Website::getPagehead();
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); }
private function overview() { if ($this->tag === '') { $tag_title = $this->module->lang('pt_links'); GWF_Website::setPageTitle($this->module->lang('pt_links')); GWF_Website::setMetaTags($this->module->lang('mt_links')); GWF_Website::setMetaDescr($this->module->lang('md_links')); } else { $dtag = GWF_HTML::display($this->tag); $tag_title = $this->module->lang('pt_linksec', array($dtag)); GWF_Website::setPageTitle($this->module->lang('pt_linksec', array($dtag))); GWF_Website::setMetaTags($this->module->lang('mt_linksec', array($dtag))); GWF_Website::setMetaDescr($this->module->lang('md_linksec', array($dtag))); } $with_votes = GWF_Session::isLoggedIn() ? true : $this->module->cfgGuestVotes(); // $sortURLNew = $this->module->getMethodURL('NewLinks', '&by=%BY%&dir=%DIR%&page=1'); $tVars = array('cloud' => $this->module->templateCloud(), 'search' => '', 'new_link_count' => $this->module->countUnread(GWF_Session::getUser()), 'links' => $this->module->templateLinks($this->links, $this->sortURL, $this->by, $this->dir, false, false, false, $with_votes), 'page_menu' => $this->pagemenu, 'href_add' => $this->hrefAdd, 'href_search' => GWF_WEB_ROOT . 'link/search', 'href_new_links' => GWF_WEB_ROOT . 'index.php?mo=Links&me=NewLinks', 'href_mark_read' => GWF_WEB_ROOT . 'index.php?mo=Links&me=NewLinks&markread=all', 'may_add_link' => $this->hrefAdd !== false, 'tag_title' => $tag_title, 'text_add' => $this->add_link_text); return $this->module->templatePHP('overview.php', $tVars); }