mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- reimplemented Utilities-Page and Account-Page - moved account-ajax to ajaxHandler - AjaxHandler::handle() can no longer call itself, if the parameter is empty - cache is now compressed (has a negligible delay) - revisited User-Class / Accounts: * implemented mail-confirmation (be sure to configure your server appropriately) * implemented recovery of password or username * there are now 3 options to auth against: 1) aowow-DB (default); 2) wow-auth-DB; 3) user-defined script (SOAP or similar exotic methods) * dropped the aowow-cookie, it relies on php-sessions now * reworked how bans are handled (can now also ban from upload, rate, comment) - fixed enhancements on itemTooltips account related localization for FR, ES and RU is lacking (help is appreciated) _account and _account_banned have changed and are incompatible with the prvious version
76 lines
2.3 KiB
PHP
76 lines
2.3 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
// the actual text is an article accessed by type + typeId
|
|
// menuId 2: More g_initPath()
|
|
// tabid 2: More g_initHeader()
|
|
|
|
class MorePage extends GenericPage
|
|
{
|
|
protected $tpl = 'text-page-generic';
|
|
protected $path = [2];
|
|
protected $tabId = 2;
|
|
protected $mode = CACHETYPE_NONE;
|
|
protected $js = ['swfobject.js'];
|
|
|
|
private $subPages = [ -13 => ['commenting-and-you', 'modelviewer', 'screenshots-tips-tricks', 'stat-weighting', 'talent-calculator', 'item-comparison', 'profiler']];
|
|
private $validPages = array( // [type, typeId, name]
|
|
'whats-new' => [ -7, 0, "What's New"],
|
|
'searchbox' => [-16, 0, 'Search Box'],
|
|
'tooltips' => [-10, 0, 'Tooltips'],
|
|
'faq' => [ -3, 0, 'Frequently Asked Questions'],
|
|
'aboutus' => [ 0, 0, 'What is AoWoW?'],
|
|
'searchplugins' => [ -8, 0, 'Search Plugins'],
|
|
'help' => [-13, null, '']
|
|
);
|
|
|
|
public function __construct($page, $subPage)
|
|
{
|
|
parent::__construct();
|
|
|
|
// chack if page is valid
|
|
if ($_ = @$this->validPages[$page])
|
|
{
|
|
// check if subpage is valid
|
|
if (!isset($_[1]))
|
|
{
|
|
if (($_[1] = array_search($subPage, $this->subPages[$_[0]])) === false)
|
|
$this->error();
|
|
|
|
if ($page == 'help') // ye.. hack .. class definitions only allow static values
|
|
$_[2] = Lang::$main['helpTopics'][$_[1]];
|
|
}
|
|
$this->type = $_[0];
|
|
$this->typeId = $_[1];
|
|
$this->name = $_[2];
|
|
$this->gPageInfo = array(
|
|
'type' => $this->type,
|
|
'typeId' => $this->typeId,
|
|
'name' => $this->name
|
|
);
|
|
}
|
|
else
|
|
$this->error();
|
|
}
|
|
|
|
protected function generatePath()
|
|
{
|
|
$this->path[] = abs($this->type);
|
|
|
|
if ($this->typeId > -1)
|
|
$this->path[] = $this->typeId;
|
|
}
|
|
|
|
protected function generateTitle()
|
|
{
|
|
array_unshift($this->title, $this->name);
|
|
}
|
|
|
|
protected function generateContent() {} // its just articles here
|
|
}
|
|
|
|
?>
|