From 81d92485418faa4a2929970664e12ecaf36f15b3 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 6 Aug 2025 01:24:10 +0200 Subject: [PATCH] Template/Update (Part 3) * convert amalgamation more.php into separate endpoints * fix url of help articles --- endpoints/aboutus/aboutus.php | 34 ++++ endpoints/faq/faq.php | 34 ++++ endpoints/help/help.php | 44 ++++ endpoints/privilege/privilege.php | 71 +++++++ endpoints/privileges/privileges.php | 65 ++++++ endpoints/reputation/reputation.php | 58 ++++++ endpoints/searchbox/searchbox.php | 34 ++++ endpoints/searchplugins/searchplugins.php | 34 ++++ endpoints/tooltips/tooltips.php | 34 ++++ endpoints/top-users/top-users.php | 94 +++++++++ endpoints/whats-new/whats-new.php | 34 ++++ pages/more.php | 234 ---------------------- setup/updates/1758578400_02.sql | 1 + setup/updates/1758578400_03.sql | 2 + static/js/locale_dede.js | 32 +-- static/js/locale_enus.js | 32 +-- static/js/locale_eses.js | 28 +-- static/js/locale_frfr.js | 30 +-- static/js/locale_ruru.js | 30 +-- static/js/locale_zhcn.js | 32 +-- template/pages/privilege.tpl.php | 13 +- template/pages/privileges.tpl.php | 11 +- 22 files changed, 651 insertions(+), 330 deletions(-) create mode 100644 endpoints/aboutus/aboutus.php create mode 100644 endpoints/faq/faq.php create mode 100644 endpoints/help/help.php create mode 100644 endpoints/privilege/privilege.php create mode 100644 endpoints/privileges/privileges.php create mode 100644 endpoints/reputation/reputation.php create mode 100644 endpoints/searchbox/searchbox.php create mode 100644 endpoints/searchplugins/searchplugins.php create mode 100644 endpoints/tooltips/tooltips.php create mode 100644 endpoints/top-users/top-users.php create mode 100644 endpoints/whats-new/whats-new.php delete mode 100644 pages/more.php create mode 100644 setup/updates/1758578400_02.sql create mode 100644 setup/updates/1758578400_03.sql diff --git a/endpoints/aboutus/aboutus.php b/endpoints/aboutus/aboutus.php new file mode 100644 index 00000000..f6ef07ba --- /dev/null +++ b/endpoints/aboutus/aboutus.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/faq/faq.php b/endpoints/faq/faq.php new file mode 100644 index 00000000..70337871 --- /dev/null +++ b/endpoints/faq/faq.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/help/help.php b/endpoints/help/help.php new file mode 100644 index 00000000..224a0c46 --- /dev/null +++ b/endpoints/help/help.php @@ -0,0 +1,44 @@ +generateError(); + + $pageId = array_search($pageParam, $this->validCats); + if ($pageId === false) + $this->generateError(); + + $this->catg = $pageParam; + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName, $this->catg); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/privilege/privilege.php b/endpoints/privilege/privilege.php new file mode 100644 index 00000000..6b4d30b7 --- /dev/null +++ b/endpoints/privilege/privilege.php @@ -0,0 +1,71 @@ + 'REP_REQ_COMMENT', // write comments + 2 => 'REP_REQ_EXT_LINKS', // post external links + // 4 => 'REP_REQ_NO_CAPTCHA', // NYI no captcha + 5 => 'REP_REQ_SUPERVOTE', // votes count for more + 9 => 'REP_REQ_VOTEMORE_BASE', // more votes per day + 10 => 'REP_REQ_UPVOTE', // can upvote + 11 => 'REP_REQ_DOWNVOTE', // can downvote + 12 => 'REP_REQ_REPLY', // can reply + 13 => 'REP_REQ_BORDER_UNCOMMON', // uncommon avatar border + 14 => 'REP_REQ_BORDER_RARE', // rare avatar border + 15 => 'REP_REQ_BORDER_EPIC', // epic avatar border + 16 => 'REP_REQ_BORDER_LEGENDARY', // legendary avatar border + 17 => 'REP_REQ_PREMIUM' // premium status + ); + + public function __construct(string $pageParam) + { + $this->getCategoryFromUrl($pageParam); + + parent::__construct($pageParam); + + if (!$pageParam) + $this->generateError(); + + // apply actual values + $this->repVal = Cfg::get($this->req2priv[$pageParam]); + } + + protected function generate() : void + { + $this->h1 = Lang::privileges('_privileges', $this->category[0]); + + array_unshift($this->title, $this->h1); + + $this->breadcrumb[] = $this->category[0]; + + $this->privReqPoints = Lang::privileges('reqPoints', [Lang::nf($this->repVal)]); + + parent::generate(); + + $this->result->registerDisplayHook('article', [self::class, 'articleHook']); + } + + public static function articleHook(Template\PageTemplate &$pt, Markup &$article) : void + { + $article->apply(Cfg::applyToString(...)); + } +} + +?> diff --git a/endpoints/privileges/privileges.php b/endpoints/privileges/privileges.php new file mode 100644 index 00000000..68a80ed3 --- /dev/null +++ b/endpoints/privileges/privileges.php @@ -0,0 +1,65 @@ + 'REP_REQ_COMMENT', // write comments + 2 => 'REP_REQ_EXT_LINKS', // post external links + // 4 => 'REP_REQ_NO_CAPTCHA', // NYI no captcha + 5 => 'REP_REQ_SUPERVOTE', // votes count for more + 9 => 'REP_REQ_VOTEMORE_BASE', // more votes per day + 10 => 'REP_REQ_UPVOTE', // can upvote + 11 => 'REP_REQ_DOWNVOTE', // can downvote + 12 => 'REP_REQ_REPLY', // can reply + 13 => 'REP_REQ_BORDER_UNCOMMON', // uncommon avatar border + 14 => 'REP_REQ_BORDER_RARE', // rare avatar border + 15 => 'REP_REQ_BORDER_EPIC', // epic avatar border + 16 => 'REP_REQ_BORDER_LEGENDARY', // legendary avatar border + 17 => 'REP_REQ_PREMIUM' // premium status + ); + + public function __construct(string $pageParam) + { + parent::__construct($pageParam); + + if ($pageParam) + $this->generateError(); + + // apply actual values and order by requirement ASC + foreach ($this->req2priv as &$var) + $var = Cfg::get($var); + + asort($this->req2priv); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + foreach (array_filter($this->req2priv) as $id => $val) + $this->privileges[$id] = array( + User::getReputation() >= $val, + Lang::privileges('_privileges', $id), + $val + ); + + parent::generate(); + } +} + +?> diff --git a/endpoints/reputation/reputation.php b/endpoints/reputation/reputation.php new file mode 100644 index 00000000..55d05faa --- /dev/null +++ b/endpoints/reputation/reputation.php @@ -0,0 +1,58 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + if ($repData = DB::Aowow()->select('SELECT `action`, `amount`, `date` AS "when", IF(`action` IN (?a), `sourceA`, 0) AS "param" FROM ?_account_reputation WHERE `userId` = ?d', + [SITEREP_ACTION_COMMENT, SITEREP_ACTION_UPVOTED, SITEREP_ACTION_DOWNVOTED], User::$id)) + { + array_walk($repData, fn(&$x) => $x['when'] = date(Util::$dateFormatInternal, $x['when'])); + + $this->tabsTitle = Lang::main('yourRepHistory'); + $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"], __forceTabs: true); + + $this->lvTabs->addListviewTab(new Listview(array( + 'id' => 'reputation-history', + 'name' => '$LANG.reputationhistory', + 'data' => $repData + ), 'reputationhistory')); + } + + parent::generate(); + + $this->result->registerDisplayHook('article', [self::class, 'articleHook']); + } + + public static function articleHook(Template\PageTemplate &$pt, Markup &$article) : void + { + $article->apply(Cfg::applyToString(...)); + } +} + +?> diff --git a/endpoints/searchbox/searchbox.php b/endpoints/searchbox/searchbox.php new file mode 100644 index 00000000..a0575842 --- /dev/null +++ b/endpoints/searchbox/searchbox.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/searchplugins/searchplugins.php b/endpoints/searchplugins/searchplugins.php new file mode 100644 index 00000000..4a4d94c4 --- /dev/null +++ b/endpoints/searchplugins/searchplugins.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/tooltips/tooltips.php b/endpoints/tooltips/tooltips.php new file mode 100644 index 00000000..d9507e36 --- /dev/null +++ b/endpoints/tooltips/tooltips.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/top-users/top-users.php b/endpoints/top-users/top-users.php new file mode 100644 index 00000000..1de7c60c --- /dev/null +++ b/endpoints/top-users/top-users.php @@ -0,0 +1,94 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + $tabs = array( + [0, 'top-users-alltime', '$LANG.alltime_stc' ], + [time() - MONTH, 'top-users-monthly', '$LANG.lastmonth_stc'], + [time() - WEEK, 'top-users-weekly', '$LANG.lastweek_stc' ] + ); + + // expected by javascript but metrics are not used by us + $nullFields = array( + 'uploads' => 0, // wow client cache uploads + 'posts' => 0, // forum posts + 'gold' => 0, // site achievements + 'silver' => 0, + 'copper' => 0 + ); + + $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"], __forceTabs: true); + + foreach ($tabs as [$time, $tabId, $tabName]) + { + // stuff received + $res = DB::Aowow()->select( + 'SELECT a.`id` AS ARRAY_KEY, a.`username`, a.`userGroups` AS "groups", a.`joinDate` AS "creation", + SUM(r.`amount`) AS "reputation", SUM(IF(r.`action` = ?d, 1, 0)) AS "comments", SUM(IF(r.`action` = ?d, 1, 0)) AS "screenshots", SUM(IF(r.`action` = ?d, 1, 0)) AS "reports" + FROM ?_account_reputation r + JOIN ?_account a ON a.`id` = r.`userId` + { WHERE r.`date` > ?d } + GROUP BY a.`id` + ORDER BY reputation DESC + LIMIT ?d', + SITEREP_ACTION_COMMENT, SITEREP_ACTION_UPLOAD, SITEREP_ACTION_GOOD_REPORT, + $time ?: DBSIMPLE_SKIP, Cfg::get('SQL_LIMIT_SEARCH') + ); + + $data = []; + if ($res) + { + // stuff given + $votes = DB::Aowow()->selectCol('SELECT `sourceB` AS ARRAY_KEY, SUM(1) FROM ?_account_reputation WHERE `action` IN (?a) AND `sourceB` IN (?a) { AND `date` > ?d } GROUP BY `sourceB`', + [SITEREP_ACTION_UPVOTED, SITEREP_ACTION_DOWNVOTED], array_keys($res), $time ?: DBSIMPLE_SKIP + ); + foreach ($res as $uId => &$r) + { + $r['creation'] = date('c', $r['creation']); + $r['votes'] = empty($votes[$uId]) ? 0 : $votes[$uId]; + $r += $nullFields; + } + + $data = $res; + } + + $this->lvTabs->addListviewTab(new Listview(array( + 'hiddenCols' => ['achievements', 'posts', 'uploads', 'reports'], + 'visibleCols' => ['created'], + 'name' => '$LANG.lastweek_stc', + 'name' => $tabName, + 'id' => $tabId, + 'data' => $data + ), 'topusers')); + } + + parent::generate(); + } +} + +?> diff --git a/endpoints/whats-new/whats-new.php b/endpoints/whats-new/whats-new.php new file mode 100644 index 00000000..080a69c4 --- /dev/null +++ b/endpoints/whats-new/whats-new.php @@ -0,0 +1,34 @@ +generateError(); + } + + protected function generate() : void + { + $this->h1 = Lang::main('moreTitles', $this->pageName); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/pages/more.php b/pages/more.php deleted file mode 100644 index c5d36547..00000000 --- a/pages/more.php +++ /dev/null @@ -1,234 +0,0 @@ - 'REP_REQ_COMMENT', // write comments - // 2 => 'REP_REQ_EXT_LINKS', // NYI post external links - // 4 => 'REP_REQ_NO_CAPTCHA', // NYI no captcha - 5 => 'REP_REQ_SUPERVOTE', // votes count for more - 9 => 'REP_REQ_VOTEMORE_BASE', // more votes per day - 10 => 'REP_REQ_UPVOTE', // can upvote - 11 => 'REP_REQ_DOWNVOTE', // can downvote - 12 => 'REP_REQ_REPLY', // can reply - 13 => 'REP_REQ_BORDER_UNCO', // uncommon avatar border [NYI: hardcoded in Icon.getPrivilegeBorder(), avatars not in use] - 14 => 'REP_REQ_BORDER_RARE', // rare avatar border [NYI: hardcoded in Icon.getPrivilegeBorder(), avatars not in use] - 15 => 'REP_REQ_BORDER_EPIC', // epic avatar border [NYI: hardcoded in Icon.getPrivilegeBorder(), avatars not in use] - 16 => 'REP_REQ_BORDER_LEGE', // legendary avatar border [NYI: hardcoded in Icon.getPrivilegeBorder(), avatars not in use] - 17 => 'REP_REQ_PREMIUM' // premium status - ); - - private $validPages = array( // [tabId, path[, subPaths]] - 'whats-new' => [2, [2, 7]], - 'searchbox' => [2, [2, 16]], - 'tooltips' => [2, [2, 10]], - 'faq' => [2, [2, 3]], - 'aboutus' => [2, [2, 0]], - 'searchplugins' => [2, [2, 8]], - 'help' => [2, [2, 13], ['commenting-and-you', 'modelviewer', 'screenshots-tips-tricks', 'stat-weighting', 'talent-calculator', 'item-comparison', 'profiler', 'markup-guide']], - 'reputation' => [1, [3, 10]], - 'privilege' => [1, [3, 10], [1, /* 2, 4, */ 5, 9, 10, 11, 12, 13, 14, 15, 16, 17]], - 'privileges' => [1, [3, 10, 0]], - 'top-users' => [1, [3, 11]] - ); - - public function __construct($pageCall, $subPage) - { - parent::__construct($pageCall, $subPage); - - // chack if page is valid - if (isset($this->validPages[$pageCall])) - { - $pageData = $this->validPages[$pageCall]; - - $this->tabId = $pageData[0]; - $this->path = $pageData[1]; - $this->page = [$pageCall, $subPage]; - - if ($subPage && isset($pageData[2])) - { - $exists = array_search($subPage, $pageData[2]); - if ($exists === false) - $this->error(); - - if (is_numeric($subPage)) - $this->articleUrl = $pageCall.'='.$subPage; - else - $this->articleUrl = $subPage; - - $this->path[] = $subPage; - $this->name = Lang::main('moreTitles', $pageCall, $subPage); - } - else - { - $this->articleUrl = $pageCall; - $this->name = Lang::main('moreTitles', $pageCall); - } - } - else - $this->error(); - - // apply actual values and order by requirement ASC - foreach ($this->req2priv as &$var) - $var = Cfg::get($var); - - asort($this->req2priv); - } - - protected function generateContent() - { - switch ($this->page[0]) - { - case 'reputation': - $this->handleReputationPage(); - return; - case 'privileges': - $this->handlePrivilegesPage(); - return; - case 'privilege': - $this->tpl = 'privilege'; - $this->privReqPoints = sprintf(Lang::privileges('reqPoints'), Lang::nf($this->req2priv[$this->page[1]])); - return; - case 'top-users': - $this->handleTopUsersPage(); - return; - default: - return; - } - } - - protected function postArticle(string &$txt) : void - { - if ($this->page[0] != 'reputation' && - $this->page[0] != 'privileges' && - $this->page[0] != 'privilege') - return; - - $txt = Cfg::applyToString($txt); - } - - protected function generatePath() { } - - protected function generateTitle() - { - array_unshift($this->title, $this->name); - } - - private function handleReputationPage() - { - if (!User::isLoggedIn()) - return; - - if ($repData = DB::Aowow()->select('SELECT `action`, `amount`, `date` AS "when", IF(`action` IN (3, 4, 5), `sourceA`, 0) AS "param" FROM ?_account_reputation WHERE `userId` = ?d', User::$id)) - { - array_walk($repData, fn(&$x) => $x['when'] = date(Util::$dateFormatInternal, $x['when'])); - - $this->tabsTitle = Lang::main('yourRepHistory'); - $this->lvTabs[] = ['reputationhistory', array( - 'id' => 'reputation-history', - 'name' => '$LANG.reputationhistory', - 'data' => $repData - )]; - } - } - - private function handlePrivilegesPage() - { - $this->tpl = 'privileges'; - $this->privileges = []; - - foreach ($this->req2priv as $id => $val) - if ($val) - $this->privileges[$id] = array( - User::getReputation() >= $val, - Lang::privileges('_privileges', $id), - $val - ); - } - - private function handleTopUsersPage() - { - $tabs = array( - [0, 'top-users-alltime', '$LANG.alltime_stc' ], - [time() - MONTH, 'top-users-monthly', '$LANG.lastmonth_stc'], - [time() - WEEK, 'top-users-weekly', '$LANG.lastweek_stc' ] - ); - - $nullFields = array( - 'uploads' => 0, - 'posts' => 0, - 'gold' => 0, - 'silver' => 0, - 'copper' => 0 - ); - - foreach ($tabs as [$t, $tabId, $tabName]) - { - // stuff received - $res = DB::Aowow()->select( - 'SELECT a.`id` AS ARRAY_KEY, a.`username`, a.`userGroups` AS "groups", a.`joinDate` AS "creation", - SUM(r.`amount`) AS "reputation", SUM(IF(r.`action` = 3, 1, 0)) AS "comments", SUM(IF(r.`action` = 6, 1, 0)) AS "screenshots", SUM(IF(r.`action` = 9, 1, 0)) AS "reports" - FROM ?_account_reputation r - JOIN ?_account a ON a.`id` = r.`userId` - { WHERE r.`date` > ?d } - GROUP BY a.`id` - ORDER BY `reputation` DESC - LIMIT ?d', - $t ?: DBSIMPLE_SKIP, Cfg::get('SQL_LIMIT_SEARCH') - ); - - $data = []; - if ($res) - { - // stuff given - $votes = DB::Aowow()->selectCol( - 'SELECT sourceB AS ARRAY_KEY, SUM(1) FROM ?_account_reputation WHERE action IN (4, 5) AND sourceB IN (?a) {AND date > ?d} GROUP BY sourceB', - array_keys($res), - $t ?: DBSIMPLE_SKIP - ); - foreach ($res as $uId => &$r) - { - $r['creation'] = date('c', $r['creation']); - $r['votes'] = empty($votes[$uId]) ? 0 : $votes[$uId]; - $r = array_merge($r, $nullFields); - } - - $data = array_values($res); - } - - $this->lvTabs[] = ['topusers', array( - 'hiddenCols' => ['achievements', 'posts', 'uploads', 'reports'], - 'visibleCols' => ['created'], - 'name' => '$LANG.lastweek_stc', - 'name' => $tabName, - 'id' => $tabId, - 'data' => $data - )]; - } - } -} - -?> diff --git a/setup/updates/1758578400_02.sql b/setup/updates/1758578400_02.sql new file mode 100644 index 00000000..ca98a880 --- /dev/null +++ b/setup/updates/1758578400_02.sql @@ -0,0 +1 @@ +UPDATE `aowow_articles` SET `url` = CONCAT('help=', `url`) WHERE `url` IN ('commenting-and-you', 'item-comparison', 'modelviewer', 'profiler', 'screenshots-tips-tricks', 'stat-weighting', 'talent-calculator', 'markup-guide'); diff --git a/setup/updates/1758578400_03.sql b/setup/updates/1758578400_03.sql new file mode 100644 index 00000000..a579869f --- /dev/null +++ b/setup/updates/1758578400_03.sql @@ -0,0 +1,2 @@ +UPDATE `aowow_config` SET `key` = 'rep_req_border_legendary' WHERE `key` = 'rep_req_border_lege'; +UPDATE `aowow_config` SET `key` = 'rep_req_border_uncommon' WHERE `key` = 'rep_req_border_unco'; diff --git a/static/js/locale_dede.js b/static/js/locale_dede.js index 1564acb3..28e1db9b 100644 --- a/static/js/locale_dede.js +++ b/static/js/locale_dede.js @@ -995,23 +995,25 @@ var mn_tools = [ [4,"Zufällige Seite","?random"] ]] ]; + var mn_reputation = [ - [0, "Alle Privilegien anzeigen", "?privileges"], - [, "Privilegien"], - [1, "Kommentare einsenden", "?privilege=1"], - // [2, "Webseitenexterne Links einsenden", "?privilege=2"], - // [4, "Kein CAPTCHA", "?privilege=4"], - [5, "Kommentarbewertungen zählen mehr", "?privilege=5"], - [9, "Mehr Wertungsfreiheit", "?privilege=9"], - [10, "Kommentare positiv bewerten", "?privilege=10"], - [11, "Kommentare negativ bewerten", "?privilege=11"], - [12, "Kommentarantwort einsenden", "?privilege=12"], - // [13, "Rahmen: Außergewöhnlich", "?privilege=13"], - // [14, "Rahmen: Selten", "?privilege=14"], - // [15, "Rahmen: Episch", "?privilege=15"], - // [16, "Rahmen: Legendär", "?privilege=16"], - [17, "AoWoW Premium", "?privilege=17"] + [0, "Alle Privilegien anzeigen", "?privileges" ], + [, "Privilegien" ], + [1, "Kommentare einsenden", "?privilege=1" ], + [2, "Webseitenexterne Links einsenden", "?privilege=2" ], + // [4, "Kein CAPTCHA", "?privilege=4" ], + [5, "Kommentarbewertungen zählen mehr", "?privilege=5" ], + [9, "Mehr Wertungsfreiheit", "?privilege=9" ], + [10, "Kommentare positiv bewerten", "?privilege=10"], + [11, "Kommentare negativ bewerten", "?privilege=11"], + [12, "Kommentarantwort einsenden", "?privilege=12"], + [13, "Rahmen: Außergewöhnlich", "?privilege=13"], + [14, "Rahmen: Selten", "?privilege=14"], + [15, "Rahmen: Episch", "?privilege=15"], + [16, "Rahmen: Legendär", "?privilege=16"], + [17, "AoWoW Premium", "?privilege=17"] ]; + var mn_community = [ [3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/static/js/locale_enus.js b/static/js/locale_enus.js index 012bb207..bddf3aa2 100644 --- a/static/js/locale_enus.js +++ b/static/js/locale_enus.js @@ -1041,23 +1041,25 @@ var mn_tools = [ [4,"Random Page","?random"] ]] ]; + var mn_reputation = [ - [0, "Show All Privileges", "?privileges"], - [, "Privileges"], - [1, "Post comments", "?privilege=1"], - // [2, "Post external links", "?privilege=2"], - // [4, "No CAPTCHAs", "?privilege=4"], - [5, "Comment votes worth more", "?privilege=5"], - [9, "More votes per day", "?privilege=9"], - [10, "Upvote comments", "?privilege=10"], - [11, "Downvote comments", "?privilege=11"], - [12, "Post comment replies", "?privilege=12"], - // [13, "Border: Uncommon", "?privilege=13"], - // [14, "Border: Rare", "?privilege=14"], - // [15, "Border: Epic", "?privilege=15"], - // [16, "Border: Legendary", "?privilege=16"], - [17, "AoWoW Premium", "?privilege=17"] + [0, "Show All Privileges", "?privileges" ], + [, "Privileges" ], + [1, "Post comments", "?privilege=1" ], + [2, "Post external links", "?privilege=2" ], + // [4, "No CAPTCHAs", "?privilege=4" ], + [5, "Comment votes worth more", "?privilege=5" ], + [9, "More votes per day", "?privilege=9" ], + [10, "Upvote comments", "?privilege=10"], + [11, "Downvote comments", "?privilege=11"], + [12, "Post comment replies", "?privilege=12"], + [13, "Border: Uncommon", "?privilege=13"], + [14, "Border: Rare", "?privilege=14"], + [15, "Border: Epic", "?privilege=15"], + [16, "Border: Legendary", "?privilege=16"], + [17, "AoWoW Premium", "?privilege=17"] ]; + var mn_community = [ [3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/static/js/locale_eses.js b/static/js/locale_eses.js index d9f78932..ba4b50d2 100644 --- a/static/js/locale_eses.js +++ b/static/js/locale_eses.js @@ -995,23 +995,25 @@ var mn_tools = [ [4,"Página aleatoria","?random"] ]] ]; + var mn_reputation = [ - [0, "Mostrar todos los privilegios", "?privileges"], - [, "Privilegios"], - [1, "Escribir comentarios", "?privilege=1"], - // [2, "Escribir enlaces externos", "?privilege=2"], - // [4, "Sin CAPTCHAs", "?privilege=4"], - [5, "Los votos de comentario valen más", "?privilege=5"], - [9, "Más votos por día", "?privilege=9"], + [0, "Mostrar todos los privilegios", "?privileges" ], + [, "Privilegios" ], + [1, "Escribir comentarios", "?privilege=1" ], + [2, "Escribir enlaces externos", "?privilege=2" ], + // [4, "Sin CAPTCHAs", "?privilege=4" ], + [5, "Los votos de comentario valen más", "?privilege=5" ], + [9, "Más votos por día", "?privilege=9" ], [10, "Dar una valoración positiva a comentarios", "?privilege=10"], [11, "Dar una valoración negativa a comentarios", "?privilege=11"], - [12, "Escribir respuestas a comentarios", "?privilege=12"], - // [13, "Borde: Poco Común", "?privilege=13"], - // [14, "Borde: Raro", "?privilege=14"], - // [15, "Borde: Épica", "?privilege=15"], - // [16, "Borde: Legendaria", "?privilege=16"], - [17, "AoWoW Premium", "?privilege=17"] + [12, "Escribir respuestas a comentarios", "?privilege=12"], + [13, "Borde: Poco Común", "?privilege=13"], + [14, "Borde: Raro", "?privilege=14"], + [15, "Borde: Épica", "?privilege=15"], + [16, "Borde: Legendaria", "?privilege=16"], + [17, "AoWoW Premium", "?privilege=17"] ]; + var mn_community = [ [3,"Foros","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/static/js/locale_frfr.js b/static/js/locale_frfr.js index a27b4eae..7cdaf084 100644 --- a/static/js/locale_frfr.js +++ b/static/js/locale_frfr.js @@ -995,23 +995,25 @@ var mn_tools = [ [4,"Page au hasard","?random"] ]] ]; + var mn_reputation = [ - [0, "Montrer tous les privilèges", "?privileges"], - [, "Privilèges"], - [1, "Poster des commentaires", "?privilege=1"], - // [2, "Poster des liens externes", "?privilege=2"], - // [4, "Pas de CAPTCHA", "?privilege=4"], - [5, "Les votes des commentaires ont plus de valeur", "?privilege=5"], - [9, "Plus de votes par jour", "?privilege=9"], + [0, "Montrer tous les privilèges", "?privileges" ], + [, "Privilèges" ], + [1, "Poster des commentaires", "?privilege=1" ], + [2, "Poster des liens externes", "?privilege=2" ], + // [4, "Pas de CAPTCHA", "?privilege=4" ], + [5, "Les votes des commentaires ont plus de valeur", "?privilege=5" ], + [9, "Plus de votes par jour", "?privilege=9" ], [10, "Emettre des votes positifs pour les commentaires", "?privilege=10"], - [11, "Donner des votes négatifs aux commentaires", "?privilege=11"], - [12, "Envoyer des réponses aux commentaires", "?privilege=12"], - // [13, "Bordure : Bonne", "?privilege=13"], - // [14, "Bordure : Rare", "?privilege=14"], - // [15, "Bordure : Épique", "?privilege=15"], - // [16, "Bordure : Légendaire", "?privilege=16"], - [17, "AoWoW Premium", "?privilege=17"] + [11, "Donner des votes négatifs aux commentaires", "?privilege=11"], + [12, "Envoyer des réponses aux commentaires", "?privilege=12"], + [13, "Bordure : Bonne", "?privilege=13"], + [14, "Bordure : Rare", "?privilege=14"], + [15, "Bordure : Épique", "?privilege=15"], + [16, "Bordure : Légendaire", "?privilege=16"], + [17, "AoWoW Premium", "?privilege=17"] ]; + var mn_community = [ [3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/static/js/locale_ruru.js b/static/js/locale_ruru.js index 6825f61d..14c4a6e5 100644 --- a/static/js/locale_ruru.js +++ b/static/js/locale_ruru.js @@ -995,23 +995,25 @@ var mn_tools = [ [4,"Случайная страница","?random"] ]] ]; + var mn_reputation = [ - [0, "Показать все привилегии", "?privileges"], - [, "Привилегии"], - [1, "Оставлять комментарии", "?privilege=1"], - // [2, "Оставлять внешние ссылки", "?privilege=2"], - // [4, "Нет CAPTCHA", "?privilege=4"], - [5, "Более сильные голоса", "?privilege=5"], - [9, "Больше голосов в день", "?privilege=9"], - [10, "Голосовать за комментарии", "?privilege=10"], + [0, "Показать все привилегии", "?privileges" ], + [, "Привилегии" ], + [1, "Оставлять комментарии", "?privilege=1" ], + [2, "Оставлять внешние ссылки", "?privilege=2" ], + // [4, "Нет CAPTCHA", "?privilege=4" ], + [5, "Более сильные голоса", "?privilege=5" ], + [9, "Больше голосов в день", "?privilege=9" ], + [10, "Голосовать за комментарии", "?privilege=10"], [11, "Голосовать против комментариев", "?privilege=11"], - [12, "Отвечать на комментарии", "?privilege=12"], - // [13, "Граница: Необычный", "?privilege=13"], - // [14, "Граница: Редкий", "?privilege=14"], - // [15, "Граница: Эпический", "?privilege=15"], - // [16, "Граница: Легендарный", "?privilege=16"], - [17, "AoWoW Premium", "?privilege=17"] + [12, "Отвечать на комментарии", "?privilege=12"], + [13, "Граница: Необычный", "?privilege=13"], + [14, "Граница: Редкий", "?privilege=14"], + [15, "Граница: Эпический", "?privilege=15"], + [16, "Граница: Легендарный", "?privilege=16"], + [17, "AoWoW Premium", "?privilege=17"] ]; + var mn_community = [ [3,"Форум","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"Блог","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/static/js/locale_zhcn.js b/static/js/locale_zhcn.js index b5bce119..eba3f02f 100644 --- a/static/js/locale_zhcn.js +++ b/static/js/locale_zhcn.js @@ -1041,23 +1041,25 @@ var mn_tools = [ [4,"随机页面","?random"] ]] ]; + var mn_reputation = [ - [0, "显示全部特权", "?privileges"], - [, "特权"], - [1, "发表评论", "?privilege=1"], - // [2, "发表外部链接", "?privilege=2"], - // [4, "无验证码", "?privilege=4"], - [5, "名旺言重,投票更有价值", "?privilege=5"], - [9, "每天更多投票次数", "?privilege=9"], - [10, "顶评论", "?privilege=10"], - [11, "踩评论", "?privilege=11"], - [12, "发布评论回复", "?privilege=12"], - // [13, "边界:罕见", "?privilege=13"], - // [14, "边界:稀有", "?privilege=14"], - // [15, "边界:史诗", "?privilege=15"], - // [16, "边界:传奇", "?privilege=16"], - [17, "Aowow会员", "?privilege=17"] + [0, "显示全部特权", "?privileges" ], + [, "特权" ], + [1, "发表评论", "?privilege=1" ], + [2, "发表外部链接", "?privilege=2" ], + // [4, "无验证码", "?privilege=4" ], + [5, "名旺言重,投票更有价值", "?privilege=5" ], + [9, "每天更多投票次数", "?privilege=9" ], + [10, "顶评论", "?privilege=10"], + [11, "踩评论", "?privilege=11"], + [12, "发布评论回复", "?privilege=12"], + [13, "边界:罕见", "?privilege=13"], + [14, "边界:稀有", "?privilege=14"], + [15, "边界:史诗", "?privilege=15"], + [16, "边界:传奇", "?privilege=16"], + [17, "Aowow会员", "?privilege=17"] ]; + var mn_community = [ [3,"论坛","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}], [7,"博客","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}], diff --git a/template/pages/privilege.tpl.php b/template/pages/privilege.tpl.php index 476d47b7..7aafd824 100644 --- a/template/pages/privilege.tpl.php +++ b/template/pages/privilege.tpl.php @@ -1,7 +1,8 @@ - - -brick('header'); ?> +brick('header'); +?>
@@ -13,10 +14,10 @@ ?>
-

name;?>

-

privReqPoints;?>


+

h1;?>

+

privReqPoints;?>


brick('article'); + $this->brick('markup', ['markup' => $this->article]); ?>
diff --git a/template/pages/privileges.tpl.php b/template/pages/privileges.tpl.php index 1f804b9c..6e86449b 100644 --- a/template/pages/privileges.tpl.php +++ b/template/pages/privileges.tpl.php @@ -1,7 +1,10 @@ - +brick('header'); ?> + use \Aowow\Lang; + $this->brick('header'); +?>
@@ -14,9 +17,9 @@

-
+

-

+