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:
@@ -11,7 +11,7 @@ trait DetailPage
|
|||||||
|
|
||||||
private $subject = null; // so it will not get cached
|
private $subject = null; // so it will not get cached
|
||||||
|
|
||||||
function generateCacheKey()
|
protected function generateCacheKey()
|
||||||
{
|
{
|
||||||
// mode, type, typeId, localeId, category, filter
|
// mode, type, typeId, localeId, category, filter
|
||||||
$key = [$this->mode, $this->type, $this->typeId, User::$localeId, '-1', '-1'];
|
$key = [$this->mode, $this->type, $this->typeId, User::$localeId, '-1', '-1'];
|
||||||
@@ -31,7 +31,7 @@ trait ListPage
|
|||||||
protected $typeId = 0;
|
protected $typeId = 0;
|
||||||
protected $filter = [];
|
protected $filter = [];
|
||||||
|
|
||||||
function generateCacheKey()
|
protected function generateCacheKey()
|
||||||
{
|
{
|
||||||
// mode, type, typeId, localeId,
|
// mode, type, typeId, localeId,
|
||||||
$key = [$this->mode, $this->type, '-1', User::$localeId];
|
$key = [$this->mode, $this->type, '-1', User::$localeId];
|
||||||
@@ -62,6 +62,8 @@ class GenericPage
|
|||||||
protected $css = [];
|
protected $css = [];
|
||||||
|
|
||||||
// private vars don't get cached
|
// private vars don't get cached
|
||||||
|
private $time = 0;
|
||||||
|
private $isCached = false;
|
||||||
private $cacheDir = 'cache/template/';
|
private $cacheDir = 'cache/template/';
|
||||||
private $jsgBuffer = [];
|
private $jsgBuffer = [];
|
||||||
private $gLocale = [];
|
private $gLocale = [];
|
||||||
@@ -71,6 +73,8 @@ class GenericPage
|
|||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$this->time = microtime(true);
|
||||||
|
|
||||||
// restricted access
|
// restricted access
|
||||||
if ($this->restrictedGroups && !User::isInGroup($this->restrictedGroups))
|
if ($this->restrictedGroups && !User::isInGroup($this->restrictedGroups))
|
||||||
$this->error();
|
$this->error();
|
||||||
@@ -158,6 +162,8 @@ class GenericPage
|
|||||||
|
|
||||||
$this->saveCache();
|
$this->saveCache();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
$this->isCached = true;
|
||||||
|
|
||||||
if (isset($this->type) && isset($this->typeId))
|
if (isset($this->type) && isset($this->typeId))
|
||||||
$this->gPageInfo = array( // varies slightly for special pages like maps, user-dashboard or profiler
|
$this->gPageInfo = array( // varies slightly for special pages like maps, user-dashboard or profiler
|
||||||
@@ -172,6 +178,7 @@ class GenericPage
|
|||||||
if (!empty($this->hasComContent)) // get comments, screenshots, videos
|
if (!empty($this->hasComContent)) // get comments, screenshots, videos
|
||||||
$this->community = CommunityContent::getAll($this->type, $this->typeId);
|
$this->community = CommunityContent::getAll($this->type, $this->typeId);
|
||||||
|
|
||||||
|
$this->time = microtime(true) - $this->time;
|
||||||
$this->mysql = DB::Aowow()->getStatistics();
|
$this->mysql = DB::Aowow()->getStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +278,7 @@ class GenericPage
|
|||||||
'status' => 1,
|
'status' => 1,
|
||||||
'name' => 'internal error',
|
'name' => 'internal error',
|
||||||
'style' => 'padding-left: 40px; background-image: url(static/images/announcements/warn-small.png); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
'style' => 'padding-left: 40px; background-image: url(static/images/announcements/warn-small.png); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
||||||
'text' => '[span id=inputbox-error]'.implode("<br>", $_).'[/span]',
|
'text' => '[span id=inputbox-error]'.implode("[br]", $_).'[/span]',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,25 +314,11 @@ class GenericPage
|
|||||||
/*******************/
|
/*******************/
|
||||||
|
|
||||||
public function notFound($typeStr) // unknown ID
|
public function notFound($typeStr) // unknown ID
|
||||||
{
|
|
||||||
if ($this->mode == CACHETYPE_TOOLTIP)
|
|
||||||
{
|
|
||||||
header('Content-type: application/x-javascript; charset=utf-8');
|
|
||||||
echo $this->generateTooltip(true);
|
|
||||||
}
|
|
||||||
else if ($this->mode == CACHETYPE_XML)
|
|
||||||
{
|
|
||||||
header('Content-type: text/xml; charset=utf-8');
|
|
||||||
echo $this->generateXML(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$this->typeStr = $typeStr;
|
$this->typeStr = $typeStr;
|
||||||
$this->mysql = DB::Aowow()->getStatistics();
|
$this->mysql = DB::Aowow()->getStatistics();
|
||||||
|
|
||||||
$this->display('text-page-generic');
|
$this->display('text-page-generic');
|
||||||
}
|
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,28 +356,6 @@ class GenericPage
|
|||||||
include('template/pages/'.$override.'.tpl.php');
|
include('template/pages/'.$override.'.tpl.php');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
else 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
|
else
|
||||||
{
|
{
|
||||||
$this->prepareContent();
|
$this->prepareContent();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class ItemList extends BaseType
|
|||||||
private $vendors = [];
|
private $vendors = [];
|
||||||
private $jsGlobals = []; // getExtendedCost creates some and has no access to template
|
private $jsGlobals = []; // getExtendedCost creates some and has no access to template
|
||||||
|
|
||||||
protected $queryBase = 'SELECT i.*, `is`.*, i.id AS ARRAY_KEY FROM ?_items i';
|
protected $queryBase = 'SELECT i.*, `is`.*, i.id AS id, i.id AS ARRAY_KEY FROM ?_items i';
|
||||||
protected $queryOpts = array(
|
protected $queryOpts = array(
|
||||||
'is' => ['j' => ['?_item_stats AS `is` ON `is`.`id` = `i`.`id`', true]],
|
'is' => ['j' => ['?_item_stats AS `is` ON `is`.`id` = `i`.`id`', true]],
|
||||||
's' => ['j' => ['?_spell AS `s` ON s.effect1CreateItemId = i.id', true], 'g' => 'i.id'],
|
's' => ['j' => ['?_spell AS `s` ON s.effect1CreateItemId = i.id', true], 'g' => 'i.id'],
|
||||||
@@ -1291,24 +1291,34 @@ class ItemList extends BaseType
|
|||||||
{
|
{
|
||||||
$jsonEquip = [];
|
$jsonEquip = [];
|
||||||
$jsonText = [];
|
$jsonText = [];
|
||||||
|
$enchIds = [];
|
||||||
|
|
||||||
for ($i = 1; $i < 6; $i++)
|
for ($i = 1; $i < 6; $i++)
|
||||||
{
|
{
|
||||||
$enchId = $data['enchantId'.$i];
|
$enchId = $data['enchantId'.$i];
|
||||||
|
|
||||||
if ($enchId <= 0)
|
if ($enchId <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// subitems may share enchantmentIds
|
if (isset($this->rndEnchIds[$enchId]))
|
||||||
if (!isset($this->rndEnchIds[$enchId]))
|
continue;
|
||||||
|
|
||||||
|
$enchIds[] = $enchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Util::parseItemEnchantment($enchIds, false, $misc) as $eId => $stats)
|
||||||
{
|
{
|
||||||
$stats = Util::parseItemEnchantment($enchId, false, $misc);
|
$this->rndEnchIds[$eId] = array(
|
||||||
$this->rndEnchIds[$enchId] = array(
|
'text' => $misc[$eId]['name'],
|
||||||
'text' => $misc[$enchId]['name'],
|
|
||||||
'stats' => $stats
|
'stats' => $stats
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ($i = 1; $i < 6; $i++)
|
||||||
|
{
|
||||||
|
$enchId = $data['enchantId'.$i];
|
||||||
|
if ($enchId <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if ($data['allocationPct'.$i] > 0) // RandomSuffix: scaling Enchantment; enchId < 0
|
if ($data['allocationPct'.$i] > 0) // RandomSuffix: scaling Enchantment; enchId < 0
|
||||||
{
|
{
|
||||||
$qty = intVal($data['allocationPct'.$i] * $this->generateEnchSuffixFactor());
|
$qty = intVal($data['allocationPct'.$i] * $this->generateEnchSuffixFactor());
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ class WorldEventList extends BaseType
|
|||||||
|
|
||||||
protected $queryBase = 'SELECT *, -e.id as id, -e.id AS ARRAY_KEY FROM ?_events e';
|
protected $queryBase = 'SELECT *, -e.id as id, -e.id AS ARRAY_KEY FROM ?_events e';
|
||||||
protected $queryOpts = array(
|
protected $queryOpts = array(
|
||||||
'e' => ['j' => ['?_holidays h2 ON e.holidayId = h2.id', true], 'o' => '-e.id ASC'],
|
'e' => [['h']],
|
||||||
'h' => ['j' => ['?_holidays h ON e.holidayId = h.id']]
|
'h' => ['j' => ['?_holidays h ON e.holidayId = h.id', true], 'o' => '-e.id ASC']
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct($conditions = [])
|
public function __construct($conditions = [])
|
||||||
|
|||||||
@@ -407,6 +407,31 @@ class AchievementPage extends GenericPage
|
|||||||
|
|
||||||
return $x;
|
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();
|
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->addJS('?data=weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
|
||||||
$this->hasGroupedTabs = false;
|
$this->hasGroupedTabs = false;
|
||||||
|
|
||||||
|
$conditions = [];
|
||||||
|
|
||||||
/*******************/
|
/*******************/
|
||||||
/* evaluate filter */
|
/* evaluate filter */
|
||||||
/*******************/
|
/*******************/
|
||||||
@@ -415,6 +417,9 @@ class ItemsPage extends GenericPage
|
|||||||
{
|
{
|
||||||
array_unshift($this->title, $this->name);
|
array_unshift($this->title, $this->name);
|
||||||
|
|
||||||
|
if (!$this->category)
|
||||||
|
return;
|
||||||
|
|
||||||
if (isset($this->category[2]))
|
if (isset($this->category[2]))
|
||||||
$tPart = Lang::$item['cat'][$this->category[0]][1][$this->category[1]][1][$this->category[2]];
|
$tPart = Lang::$item['cat'][$this->category[0]][1][$this->category[1]][1][$this->category[2]];
|
||||||
else if (isset($this->category[1]))
|
else if (isset($this->category[1]))
|
||||||
|
|||||||
@@ -491,6 +491,31 @@ class ObjectPage extends GenericPage
|
|||||||
|
|
||||||
return $x;
|
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]
|
[7952, 33554], null, [16264, 33557], [17584, 33657]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/***********/
|
/***********/
|
||||||
/* Infobox */
|
/* Infobox */
|
||||||
/***********/
|
/***********/
|
||||||
|
|
||||||
$infobox = []; // unfortunately, all of this is custom data :/
|
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
|
||||||
|
|
||||||
// side
|
// side
|
||||||
if ($_ = $this->subject->getField('side'))
|
if ($_ = $this->subject->getField('side'))
|
||||||
|
|||||||
2288
pages/search.php
2288
pages/search.php
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,11 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
die('illegal access');
|
die('illegal access');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
icons: data/interface/calendar/calendar_[a-z]start.blp
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// menuId 10: Title g_initPath()
|
// menuId 10: Title g_initPath()
|
||||||
// tabId 0: Database g_initHeader()
|
// tabId 0: Database g_initHeader()
|
||||||
class TitlePage extends GenericPage
|
class TitlePage extends GenericPage
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
<div id="footer">
|
<div id="footer">
|
||||||
<?php
|
<?php
|
||||||
if (isset($this->mysql)):
|
if ($this->time || isset($this->mysql) || $this->isCached):
|
||||||
echo Lang::$main['numSQL'] . Lang::$main['colon']. $this->mysql['count']."<br>\n";
|
echo "<table style=\"margin:auto;\">\n";
|
||||||
echo Lang::$main['timeSQL']. Lang::$main['colon']. Util::formatTime($this->mysql['time'] * 1000)."\n";
|
|
||||||
|
if (isset($this->mysql)):
|
||||||
|
echo '<tr><td style="text-align:left;">'.Lang::$main['numSQL'] .'</td><td>'.$this->mysql['count']."</td></tr>\n";
|
||||||
|
echo '<tr><td style="text-align:left;">'.Lang::$main['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n";
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ($this->time):
|
||||||
|
echo '<tr><td style="text-align:left;">Page generated in</td><td>'.Util::formatTime($this->time * 1000, true)."</td></tr>\n";
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ($this->isCached):
|
||||||
|
echo "<tr><td style=\"text-align:left;\">(rebuild from cache)</td><td></td></tr>\n";
|
||||||
|
endif;
|
||||||
|
|
||||||
|
echo "</table>\n";
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ foreach ($vars as $id => $data):
|
|||||||
'};';
|
'};';
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
if (isset($extra[$this->typeId])):
|
if (isset($this->typeId) && !empty($extra[$this->typeId])):
|
||||||
echo '_['.$extra[$this->typeId]['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($extra[$this->typeId]['tooltip']).'\';';
|
echo '_['.$extra[$this->typeId]['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($extra[$this->typeId]['tooltip']).'\';';
|
||||||
echo '_['.$extra[$this->typeId]['id'].'].spells_'.User::$localeString.' = '.json_encode($extra[$this->typeId]['spells'], JSON_NUMERIC_CHECK).';';
|
echo '_['.$extra[$this->typeId]['id'].'].spells_'.User::$localeString.' = '.json_encode($extra[$this->typeId]['spells'], JSON_NUMERIC_CHECK).';';
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<div id="layers"></div>
|
<div id="layers"></div>
|
||||||
<div id="home">
|
<div id="home">
|
||||||
|
|
||||||
<?php $this->brick('announcements'); ?>
|
<?php $this->brick('announcement'); ?>
|
||||||
|
|
||||||
<span id="menu_buttons-generic" class="menu-buttons"></span>
|
<span id="menu_buttons-generic" class="menu-buttons"></span>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="maintenance">
|
<div class="maintenance">
|
||||||
<div>The website is currently closed for maintenance.</div>
|
<div>The website is currently closed for maintenance.</div>
|
||||||
<p>It will take a few minutes...</p>
|
<p>This will take a few minutes...</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
{include file='header.tpl'}
|
|
||||||
|
|
||||||
<div id="main">
|
|
||||||
<div id="main-precontents"></div>
|
|
||||||
<div class="main-contents" id="main-contents">
|
|
||||||
|
|
||||||
{if !empty($announcements)}
|
|
||||||
{foreach from=$announcements item=item}
|
|
||||||
{include file='bricks/announcement.tpl' an=$item}
|
|
||||||
{/foreach}
|
|
||||||
{/if}
|
|
||||||
<div class="text">
|
|
||||||
<a href="{$wowhead}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
|
||||||
{if !empty($found)}
|
|
||||||
<h1>{$lang.foundResult} <i>{$search|escape:"html"}</i>{if $ignored}<span class="sub">{$lang.ignoredTerms|sprintf:$ignored}</span>{/if}</h1>
|
|
||||||
</div>
|
|
||||||
<div id="tabs-generic"></div>
|
|
||||||
<div id="lv-generic" class="listview"></div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var myTabs = new Tabs({ldelim}parent: $WH.ge('tabs-generic'){rdelim});
|
|
||||||
{foreach from=$found item="f"}
|
|
||||||
{include file="listviews/`$f.file`.tpl" data=$f.data params=$f.params}
|
|
||||||
{/foreach}
|
|
||||||
myTabs.flush();
|
|
||||||
</script>
|
|
||||||
{else}
|
|
||||||
<h1>{$lang.noResult} <i>{$search|escape:"html"}</i>{if $ignored}<span class="sub">{$lang.ignoredTerms|sprintf:$ignored}</span>{/if}</h1>
|
|
||||||
<div class="search-noresults"/></div>
|
|
||||||
|
|
||||||
{$lang.tryAgain}
|
|
||||||
{/if}
|
|
||||||
<div class="clear"></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{include file='footer.tpl'}
|
|
||||||
51
template/pages/search.tpl.php
Normal file
51
template/pages/search.tpl.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php $this->brick('header'); ?>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<div id="main-precontents"></div>
|
||||||
|
<div class="main-contents" id="main-contents">
|
||||||
|
|
||||||
|
<?php $this->brick('announcement'); ?>
|
||||||
|
|
||||||
|
<div class="text">
|
||||||
|
<a href="<?php echo Util::$wowheadLink; ?>" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||||
|
<?php
|
||||||
|
if ($this->lvData):
|
||||||
|
echo ' <h1>'.Lang::$search['foundResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
|
||||||
|
if ($this->invalid):
|
||||||
|
echo '<span class="sub">'.sprintf(Lang::$search['ignoredTerms'], implode(', ', $this->invalid)).'</span>';
|
||||||
|
endif;
|
||||||
|
echo "</h1>\n";
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div id="tabs-generic"></div>
|
||||||
|
<div id="lv-generic" class="listview"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var myTabs = new Tabs({parent: $WH.ge('tabs-generic')});
|
||||||
|
<?php
|
||||||
|
foreach ($this->lvData as $lv):
|
||||||
|
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
|
||||||
|
endforeach;
|
||||||
|
?>
|
||||||
|
myTabs.flush();
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
else:
|
||||||
|
echo ' <h1>'.Lang::$search['noResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
|
||||||
|
if ($this->invalid):
|
||||||
|
echo '<span class="sub">'.sprintf(Lang::$search['ignoredTerms'], implode(', ', $this->invalid)).'</span>';
|
||||||
|
endif;
|
||||||
|
echo "</h1>\n";
|
||||||
|
?>
|
||||||
|
<div class="search-noresults"/></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo ' '.Lang::$search['tryAgain']."\n";
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $this->brick('footer'); ?>
|
||||||
Reference in New Issue
Block a user