From 7d1ced3f8d41d9c4609fd48279041a3160a52c51 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 31 Jul 2014 23:06:54 +0200 Subject: [PATCH] removed templates for jsGlobals (they will now be written directly) * as always, some bug fixes --- includes/defines.php | 2 +- includes/types/spell.class.php | 4 +- localization/locale_dede.php | 1 - pages/genericPage.class.php | 85 ++++++++++++++++++++-------- static/js/locale_dede.js | 4 +- static/js/locale_eses.js | 4 +- static/js/locale_frfr.js | 4 +- static/js/locale_ruru.js | 4 +- static/widgets/power.js | 35 +++--------- template/bricks/header.tpl.php | 6 +- template/bricks/tooltip.tpl.php | 10 +++- template/globals/achievement.tpl.php | 9 --- template/globals/class.tpl.php | 6 -- template/globals/creature.tpl.php | 6 -- template/globals/currency.tpl.php | 9 --- template/globals/event.tpl.php | 9 --- template/globals/faction.tpl.php | 6 -- template/globals/item.tpl.php | 16 ------ template/globals/itemset.tpl.php | 7 --- template/globals/object.tpl.php | 6 -- template/globals/pet.tpl.php | 6 -- template/globals/quest.tpl.php | 6 -- template/globals/race.tpl.php | 6 -- template/globals/skill.tpl.php | 9 --- template/globals/spell.tpl.php | 17 ------ template/globals/title.tpl.php | 10 ---- template/globals/user.tpl.php | 7 --- template/globals/zone.tpl.php | 6 -- template/pages/home.tpl.php | 8 +-- 29 files changed, 90 insertions(+), 218 deletions(-) delete mode 100644 template/globals/achievement.tpl.php delete mode 100644 template/globals/class.tpl.php delete mode 100644 template/globals/creature.tpl.php delete mode 100644 template/globals/currency.tpl.php delete mode 100644 template/globals/event.tpl.php delete mode 100644 template/globals/faction.tpl.php delete mode 100644 template/globals/item.tpl.php delete mode 100644 template/globals/itemset.tpl.php delete mode 100644 template/globals/object.tpl.php delete mode 100644 template/globals/pet.tpl.php delete mode 100644 template/globals/quest.tpl.php delete mode 100644 template/globals/race.tpl.php delete mode 100644 template/globals/skill.tpl.php delete mode 100644 template/globals/spell.tpl.php delete mode 100644 template/globals/title.tpl.php delete mode 100644 template/globals/user.tpl.php delete mode 100644 template/globals/zone.tpl.php diff --git a/includes/defines.php b/includes/defines.php index a6a9df92..64b8c05f 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -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 diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index 35d7c773..e46e7406 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -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] ); diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 1891d1d4..b9ac138a 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -10,7 +10,6 @@ if (!defined('AOWOW_REVISION')) */ $lang = array( - // page variables 'timeUnits' => array( 'sg' => ["Jahr", "Monat", "Woche", "Tag", "Stunde", "Minute", "Sekunde", "Millisekunde"], diff --git a/pages/genericPage.class.php b/pages/genericPage.class.php index d0f6d512..cc0a01c6 100644 --- a/pages/genericPage.class.php +++ b/pages/genericPage.class.php @@ -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; } } diff --git a/static/js/locale_dede.js b/static/js/locale_dede.js index 15ad946c..3c840fec 100644 --- a/static/js/locale_dede.js +++ b/static/js/locale_dede.js @@ -2908,8 +2908,8 @@ var LANG = { votelogin_tip: "Ihr benötigt ein registriertes Konto, um Kommentare bewerten zu können. Bitte meldet Euch an, oder registriert Euch.", 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 $1 Ruf, um Kommentare positiv bewerten zu können.", - downvotenorep_tip: "Ihr benötigt wenigstens $1 Ruf, um Kommentare negativ bewerten zu können.", + upvotenorep_tip: "Ihr benötigt wenigstens $1 Ruf, um Kommentare positiv bewerten zu können.", + downvotenorep_tip: "Ihr benötigt wenigstens $1 Ruf, 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", diff --git a/static/js/locale_eses.js b/static/js/locale_eses.js index c75fa8a7..2cf48cef 100644 --- a/static/js/locale_eses.js +++ b/static/js/locale_eses.js @@ -2910,8 +2910,8 @@ var LANG = { votelogin_tip: "Debes crear una cuenta para votar en los comentarios. Inicia sesión o crea una cuenta.", voteself_tip: "No puedes votar en tu propio comentario.", votedeleted_tip: "No se puede votar en los comentarios borrados.", - upvotenorep_tip: "Necesitas una $1 reputación de al menos $1 para dar una valoración positiva a los comentarios. ", - downvotenorep_tip: "Necesitas una reputación de al menos $1 para dar una valoración negativa a los comentarios.", + upvotenorep_tip: "Necesitas una $1 reputación de al menos $1 para dar una valoración positiva a los comentarios. ", + downvotenorep_tip: "Necesitas una reputación de al menos $1 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", diff --git a/static/js/locale_frfr.js b/static/js/locale_frfr.js index 00452883..8b54b69d 100644 --- a/static/js/locale_frfr.js +++ b/static/js/locale_frfr.js @@ -2898,8 +2898,8 @@ var LANG = { votelogin_tip: "Vous devez avoir un compte pour voter sur les commentaires. Veuillez vous connecter ou vous inscrire.", 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 $1 en réputation pour émettre des votes positifs pour les commentaires.", - downvotenorep_tip: "Vous avez besoin d'au moins $1 en réputation pour émettre des votes négatifs pour les commentaires.", + upvotenorep_tip: "Vous avez besoin d'au moins $1 en réputation pour émettre des votes positifs pour les commentaires.", + downvotenorep_tip: "Vous avez besoin d'au moins $1 en réputation 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", diff --git a/static/js/locale_ruru.js b/static/js/locale_ruru.js index 00b4c6fd..31b2a924 100644 --- a/static/js/locale_ruru.js +++ b/static/js/locale_ruru.js @@ -2898,8 +2898,8 @@ var LANG = { votelogin_tip: "Вы должны иметь зарегистрированный аккаунт, чтобы голосовать за комментарии. Пожалуйста, войдите или зарегистрируйтесь.", voteself_tip: "Вы не можете голосовать за свой комментарий.", votedeleted_tip: "Голосование за удаленные комментарии невозможно.", - upvotenorep_tip: "Вам необходимо иметь по меньшей мере $1 репутации, чтобы голосовать за комментарии.", - downvotenorep_tip: "Вам нужно еще по меньшей мере $1 репутации, чтобы понижать комментарии.", + upvotenorep_tip: "Вам необходимо иметь по меньшей мере $1 репутации, чтобы голосовать за комментарии.", + downvotenorep_tip: "Вам нужно еще по меньшей мере $1 репутации, чтобы понижать комментарии.", stickycomment_tip: "Этот комментарий был закреплен модератором.", addreply_stc: "Ответить", show1morereply_stc: "Показать еще один ответ", diff --git a/static/widgets/power.js b/static/widgets/power.js index dcaf1b7c..9cf86398 100644 --- a/static/widgets/power.js +++ b/static/widgets/power.js @@ -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) { diff --git a/template/bricks/header.tpl.php b/template/bricks/header.tpl.php index 5ce58dc0..3a9b45a9 100644 --- a/template/bricks/header.tpl.php +++ b/template/bricks/header.tpl.php @@ -24,9 +24,5 @@ diff --git a/template/bricks/tooltip.tpl.php b/template/bricks/tooltip.tpl.php index 1ea95c91..64d6f9f3 100644 --- a/template/bricks/tooltip.tpl.php +++ b/template/bricks/tooltip.tpl.php @@ -4,7 +4,11 @@
-jsGlobals[6][2]['buff'])): /* not set with items */ ?> +jsGlobals[6][2][$this->typeId]['buff']); // not set with items + +if ($hasBuff): +?>

