mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removing smarty - part IX
- readded search - moved custom displayers (tooltip, xml) to subclasses - added more info to footer
This commit is contained in:
@@ -407,6 +407,31 @@ class AchievementPage extends GenericPage
|
||||
|
||||
return $x;
|
||||
}
|
||||
|
||||
public function display($override = '')
|
||||
{
|
||||
if ($this->mode != CACHETYPE_TOOLTIP)
|
||||
return parent::display($override);
|
||||
|
||||
if (!$this->loadCache($tt))
|
||||
{
|
||||
$tt = $this->generateTooltip();
|
||||
$this->saveCache($tt);
|
||||
}
|
||||
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
die($tt);
|
||||
}
|
||||
|
||||
public function notFound($typeStr)
|
||||
{
|
||||
if ($this->mode != CACHETYPE_TOOLTIP)
|
||||
return parent::notFound($typeStr);
|
||||
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
echo $this->generateTooltip(true);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1064,6 +1064,52 @@ class ItemPage extends genericPage
|
||||
|
||||
return $root->asXML();
|
||||
}
|
||||
|
||||
public function display($override = '')
|
||||
{
|
||||
if ($this->mode == CACHETYPE_TOOLTIP)
|
||||
{
|
||||
if (!$this->loadCache($tt))
|
||||
{
|
||||
$tt = $this->generateTooltip();
|
||||
$this->saveCache($tt);
|
||||
}
|
||||
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
die($tt);
|
||||
}
|
||||
else if ($this->mode == CACHETYPE_XML)
|
||||
{
|
||||
if (!$this->loadCache($xml))
|
||||
{
|
||||
$xml = $this->generateXML();
|
||||
$this->saveCache($xml);
|
||||
}
|
||||
|
||||
header('Content-type: text/xml; charset=utf-8');
|
||||
die($xml);
|
||||
}
|
||||
else
|
||||
return parent::display($override);
|
||||
}
|
||||
|
||||
public function notFound($typeStr)
|
||||
{
|
||||
if ($this->mode == CACHETYPE_TOOLTIP)
|
||||
{
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
echo $this->generateTooltip(true);
|
||||
exit();
|
||||
}
|
||||
else if ($this->mode == CACHETYPE_XML)
|
||||
{
|
||||
header('Content-type: text/xml; charset=utf-8');
|
||||
echo $this->generateXML(true);
|
||||
exit();
|
||||
}
|
||||
else
|
||||
return parent::notFound($typeStr);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -94,6 +94,8 @@ class ItemsPage extends GenericPage
|
||||
$this->addJS('?data=weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
|
||||
$this->hasGroupedTabs = false;
|
||||
|
||||
$conditions = [];
|
||||
|
||||
/*******************/
|
||||
/* evaluate filter */
|
||||
/*******************/
|
||||
@@ -415,6 +417,9 @@ class ItemsPage extends GenericPage
|
||||
{
|
||||
array_unshift($this->title, $this->name);
|
||||
|
||||
if (!$this->category)
|
||||
return;
|
||||
|
||||
if (isset($this->category[2]))
|
||||
$tPart = Lang::$item['cat'][$this->category[0]][1][$this->category[1]][1][$this->category[2]];
|
||||
else if (isset($this->category[1]))
|
||||
|
||||
@@ -491,6 +491,31 @@ class ObjectPage extends GenericPage
|
||||
|
||||
return $x;
|
||||
}
|
||||
|
||||
public function display($override = '')
|
||||
{
|
||||
if ($this->mode != CACHETYPE_TOOLTIP)
|
||||
return parent::display($override);
|
||||
|
||||
if (!$this->loadCache($tt))
|
||||
{
|
||||
$tt = $this->generateTooltip();
|
||||
$this->saveCache($tt);
|
||||
}
|
||||
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
die($tt);
|
||||
}
|
||||
|
||||
public function notFound($typeStr)
|
||||
{
|
||||
if ($this->mode != CACHETYPE_TOOLTIP)
|
||||
return parent::notFound($typeStr);
|
||||
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
echo $this->generateTooltip(true);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -51,12 +51,11 @@ class RacePage extends GenericPage
|
||||
[7952, 33554], null, [16264, 33557], [17584, 33657]
|
||||
);
|
||||
|
||||
|
||||
/***********/
|
||||
/* Infobox */
|
||||
/***********/
|
||||
|
||||
$infobox = []; // unfortunately, all of this is custom data :/
|
||||
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
|
||||
|
||||
// side
|
||||
if ($_ = $this->subject->getField('side'))
|
||||
|
||||
1332
pages/search.php
1332
pages/search.php
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,11 @@ if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
/*
|
||||
icons: data/interface/calendar/calendar_[a-z]start.blp
|
||||
*/
|
||||
|
||||
|
||||
// menuId 10: Title g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
class TitlePage extends GenericPage
|
||||
|
||||
Reference in New Issue
Block a user