function OnPrePageLoad() { /* @var $competition Competition */ # set up page $this->SetPageTitle("Statistics for " . $this->competition->GetName() . ", All seasons"); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
function OnPrePageLoad() { $this->content = new XhtmlElement("div"); $category = $this->DisplayCompetitions($this->content); if (!$category) { $category = "Stoolball "; } $this->SetPageTitle("{$category} leagues and competitions"); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
function OnPrePageLoad() { $title = "Statistics at " . $this->ground->GetNameAndTown() . ' stoolball ground'; if ($this->season) { $title .= " in the {$this->season} season"; } $this->SetPageTitle($title); $this->SetContentConstraint(StoolballPage::ConstrainBox()); $this->SetContentCssClass('stats'); }
function OnPrePageLoad() { # set up page $this->SetOpenGraphType("sports_league"); $this->SetPageTitle("League table for the " . $this->season->GetCompetitionName()); require_once "search/competition-search-adapter.class.php"; $adapter = new CompetitionSearchAdapter($this->competition); $this->SetPageDescription($adapter->GetSearchDescription()); $this->SetContentConstraint(StoolballPage::ConstrainBox()); $this->SetContentCssClass("season-table"); }
function OnPrePageLoad() { if ($this->page_not_found) { $this->SetPageTitle('Page not found'); return; } $title = "Statistics for the " . $this->tournament->GetTitle() . ", " . Date::BritishDate($this->tournament->GetStartTime()); $this->SetPageTitle($title); $this->SetContentConstraint(StoolballPage::ConstrainBox()); $this->SetContentCssClass('stats'); }
function OnPrePageLoad() { $title = "Stoolball tournaments"; if ($this->player_type) { $this->player_type_text = PlayerType::Text($this->player_type) . " "; if ($this->player_type == PlayerType::JUNIOR_MIXED) { $this->player_type_text = "Junior "; } $title = $this->player_type_text . strtolower($title); } $this->SetPageTitle($title); $this->SetPageDescription("See all the " . strtolower($this->player_type_text) . " stoolball tournaments taking place in the next year."); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
function OnPrePageLoad() { $title = "Team statistics for " . $this->team->GetNameAndType() . ' stoolball team'; if ($this->season) { $title .= " in the {$this->season} season"; } $this->SetPageTitle($title); $this->SetContentConstraint(StoolballPage::ConstrainBox()); $this->SetContentCssClass('stats'); $this->LoadClientScript("/scripts/lib/chart.min.js"); $this->LoadClientScript("/scripts/chart.js?v=2"); $this->LoadClientScript("/scripts/lib/Chart.StackedBar.js"); $this->LoadClientScript("team.js", true); ?> <!--[if lte IE 8]><script src="/scripts/lib/excanvas.compiled.js"></script><![endif]--><?php }
function OnPrePageLoad() { if ($this->page_not_found) { $this->SetPageTitle('Page not found'); return; } $title = "Statistics for " . $this->match->GetTitle() . ", " . Date::BritishDate($this->match->GetStartTime(), false); $this->SetPageTitle($title); $this->SetContentConstraint(StoolballPage::ConstrainBox()); if ($this->has_statistics) { $this->LoadClientScript("/scripts/lib/chart.min.js"); $this->LoadClientScript("/scripts/chart.js?v=2"); $this->LoadClientScript("/play/statistics/match.js"); ?> <!--[if lte IE 8]><script src="/scripts/lib/excanvas.compiled.js"></script><![endif]--> <?php } }
function OnPrePageLoad() { if ($this->player_type === null) { $title = 'Stoolball teams'; } if ($this->player_type === PlayerType::LADIES) { $title = "Ladies' stoolball teams"; } if ($this->player_type === PlayerType::MIXED) { $title = 'Mixed stoolball teams'; } if ($this->player_type === PlayerType::JUNIOR_MIXED) { $title = "Junior stoolball teams"; } if ($this->player_type === 0) { $title = 'Past stoolball teams'; } if (is_array($this->teams) and count($this->teams)) { $title .= " in " . $this->teams[0]->GetGround()->GetAddress()->GetAdministrativeArea(); } $this->SetPageTitle($title); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
function OnPrePageLoad() { # set up page $this->SetPageTitle("Statistics for " . $this->season->GetCompetitionName()); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
function OnPrePageLoad() { $this->SetPageTitle($this->statistic->Title() . " {$this->filter}"); $this->SetPageDescription($this->statistic->Description()); $this->SetContentConstraint(StoolballPage::ConstrainBox()); $this->LoadClientScript("/scripts/lib/jquery-ui-1.8.11.custom.min.js"); $this->LoadClientScript("/play/statistics/statistics-filter.js"); ?> <link rel="stylesheet" href="/css/custom-theme/jquery-ui-1.8.11.custom.css" media="screen" /> <?php }
function OnPrePageLoad() { $this->SetPageTitle('Stoolball matches'); $this->SetContentConstraint(StoolballPage::ConstrainBox()); }
/** * Fires immediately after the body element is opened * */ protected function OnBodyOpened() { $mobile_logo = '<img src="' . $this->resource_root . '/images/logos/138x40-trans.png" width="138" height="40" alt="Go to the Stoolball England home page" class="small screen logo-small" /> <img src="' . $this->resource_root . '/images/logos/210x61-trans.png" width="210" height="61" alt="Go to the Stoolball England home page" class="print logo" />'; if (SiteContext::IsWordPress() and is_home()) { echo $mobile_logo; } else { echo '<a href="/">' . $mobile_logo . '</a>'; } ?> <form id="handle" action="/search/" method="get" class="large"><div><input id="search" type="search" name="q" value="<?php if (isset($_GET['q'])) { echo htmlentities($_GET['q'], ENT_QUOTES, "UTF-8", false); } ?> " /> <input type="submit" value="Search" id="go" /></div> </form> <div id="bat1"></div> <?php if ($this->GetContentCssClass()) { echo '<div id="board" class="' . $this->GetContentCssClass() . '">'; } else { echo '<div id="board">'; } ?> <div id="boardLeft"> <div id="boardRight"> <?php # build navbar and add to control tree $o_current = $this->GetContext()->GetByHierarchyLevel(2); $b_got_category = is_object($o_current); $b_section_home = ($this->GetContext()->GetDepth() == 2 and str_replace("/", "", $_SERVER['REQUEST_URI']) == $o_current->GetUrl()); $o_news = new XhtmlElement('a', 'News'); $o_rules = new XhtmlElement('a', 'Rules'); $o_play = new XhtmlElement('a', 'Play!'); $schools = new XhtmlElement('a', 'Schools'); $o_about = new XhtmlElement('a', 'About <span class="large"> Us</span>'); $search = new XhtmlElement('a', 'Search'); if ($b_got_category and $o_current->GetUrl() == 'news' or SiteContext::IsWordPress() and (is_single() or is_archive() and !is_category())) { if (!$b_section_home) { $o_news->AddAttribute('href', '/news'); $o_news->AddAttribute('role', 'menuitem'); $o_news->SetCssClass('current'); } else { $o_news->SetElementName('em'); } } else { $o_news->AddAttribute('href', '/news'); } if ($b_got_category and $o_current->GetUrl() == 'rules') { if (!$b_section_home) { $o_rules->AddAttribute('href', '/rules'); $o_rules->AddAttribute('role', 'menuitem'); $o_rules->SetCssClass('current'); } else { $o_rules->SetElementName('em'); } } else { $o_rules->AddAttribute('href', '/rules'); } if ($b_got_category and $o_current->GetUrl() == 'play') { if (!$b_section_home) { $o_play->AddAttribute('href', '/play'); $o_play->AddAttribute('role', 'menuitem'); $o_play->SetCssClass('current'); } else { $o_play->SetElementName('em'); } } else { $o_play->AddAttribute('href', '/play'); } if ($b_got_category and $o_current->GetUrl() == 'schools') { if (!$b_section_home) { $schools->AddAttribute('href', '/schools'); $schools->AddAttribute('role', 'menuitem'); $schools->SetCssClass('current'); } else { $schools->SetElementName('em'); } } else { $schools->AddAttribute('href', '/schools'); } if ($b_got_category and $o_current->GetUrl() == 'about') { if (!$b_section_home) { $o_about->AddAttribute('href', '/about'); $o_about->AddAttribute('role', 'menuitem'); $o_about->SetCssClass('current'); } else { $o_about->SetElementName('em'); } } else { $o_about->AddAttribute('href', '/about'); } if ($b_got_category and $o_current->GetUrl() == 'search') { if (!$b_section_home) { $search->AddAttribute('href', '/search'); $search->AddAttribute('role', 'menuitem'); $search->SetCssClass('current'); } else { $search->SetElementName('em'); } } else { $search->AddAttribute('href', '/search'); } ?> <nav> <ul class="menu screen" role="menubar"> <?php echo ''; echo '<li id="news">' . $o_news . '</li>'; echo '<li id="rules">' . $o_rules . '</li>'; echo '<li id="play">' . $o_play . '</li>'; echo '<li id="schools">' . $schools . '</li>'; echo '<li id="about">' . $o_about . '</li>'; echo '<li class="search small">' . $search . '</li>'; echo ''; ?> </ul> </nav> <div id="bat2" class="large"> <div id="involved"></div> <ul> <li><a href="/rules/what-is-stoolball">What is stoolball?</a></li> <li><a href="/rules">Learn the rules</a></li> <li><a href="/teams/map">Map of teams</a></li> </ul> </div> <div id="content" class="content"> <?php # add content if ($this->i_constraint_type != StoolballPage::ConstrainNone()) { switch ($this->i_constraint_type) { case StoolballPage::ConstrainText(): echo '<div id="constraint" class="constrainText">'; break; case StoolballPage::ConstrainColumns(): case StoolballPage::ConstrainBox(): echo '<div id="constraint" class="constrainColumns">'; break; } } if ($this->i_constraint_type == StoolballPage::ConstrainColumns()) { echo '<div class="supportedContentContainer"><div class="supportedContent">'; $this->b_col1_open = true; } $this->Render(); }