typeId; ?>').appendChild(Icon.create('headIcons[0]; ?>', 2, null, 0, headIcons[1]; ?>)); var tt = $WH.ge('tttypeId; ?>'), -jsGlobals[6][2]['buff'])): ?> + btt = $WH.ge('btttypeId; ?>'), sl = $WH.ge('sltypeId; ?>'), @@ -30,7 +34,7 @@ endif; tt.innerHTML = '
' + ($WH.g_enhanceTooltip.bind(tt))(typeId; ?>, true, true, sl, null, [typeId; ?>], ks, null) + '
'; $WH.Tooltip.fixSafe(tt, 1, 1); -jsGlobals[6][2]['buff'])): ?> + btt.innerHTML = '
' + ($WH.g_enhanceTooltip.bind(btt))(typeId; ?>, true, true, sl, tt, [typeId; ?>], ks) + '
'; $WH.Tooltip.fixSafe(btt, 1, 1); diff --git a/template/globals/achievement.tpl.php b/template/globals/achievement.tpl.php deleted file mode 100644 index 2023142e..00000000 --- a/template/globals/achievement.tpl.php +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_achievements; - $data): - echo '_['.$id.']={' . - 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . - 'icon:\''.$data['icon'].'\'' . - '};'; -endforeach; -?> diff --git a/template/globals/class.tpl.php b/template/globals/class.tpl.php deleted file mode 100644 index d90c6c7b..00000000 --- a/template/globals/class.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_classes; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/creature.tpl.php b/template/globals/creature.tpl.php deleted file mode 100644 index 94c69a14..00000000 --- a/template/globals/creature.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_npcs; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/currency.tpl.php b/template/globals/currency.tpl.php deleted file mode 100644 index c1716a94..00000000 --- a/template/globals/currency.tpl.php +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_gatheredcurrencies; - $data): - echo '_['.$id.']={' . - 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . - 'icon:'.json_encode($data['icon'], JSON_NUMERIC_CHECK) . - '};'; -endforeach; -?> diff --git a/template/globals/event.tpl.php b/template/globals/event.tpl.php deleted file mode 100644 index c794cafd..00000000 --- a/template/globals/event.tpl.php +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_holidays; - $data): - echo '_['.$id.']={' . - 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . - 'icon:\''.$data['icon'].'\'' . - '};'; -endforeach; -?> diff --git a/template/globals/faction.tpl.php b/template/globals/faction.tpl.php deleted file mode 100644 index 0d81db04..00000000 --- a/template/globals/faction.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_factions; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/item.tpl.php b/template/globals/item.tpl.php deleted file mode 100644 index 9294a801..00000000 --- a/template/globals/item.tpl.php +++ /dev/null @@ -1,16 +0,0 @@ -var _ = g_items; - $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; -?> diff --git a/template/globals/itemset.tpl.php b/template/globals/itemset.tpl.php deleted file mode 100644 index d8c8a242..00000000 --- a/template/globals/itemset.tpl.php +++ /dev/null @@ -1,7 +0,0 @@ - var _ = g_itemsets; - $data): - echo ' _['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> - diff --git a/template/globals/object.tpl.php b/template/globals/object.tpl.php deleted file mode 100644 index 40e64cbb..00000000 --- a/template/globals/object.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_objects; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/pet.tpl.php b/template/globals/pet.tpl.php deleted file mode 100644 index cbaec271..00000000 --- a/template/globals/pet.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_pets; - $data): - echo '_['.$id.']={icon:\''.$data['icon'].'\'};'; -endforeach; -?> diff --git a/template/globals/quest.tpl.php b/template/globals/quest.tpl.php deleted file mode 100644 index b690c680..00000000 --- a/template/globals/quest.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_quests; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/race.tpl.php b/template/globals/race.tpl.php deleted file mode 100644 index 31a1553f..00000000 --- a/template/globals/race.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_races; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/globals/skill.tpl.php b/template/globals/skill.tpl.php deleted file mode 100644 index 155d9eeb..00000000 --- a/template/globals/skill.tpl.php +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_skills; - $data): - echo '_['.$id.']={' . - 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . - 'icon:\''.$data['icon'].'\'' . - '};'; -endforeach; -?> diff --git a/template/globals/spell.tpl.php b/template/globals/spell.tpl.php deleted file mode 100644 index cc74fe84..00000000 --- a/template/globals/spell.tpl.php +++ /dev/null @@ -1,17 +0,0 @@ -var _ = g_spells; - $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; -?> diff --git a/template/globals/title.tpl.php b/template/globals/title.tpl.php deleted file mode 100644 index f1198199..00000000 --- a/template/globals/title.tpl.php +++ /dev/null @@ -1,10 +0,0 @@ -var _ = g_titles; - $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; -?> diff --git a/template/globals/user.tpl.php b/template/globals/user.tpl.php deleted file mode 100644 index 8511a77d..00000000 --- a/template/globals/user.tpl.php +++ /dev/null @@ -1,7 +0,0 @@ - var _ = g_users; - $data): - echo " _['".$name."']=".json_encode($data, JSON_NUMERIC_CHECK).';'; -endforeach; -?> - diff --git a/template/globals/zone.tpl.php b/template/globals/zone.tpl.php deleted file mode 100644 index 24f9d72e..00000000 --- a/template/globals/zone.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ -var _ = g_gatheredzones; - $data): - echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; -endforeach; -?> diff --git a/template/pages/home.tpl.php b/template/pages/home.tpl.php index 12a14198..d1ccdb07 100644 --- a/template/pages/home.tpl.php +++ b/template/pages/home.tpl.php @@ -38,11 +38,7 @@ @@ -62,4 +58,4 @@ - \ No newline at end of file +