mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removed templates for jsGlobals (they will now be written directly)
* as always, some bug fixes
This commit is contained in:
@@ -60,7 +60,7 @@ define('ACC_BAN_SCREENSHOT', 0x20); // cannot upload scr
|
||||
define('ACC_BAN_VIDEO', 0x40); // cannot suggest videos
|
||||
// define('ACC_BAN_FORUM', 0x80); // cannot use forums (not used here)
|
||||
|
||||
// Site Reputation/Priviledges
|
||||
// Site Reputation/Privileges
|
||||
define('SITEREP_ACTION_REGISTER', 1); // Registered account
|
||||
define('SITEREP_ACTION_DAILYVISIT', 2); // Daily visit
|
||||
define('SITEREP_ACTION_COMMENT', 3); // Posted comment
|
||||
|
||||
@@ -1810,8 +1810,8 @@ spells / buffspells = {
|
||||
|
||||
$extra[$id] = array(
|
||||
'id' => $id,
|
||||
'tooltip' => Util::jsEscape($tTip[0]),
|
||||
'buff' => @Util::jsEscape($buff[0]),
|
||||
'tooltip' => $tTip[0],
|
||||
'buff' => $buff[0],
|
||||
'spells' => $tTip[1],
|
||||
'buffspells' => @$buff[1]
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ if (!defined('AOWOW_REVISION'))
|
||||
*/
|
||||
|
||||
$lang = array(
|
||||
|
||||
// page variables
|
||||
'timeUnits' => array(
|
||||
'sg' => ["Jahr", "Monat", "Woche", "Tag", "Stunde", "Minute", "Sekunde", "Millisekunde"],
|
||||
|
||||
@@ -385,15 +385,50 @@ class GenericPage
|
||||
}
|
||||
}
|
||||
|
||||
public function gBrick($file, array $localVars = []) // load jsGlobal
|
||||
public function writeGlobalVars() // load jsGlobal
|
||||
{
|
||||
foreach ($localVars as $n => $v)
|
||||
$$n = $v;
|
||||
$buff = '';
|
||||
|
||||
if (!$this->isSaneInclude('template/globals/', $file))
|
||||
echo !User::isInGroup(U_GROUP_EMPLOYEE) ? "\n\nError: nonexistant template requested: template/globals/".$file.".tpl.php\n\n" : null;
|
||||
else
|
||||
include('template/globals/'.$file.'.tpl.php');
|
||||
foreach ($this->jsGlobals as $type => $struct)
|
||||
{
|
||||
$buff .= " var _ = ".$struct[0].';';
|
||||
|
||||
foreach ($struct[1] as $key => $data)
|
||||
{
|
||||
foreach ($data as $k => $v)
|
||||
{
|
||||
// localizes expected fields
|
||||
if (in_array($k, ['name', 'namefemale']))
|
||||
{
|
||||
$data[$k.'_'.User::$localeString] = $v;
|
||||
unset($data[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
$buff .= ' _['.(is_numeric($key) ? $key : "'".$key."'")."]=".json_encode($data, JSON_NUMERIC_CHECK).';';
|
||||
}
|
||||
|
||||
$buff .= "\n";
|
||||
|
||||
if (!empty($this->typeId) && !empty($struct[2][$this->typeId]))
|
||||
{
|
||||
$x = $struct[2][$this->typeId];
|
||||
|
||||
// spell
|
||||
if (!empty($x['tooltip'])) // spell + item
|
||||
$buff .= "\n _[".$x['id'].'].tooltip_'.User::$localeString.' = '.json_encode($x['tooltip']).";\n";
|
||||
if (!empty($x['buff'])) // spell
|
||||
$buff .= " _[".$x['id'].'].buff_'.User::$localeString.' = '.json_encode($x['buff']).";\n";
|
||||
if (!empty($x['spells'])) // spell + item
|
||||
$buff .= " _[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).";\n";
|
||||
if (!empty($x['buffspells'])) // spell
|
||||
$buff .= " _[".$x['id'].'].buffspells_'.User::$localeString.' = '.json_encode($x['buffspells'], JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
$buff .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return $buff;
|
||||
}
|
||||
|
||||
public function brick($file, array $localVars = []) // load brick
|
||||
@@ -472,25 +507,25 @@ class GenericPage
|
||||
return;
|
||||
|
||||
switch ($type)
|
||||
{ // [brickFile, [data], [extra]]
|
||||
case TYPE_NPC: $jsg[TYPE_NPC] = ['creature', [], []]; break;
|
||||
case TYPE_OBJECT: $jsg[TYPE_OBJECT] = ['object', [], []]; break;
|
||||
case TYPE_ITEM: $jsg[TYPE_ITEM] = ['item', [], []]; break;
|
||||
case TYPE_ITEMSET: $jsg[TYPE_ITEMSET] = ['itemset', [], []]; break;
|
||||
case TYPE_QUEST: $jsg[TYPE_QUEST] = ['quest', [], []]; break;
|
||||
case TYPE_SPELL: $jsg[TYPE_SPELL] = ['spell', [], []]; break;
|
||||
case TYPE_ZONE: $jsg[TYPE_ZONE] = ['zone', [], []]; break;
|
||||
case TYPE_FACTION: $jsg[TYPE_FACTION] = ['faction', [], []]; break;
|
||||
case TYPE_PET: $jsg[TYPE_PET] = ['pet', [], []]; break;
|
||||
case TYPE_ACHIEVEMENT: $jsg[TYPE_ACHIEVEMENT] = ['achievement', [], []]; break;
|
||||
case TYPE_TITLE: $jsg[TYPE_TITLE] = ['title', [], []]; break;
|
||||
case TYPE_WORLDEVENT: $jsg[TYPE_WORLDEVENT] = ['event', [], []]; break;
|
||||
case TYPE_CLASS: $jsg[TYPE_CLASS] = ['class', [], []]; break;
|
||||
case TYPE_RACE: $jsg[TYPE_RACE] = ['race', [], []]; break;
|
||||
case TYPE_SKILL: $jsg[TYPE_SKILL] = ['skill', [], []]; break;
|
||||
case TYPE_CURRENCY: $jsg[TYPE_CURRENCY] = ['currency', [], []]; break;
|
||||
{ // [varName, [data], [extra]]
|
||||
case TYPE_NPC: $jsg[TYPE_NPC] = ['g_npcs', [], []]; break;
|
||||
case TYPE_OBJECT: $jsg[TYPE_OBJECT] = ['g_objects', [], []]; break;
|
||||
case TYPE_ITEM: $jsg[TYPE_ITEM] = ['g_items', [], []]; break;
|
||||
case TYPE_ITEMSET: $jsg[TYPE_ITEMSET] = ['g_itemsets', [], []]; break;
|
||||
case TYPE_QUEST: $jsg[TYPE_QUEST] = ['g_quests', [], []]; break;
|
||||
case TYPE_SPELL: $jsg[TYPE_SPELL] = ['g_spells', [], []]; break;
|
||||
case TYPE_ZONE: $jsg[TYPE_ZONE] = ['g_gatheredzones', [], []]; break;
|
||||
case TYPE_FACTION: $jsg[TYPE_FACTION] = ['g_factions', [], []]; break;
|
||||
case TYPE_PET: $jsg[TYPE_PET] = ['g_pets', [], []]; break;
|
||||
case TYPE_ACHIEVEMENT: $jsg[TYPE_ACHIEVEMENT] = ['g_achievements', [], []]; break;
|
||||
case TYPE_TITLE: $jsg[TYPE_TITLE] = ['g_titles', [], []]; break;
|
||||
case TYPE_WORLDEVENT: $jsg[TYPE_WORLDEVENT] = ['g_holidays', [], []]; break;
|
||||
case TYPE_CLASS: $jsg[TYPE_CLASS] = ['g_classes', [], []]; break;
|
||||
case TYPE_RACE: $jsg[TYPE_RACE] = ['g_races', [], []]; break;
|
||||
case TYPE_SKILL: $jsg[TYPE_SKILL] = ['g_skills', [], []]; break;
|
||||
case TYPE_CURRENCY: $jsg[TYPE_CURRENCY] = ['g_gatheredcurrencies', [], []]; break;
|
||||
// well, this is awkward
|
||||
case TYPE_USER: $jsg[TYPE_USER] = ['user', [], []]; break;
|
||||
case TYPE_USER: $jsg[TYPE_USER] = ['g_users', [], []]; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2908,8 +2908,8 @@ var LANG = {
|
||||
votelogin_tip: "Ihr benötigt ein registriertes Konto, um Kommentare bewerten zu können. Bitte <a href=\"/account=signin\">meldet Euch an</a>, oder <a href=\"/account=signup\">registriert Euch</a>.",
|
||||
voteself_tip: "Ihr könnt Euren eigenen Kommentar nicht bewerten.",
|
||||
votedeleted_tip: "Gelöschte Kommentare können nicht bewertet werden.",
|
||||
upvotenorep_tip: "Ihr benötigt wenigstens <b>$1</b> <a href=\"/reputation\">Ruf</a>, um Kommentare positiv bewerten zu können.",
|
||||
downvotenorep_tip: "Ihr benötigt wenigstens <b>$1</b> <a href=\"/reputation\">Ruf</a>, um Kommentare negativ bewerten zu können.",
|
||||
upvotenorep_tip: "Ihr benötigt wenigstens <b>$1</b> <a href=\"?reputation\">Ruf</a>, um Kommentare positiv bewerten zu können.",
|
||||
downvotenorep_tip: "Ihr benötigt wenigstens <b>$1</b> <a href=\"?reputation\">Ruf</a>, um Kommentare negativ bewerten zu können.",
|
||||
stickycomment_tip: "Dieser Kommentar wurde von einem Moderator zu einem Sticky gemacht.",
|
||||
addreply_stc: "Antwort hinzufügen",
|
||||
show1morereply_stc: "1 weitere Antwort anzeigen",
|
||||
|
||||
@@ -2910,8 +2910,8 @@ var LANG = {
|
||||
votelogin_tip: "Debes crear una cuenta para votar en los comentarios. <a href=\"?account=signin\">Inicia sesión</a> o <a href=\"?account=signup\">crea una cuenta</a>.",
|
||||
voteself_tip: "No puedes votar en tu propio comentario.",
|
||||
votedeleted_tip: "No se puede votar en los comentarios borrados.",
|
||||
upvotenorep_tip: "Necesitas una <b>$1</b> <a href=\"/reputation\">reputación</a> de al menos <b>$1</b> para dar una valoración positiva a los comentarios. ",
|
||||
downvotenorep_tip: "Necesitas una <a href=\"/reputation\">reputación</a> de al menos <b>$1</b> para dar una valoración negativa a los comentarios.",
|
||||
upvotenorep_tip: "Necesitas una <b>$1</b> <a href=\"?reputation\">reputación</a> de al menos <b>$1</b> para dar una valoración positiva a los comentarios. ",
|
||||
downvotenorep_tip: "Necesitas una <a href=\"?reputation\">reputación</a> de al menos <b>$1</b> para dar una valoración negativa a los comentarios.",
|
||||
stickycomment_tip: "Un moderador ha etiquetado este comentario como permanente.",
|
||||
addreply_stc: "Añadir respuesta",
|
||||
show1morereply_stc: "Mostrar una más respuesta",
|
||||
|
||||
@@ -2898,8 +2898,8 @@ var LANG = {
|
||||
votelogin_tip: "Vous devez avoir un compte pour voter sur les commentaires. Veuillez <a href=\"?account=signin\">vous connecter</a> ou <a href=\"?account=signup\">vous inscrire</a>.",
|
||||
voteself_tip: "Vous ne pouvez pas voter sur votre propre commentaire.",
|
||||
votedeleted_tip: "Vous ne pouvez pas voter pour les commentaires effacés.",
|
||||
upvotenorep_tip: "Vous avez besoin d'au moins <b>$1</b> <a href=\"/reputation\">en réputation</a> pour émettre des votes positifs pour les commentaires.",
|
||||
downvotenorep_tip: "Vous avez besoin d'au moins <b>$1</b> <a href=\"/reputation\">en réputation</a> pour émettre des votes négatifs pour les commentaires.",
|
||||
upvotenorep_tip: "Vous avez besoin d'au moins <b>$1</b> <a href=\"?reputation\">en réputation</a> pour émettre des votes positifs pour les commentaires.",
|
||||
downvotenorep_tip: "Vous avez besoin d'au moins <b>$1</b> <a href=\"?reputation\">en réputation</a> pour émettre des votes négatifs pour les commentaires.",
|
||||
stickycomment_tip: "Ce commentaire a été mis en évidence (sticky) par un modérateur.",
|
||||
addreply_stc: "Ajouter une réponse",
|
||||
show1morereply_stc: "Afficher 1 réponse de plus",
|
||||
|
||||
@@ -2898,8 +2898,8 @@ var LANG = {
|
||||
votelogin_tip: "Вы должны иметь зарегистрированный аккаунт, чтобы голосовать за комментарии. Пожалуйста, <a href=\"?account=signin\">войдите</a> или <a href=\"?account=signin\">зарегистрируйтесь</a>.",
|
||||
voteself_tip: "Вы не можете голосовать за свой комментарий.",
|
||||
votedeleted_tip: "Голосование за удаленные комментарии невозможно.",
|
||||
upvotenorep_tip: "Вам необходимо иметь по меньшей мере <b>$1</b> <a href=\"/reputation\">репутации</a>, чтобы голосовать за комментарии.",
|
||||
downvotenorep_tip: "Вам нужно еще по меньшей мере <b>$1</b> <a href=\"/reputation\">репутации</a>, чтобы понижать комментарии.",
|
||||
upvotenorep_tip: "Вам необходимо иметь по меньшей мере <b>$1</b> <a href=\"?reputation\">репутации</a>, чтобы голосовать за комментарии.",
|
||||
downvotenorep_tip: "Вам нужно еще по меньшей мере <b>$1</b> <a href=\"?reputation\">репутации</a>, чтобы понижать комментарии.",
|
||||
stickycomment_tip: "Этот комментарий был закреплен модератором.",
|
||||
addreply_stc: "Ответить",
|
||||
show1morereply_stc: "Показать еще один ответ",
|
||||
|
||||
@@ -8,7 +8,7 @@ if (typeof $WH == "undefined") {
|
||||
|
||||
var match = document.scripts[i].src.match(/(https?:\/\/[^\/]+)((\/[\w\d-_%]+)*)\/widgets\/power\.js/i);
|
||||
if (match) {
|
||||
var g_host = match[1];
|
||||
var g_host = match[1]; // todo: probably incorrect for most cases :/
|
||||
var g_staticUrl = match[1] + match[2];
|
||||
break;
|
||||
}
|
||||
@@ -94,7 +94,8 @@ if (typeof $WowheadPower == "undefined") {
|
||||
},
|
||||
REDIRECTS = {
|
||||
wotlk: "www",
|
||||
ptr: "www"
|
||||
ptr: "www",
|
||||
www: "en"
|
||||
};
|
||||
|
||||
if (isRemote) {
|
||||
@@ -105,7 +106,7 @@ if (typeof $WowheadPower == "undefined") {
|
||||
if (isRemote) {
|
||||
var script = document.createElement("script");
|
||||
// script.src = (document.location.protocol != "https:" ? "http:": document.location.protocol) + "//wowjs.zamimg.com/js/basic.js?5";
|
||||
script.src = g_host + "/static/js/basic.js";
|
||||
script.src = g_staticUrl + "/js/basic.js";
|
||||
head.appendChild(script);
|
||||
}
|
||||
else {
|
||||
@@ -181,27 +182,9 @@ if (typeof $WowheadPower == "undefined") {
|
||||
$WH.ae(head, $WH.ce("link", {
|
||||
type: "text/css",
|
||||
// href: (document.location.protocol != "https:" ? "http:": document.location.protocol) + "//wowcss.zamimg.com/css/basic.css?5",
|
||||
href: g_host + "/static/css/basic.css",
|
||||
href: g_staticUrl + "/css/basic.css",
|
||||
rel: "stylesheet"
|
||||
}));
|
||||
|
||||
if ($WH.Browser.ie67) {
|
||||
$WH.ae(head, $WH.ce("link", {
|
||||
type: "text/css",
|
||||
// href: "http://static.wowhead.com/css/basic_ie67.css?4",
|
||||
href: g_host + "/static/css/global_ie67.css",
|
||||
rel: "stylesheet"
|
||||
}));
|
||||
|
||||
if ($WH.Browser.ie6) {
|
||||
$WH.ae(head, $WH.ce("link", {
|
||||
type: "text/css",
|
||||
// href: "http://static.wowhead.com/css/basic_ie6.css?4",
|
||||
href: g_host + "/static/css/global_ie6.css",
|
||||
rel: "stylesheet"
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
attachEvent();
|
||||
|
||||
@@ -298,9 +281,9 @@ if (typeof $WowheadPower == "undefined") {
|
||||
i1 = 1;
|
||||
i2 = 2;
|
||||
url = t.rel.match(/(item|quest|spell|achievement|npc|object).?([0-9]+)/);
|
||||
if (url == null) {
|
||||
url = t.rel.match(/(profile).?([^&#]+)/);
|
||||
}
|
||||
// if (url == null) { // sarjuuk: also matches 'profiler' and 'profiles' which screws with the language-menu workaround
|
||||
// url = t.rel.match(/(profile).?([^&#]+)/);
|
||||
// }
|
||||
showLogo = 1;
|
||||
}
|
||||
|
||||
@@ -413,7 +396,7 @@ if (typeof $WowheadPower == "undefined") {
|
||||
t.style.paddingLeft = "18px !important";
|
||||
t.style.verticalAlign = "center";
|
||||
// t.style.background = "url(" + (document.location.protocol != "https:" ? "http:": document.location.protocol) + "//wowimg.zamimg.com/images/wow/icons/tiny/" + data.icon.toLocaleLowerCase() + ".gif) left center no-repeat"
|
||||
t.style.background = "url(" + g_host + "/static/images/wow/icons/tiny/" + data.icon.toLocaleLowerCase() + ".gif) left center no-repeat"
|
||||
t.style.background = "url(" + g_staticUrl + "/images/wow/icons/tiny/" + data.icon.toLocaleLowerCase() + ".gif) left center no-repeat"
|
||||
}
|
||||
|
||||
if (aowow_tooltips.colorlinks) {
|
||||
|
||||
@@ -24,9 +24,5 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
foreach ($this->jsGlobals as $glob):
|
||||
$this->gBrick($glob[0], ['vars' => $glob[1], 'extra' => $glob[2]]);
|
||||
endforeach;
|
||||
?>
|
||||
<?php echo $this->writeGlobalVars(); ?>
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
<div id="sl<?php echo $this->typeId; ?>" style="margin-left: 70px; margin-top: 4px;"></div>
|
||||
<div id="ks<?php echo $this->typeId; ?>" style="margin-left: 70px; margin-top: 4px;"></div>
|
||||
|
||||
<?php if (!empty($this->jsGlobals[6][2]['buff'])): /* not set with items */ ?>
|
||||
<?php
|
||||
$hasBuff = !empty($this->jsGlobals[6][2][$this->typeId]['buff']); // not set with items
|
||||
|
||||
if ($hasBuff):
|
||||
?>
|
||||
<h3><?php echo Lang::$spell['_aura']; ?></h3>
|
||||
<div id="btt<?php echo $this->typeId; ?>" class="wowhead-tooltip"></div>
|
||||
<?php
|
||||
@@ -22,7 +26,7 @@ endif;
|
||||
$WH.ge('ic<?php echo $this->typeId; ?>').appendChild(Icon.create('<?php echo $this->headIcons[0]; ?>', 2, null, 0, <?php echo $this->headIcons[1]; ?>));
|
||||
var
|
||||
tt = $WH.ge('tt<?php echo $this->typeId; ?>'),
|
||||
<?php if (!empty($this->jsGlobals[6][2]['buff'])): ?>
|
||||
<?php if ($hasBuff): ?>
|
||||
btt = $WH.ge('btt<?php echo $this->typeId; ?>'),
|
||||
<?php endif; ?>
|
||||
sl = $WH.ge('sl<?php echo $this->typeId; ?>'),
|
||||
@@ -30,7 +34,7 @@ endif;
|
||||
|
||||
tt.innerHTML = '<table><tr><td>' + ($WH.g_enhanceTooltip.bind(tt))(<?php echo $this->typeId; ?>, true, true, sl, null, [<?php echo $this->typeId; ?>], ks, null) + '</td><th style="background-position: top right"></th></tr><tr><th style="background-position: bottom left"></th><th style="background-position: bottom right"></th></tr></table>';
|
||||
$WH.Tooltip.fixSafe(tt, 1, 1);
|
||||
<?php if (!empty($this->jsGlobals[6][2]['buff'])): ?>
|
||||
<?php if ($hasBuff): ?>
|
||||
btt.innerHTML = '<table><tr><td>' + ($WH.g_enhanceTooltip.bind(btt))(<?php echo $this->typeId; ?>, true, true, sl, tt, [<?php echo $this->typeId; ?>], ks) + '</td><th style="background-position: top right"></th></tr><tr><th style="background-position: bottom left"></th><th style="background-position: bottom right"></th></tr></table>';
|
||||
$WH.Tooltip.fixSafe(btt, 1, 1);
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
var _ = g_achievements;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:\''.$data['icon'].'\'' .
|
||||
'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_classes;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_npcs;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,9 +0,0 @@
|
||||
var _ = g_gatheredcurrencies;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:'.json_encode($data['icon'], JSON_NUMERIC_CHECK) .
|
||||
'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,9 +0,0 @@
|
||||
var _ = g_holidays;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:\''.$data['icon'].'\'' .
|
||||
'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_factions;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,16 +0,0 @@
|
||||
var _ = g_items;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:\''.$data['icon'].'\'' .
|
||||
(isset($data['quality']) ? ', quality:\''.$data['quality'].'\'' : null) .
|
||||
'};';
|
||||
endforeach;
|
||||
|
||||
if (isset($this->typeId) && !empty($extra[$this->typeId])):
|
||||
$x = $extra[$this->typeId];
|
||||
echo "\n_[".$x['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($x['tooltip'])."';";
|
||||
echo "\n_[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).';';
|
||||
endif;
|
||||
?>
|
||||
@@ -1,7 +0,0 @@
|
||||
var _ = g_itemsets;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo ' _['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_objects;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_pets;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={icon:\''.$data['icon'].'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_quests;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_races;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,9 +0,0 @@
|
||||
var _ = g_skills;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:\''.$data['icon'].'\'' .
|
||||
'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
var _ = g_spells;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={' .
|
||||
'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' .
|
||||
'icon:\''.$data['icon'].'\'' .
|
||||
'};';
|
||||
endforeach;
|
||||
|
||||
if (isset($this->typeId) && !empty($extra[$this->typeId])):
|
||||
$x = $extra[$this->typeId];
|
||||
echo "\n_[".$x['id'].'].tooltip_'.User::$localeString.' = \''.$x['tooltip']."';";
|
||||
echo "\n_[".$x['id'].'].buff_'.User::$localeString.' = \''.$x['buff']."';";
|
||||
echo "\n_[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).';';
|
||||
echo "\n_[".$x['id'].'].buffspells_'.User::$localeString.' = '.json_encode($x['buffspells'], JSON_NUMERIC_CHECK).';';
|
||||
endif;
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
var _ = g_titles;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'';
|
||||
if (isset($data['namefemale'])):
|
||||
echo ', namefemale_'.User::$localeString.':\''.Util::jsEscape($data['namefemale']).'\'';
|
||||
endif;
|
||||
echo '};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -1,7 +0,0 @@
|
||||
var _ = g_users;
|
||||
<?php
|
||||
foreach ($vars as $name => $data):
|
||||
echo " _['".$name."']=".json_encode($data, JSON_NUMERIC_CHECK).';';
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var _ = g_gatheredzones;
|
||||
<?php
|
||||
foreach ($vars as $id => $data):
|
||||
echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};';
|
||||
endforeach;
|
||||
?>
|
||||
@@ -38,11 +38,7 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($this->jsGlobals as $glob):
|
||||
$this->gBrick($glob[0], ['vars' => $glob[1], 'extra' => $glob[2]]);
|
||||
endforeach;
|
||||
?>
|
||||
<?php echo $this->writeGlobalVars(); ?>
|
||||
Markup.printHtml(<?php echo json_encode($this->news['text']); ?>, 'news-generic', { allow: Markup.CLASS_ADMIN });
|
||||
//]]></script>
|
||||
<?php endif; ?>
|
||||
@@ -62,4 +58,4 @@
|
||||
|
||||
<noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?php echo Lang::$main['jsError']; ?></div></noscript>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user