Fixed i18n stuff
[vanilla-miry.git] / categories.php
blob82e52e9a9947887775eff030e72d2acd04215160
1 <?php
2 /*
3 * Copyright 2003 Mark O'Sullivan
4 * This file is part of Vanilla.
5 * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
6 * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7 * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8 * The latest source code for Vanilla is available at www.lussumo.com
9 * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
11 * Description: Display and manipulate discussions
14 include("appg/settings.php");
15 $Configuration['SELF_URL'] = 'categories.php';
16 include("appg/init_vanilla.php");
18 // 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE
20 // Ensure the user is allowed to view this page
21 $Context->Session->Check($Context);
22 if (!$Configuration["USE_CATEGORIES"]) {
23 //@todo: Should the process die here?
24 Redirect(GetUrl($Configuration, "index.php"), '302', '', 0);
27 // Define properties of the page controls that are specific to this page
28 $Head->BodyId = 'CategoryPage';
29 $Menu->CurrentTab = "categories";
30 $Panel->CssClass = "CategoryPanel";
31 $Panel->BodyCssClass = "Categories";
32 $Context->PageTitle = $Context->GetDefinition("Categories");
34 // 2. BUILD PAGE CONTROLS
36 // Add the category list to the body
37 $CategoryList = $Context->ObjectFactory->CreateControl($Context, "CategoryList");
39 // 3. ADD CONTROLS TO THE PAGE
41 $Page->AddRenderControl($Head, $Configuration["CONTROL_POSITION_HEAD"]);
42 $Page->AddRenderControl($Menu, $Configuration["CONTROL_POSITION_MENU"]);
43 $Page->AddRenderControl($Panel, $Configuration["CONTROL_POSITION_PANEL"]);
44 $Page->AddRenderControl($NoticeCollector, $Configuration['CONTROL_POSITION_NOTICES']);
45 $Page->AddRenderControl($CategoryList, $Configuration["CONTROL_POSITION_BODY_ITEM"]);
46 $Page->AddRenderControl($Foot, $Configuration["CONTROL_POSITION_FOOT"]);
47 $Page->AddRenderControl($PageEnd, $Configuration["CONTROL_POSITION_PAGE_END"]);
49 // 4. FIRE PAGE EVENTS
51 $Page->FireEvents();