From 1491db51e36a0c367253d40ae2dc6918376a7cd4 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 11 Apr 2026 20:45:01 +0200 Subject: [PATCH] Template/Cleanup * \n to PHP_EOL * add phpdoc for autocomplete * try to unify indentations * stop mixing quotation marks if possible --- template/bricks/announcement.tpl.php | 4 + template/bricks/book.tpl.php | 4 + template/bricks/contribute.tpl.php | 22 ++++-- template/bricks/footer.tpl.php | 20 +++-- template/bricks/head.tpl.php | 13 +++- template/bricks/headIcons.tpl.php | 10 ++- template/bricks/header.tpl.php | 7 ++ template/bricks/headerMenu.tpl.php | 3 + template/bricks/infobox.tpl.php | 18 ++++- template/bricks/inputbox-form-email.tpl.php | 4 + .../bricks/inputbox-form-password.tpl.php | 1 + template/bricks/inputbox-form-signin.tpl.php | 7 ++ template/bricks/inputbox-form-signup.tpl.php | 1 + template/bricks/inputbox-status.tpl.php | 5 +- template/bricks/lvTabs.tpl.php | 12 ++- template/bricks/mail.tpl.php | 14 +++- template/bricks/mapper.tpl.php | 30 +++++++- template/bricks/markup.tpl.php | 1 + template/bricks/pageTemplate.tpl.php | 24 +++--- template/bricks/reagentList.tpl.php | 10 ++- template/bricks/redButtons.tpl.php | 2 + template/bricks/rewards.tpl.php | 10 ++- template/bricks/series.tpl.php | 4 + template/bricks/tooltip.tpl.php | 13 ++++ .../confirm-delete-account_0.tpl.php | 6 ++ .../confirm-delete-account_2.tpl.php | 6 ++ .../confirm-delete-account_3.tpl.php | 6 ++ .../confirm-delete-account_4.tpl.php | 6 ++ .../confirm-delete-account_6.tpl.php | 6 ++ .../confirm-delete-account_8.tpl.php | 6 ++ template/localized/contrib_0.tpl.php | 41 +++++++++- template/localized/contrib_2.tpl.php | 41 +++++++++- template/localized/contrib_3.tpl.php | 41 +++++++++- template/localized/contrib_4.tpl.php | 40 +++++++++- template/localized/contrib_6.tpl.php | 41 +++++++++- template/localized/contrib_8.tpl.php | 41 +++++++++- template/localized/delete-account_0.tpl.php | 6 ++ template/localized/delete-account_2.tpl.php | 6 ++ template/localized/delete-account_3.tpl.php | 6 ++ template/localized/delete-account_4.tpl.php | 6 ++ template/localized/delete-account_6.tpl.php | 6 ++ template/localized/delete-account_8.tpl.php | 6 ++ template/localized/ssReminder_0.tpl.php | 6 +- template/localized/ssReminder_2.tpl.php | 6 +- template/localized/ssReminder_3.tpl.php | 6 +- template/localized/ssReminder_4.tpl.php | 6 +- template/localized/ssReminder_6.tpl.php | 6 +- template/localized/ssReminder_8.tpl.php | 6 +- template/pages/account.tpl.php | 33 +++++++++ template/pages/achievement.tpl.php | 35 ++++++--- template/pages/achievements.tpl.php | 20 +++-- template/pages/admin/reports.tpl.php | 8 +- template/pages/admin/screenshots.tpl.php | 20 +++-- template/pages/admin/siteconfig.tpl.php | 3 + template/pages/admin/videos.tpl.php | 20 +++-- template/pages/admin/weight-presets.tpl.php | 4 + template/pages/areatriggers.tpl.php | 20 +++-- template/pages/arena-teams.tpl.php | 20 +++-- template/pages/compare.tpl.php | 7 +- template/pages/delete.tpl.php | 5 ++ template/pages/detail-page-generic.tpl.php | 19 ++++- template/pages/enchantment.tpl.php | 24 +++++- template/pages/enchantments.tpl.php | 20 +++-- template/pages/guide-edit.tpl.php | 17 ++++- template/pages/guilds.tpl.php | 22 ++++-- template/pages/home.tpl.php | 28 +++++-- template/pages/icon.tpl.php | 6 ++ template/pages/icons.tpl.php | 20 +++-- template/pages/image-crop.tpl.php | 8 +- template/pages/item.tpl.php | 20 ++++- template/pages/items.tpl.php | 28 ++++--- template/pages/itemset.tpl.php | 29 ++++++-- template/pages/itemsets.tpl.php | 20 +++-- template/pages/list-page-generic.tpl.php | 10 +++ template/pages/maintenance.tpl.php | 7 +- template/pages/maps.tpl.php | 3 + template/pages/npc.tpl.php | 23 ++++-- template/pages/npcs.tpl.php | 19 +++-- template/pages/object.tpl.php | 6 +- template/pages/objects.tpl.php | 20 +++-- template/pages/privilege.tpl.php | 5 ++ template/pages/privileges.tpl.php | 7 +- template/pages/profile.tpl.php | 3 + template/pages/profiler.tpl.php | 3 + template/pages/profiles.tpl.php | 27 +++++-- template/pages/quest.tpl.php | 74 ++++++++++++------- template/pages/quests.tpl.php | 22 ++++-- template/pages/roster.tpl.php | 12 ++- template/pages/screenshot.tpl.php | 11 ++- template/pages/search.tpl.php | 20 +++-- template/pages/sound-playlist.tpl.php | 3 +- template/pages/sound.tpl.php | 5 ++ template/pages/sounds.tpl.php | 20 +++-- template/pages/spell.tpl.php | 56 +++++++++++--- template/pages/spells.tpl.php | 27 +++++-- template/pages/talent.tpl.php | 3 +- template/pages/text-page-generic.tpl.php | 10 +++ template/pages/user.tpl.php | 16 ++++ template/pages/video.tpl.php | 11 ++- 99 files changed, 1188 insertions(+), 283 deletions(-) diff --git a/template/bricks/announcement.tpl.php b/template/bricks/announcement.tpl.php index 4f674a06..4b5313ee 100644 --- a/template/bricks/announcement.tpl.php +++ b/template/bricks/announcement.tpl.php @@ -1,9 +1,13 @@ announcements as $a): ?> +
+ diff --git a/template/bricks/book.tpl.php b/template/bricks/book.tpl.php index 2ef56dc4..e7b3922c 100644 --- a/template/bricks/book.tpl.php +++ b/template/bricks/book.tpl.php @@ -3,7 +3,10 @@ use \Aowow\Lang; + /** @var PageTemplate $this */ + if ($this->book): ?> +

@@ -11,4 +14,5 @@ if ($this->book): ?> + diff --git a/template/bricks/contribute.tpl.php b/template/bricks/contribute.tpl.php index 20d9834a..6f33b293 100644 --- a/template/bricks/contribute.tpl.php +++ b/template/bricks/contribute.tpl.php @@ -1,8 +1,15 @@ - + contribute): ?> +

@@ -10,25 +17,30 @@ if ($this->contribute):
+ localizedBrick('contrib', ['coError' => $this->community['coError'], 'ssError' => $this->community['ssError'], 'viError' => $this->community['viError']]); ?> +
+ diff --git a/template/bricks/footer.tpl.php b/template/bricks/footer.tpl.php index 73eb9586..d42b2964 100644 --- a/template/bricks/footer.tpl.php +++ b/template/bricks/footer.tpl.php @@ -2,31 +2,35 @@ namespace Aowow\Template; use \Aowow\Lang; + + /** @var PageTemplate $this */ ?>
@@ -44,6 +48,8 @@ endif; + + diff --git a/template/bricks/head.tpl.php b/template/bricks/head.tpl.php index 2ecc6468..e279d8ff 100644 --- a/template/bricks/head.tpl.php +++ b/template/bricks/head.tpl.php @@ -2,6 +2,8 @@ namespace Aowow\Template; use \Aowow\Lang; + + /** @var PageTemplate $this */ ?> <?=$this->concat('title', ' - '); ?> @@ -14,32 +16,39 @@ var g_serverTime = gServerTime; ?>; var g_staticUrl = "gStaticUrl; ?>"; var g_host = "gHost; ?>"; + gDataKey): - echo " var g_dataKey = '".$_SESSION['dataKey']."'\n"; + echo " var g_dataKey = '".$_SESSION['dataKey']."'".PHP_EOL; endif; ?> + renderArray('js', 4); ?> hasAnalytics): ?> + rss): ?> + + diff --git a/template/bricks/headIcons.tpl.php b/template/bricks/headIcons.tpl.php index d6fdb62d..5d1225c1 100644 --- a/template/bricks/headIcons.tpl.php +++ b/template/bricks/headIcons.tpl.php @@ -1,18 +1,24 @@ headIcons): foreach ($this->headIcons as $k => $v): - echo '
\n"; + echo '
'.PHP_EOL; endforeach; ?> + + diff --git a/template/bricks/header.tpl.php b/template/bricks/header.tpl.php index ae143fab..6910b755 100644 --- a/template/bricks/header.tpl.php +++ b/template/bricks/header.tpl.php @@ -1,14 +1,19 @@ + + brick('head'); ?> user::isPremium() ? ' class="premium-logo"' : ''); ?>>
+ headerLogo): ?> + +
diff --git a/template/pages/spells.tpl.php b/template/pages/spells.tpl.php index 0579cdad..e3452808 100644 --- a/template/pages/spells.tpl.php +++ b/template/pages/spells.tpl.php @@ -1,28 +1,34 @@ brick('header'); -$f = $this->filter->values; // shorthand + /** @var PageTemplate $this */ + + $this->brick('header'); + $f = $this->filter->values; // shorthand ?> +
brick('announcement'); + $this->brick('announcement'); -$this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [1]]); + $this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [1]]); ?> +
-brick('headIcons'); -$this->brick('redButtons'); +brick('headIcons'); + + $this->brick('redButtons'); ?> +

h1; ?>

@@ -33,6 +39,7 @@ $this->brick('redButtons'); makeOptionsList(Lang::game('sc') , $f['sc'], 28,); ?>
+ classPanel): ?>
ucFirst(Lang::game('class')).Lang::main('colon'); ?>
@@ -42,11 +49,13 @@ $this->brick('redButtons'); makeOptionsList(Lang::game('cl') , $f['cl'], 28, fn($v, $k, &$e) => $v && ($e = ['class' => 'c'.$k])); ?>
+ glyphPanel): ?> +
@@ -55,7 +64,9 @@ if ($this->glyphPanel): makeOptionsList(Lang::game('gl') , $f['gl'], 28); ?>
+ + diff --git a/template/pages/talent.tpl.php b/template/pages/talent.tpl.php index dbc85fe8..2bb03f46 100644 --- a/template/pages/talent.tpl.php +++ b/template/pages/talent.tpl.php @@ -1,10 +1,11 @@ brick('header'); ?> +
diff --git a/template/pages/text-page-generic.tpl.php b/template/pages/text-page-generic.tpl.php index cda04390..4c05960c 100644 --- a/template/pages/text-page-generic.tpl.php +++ b/template/pages/text-page-generic.tpl.php @@ -1,11 +1,15 @@ brick('header'); ?> +
+ brick('announcement'); @@ -13,11 +17,13 @@ if ([$typeStr, $id] = $this->doResync): ?> +
+ inputbox): $this->brick(...$this->inputbox); // $templateName, [$templateVars] else: ?> +
h1 ? '

'.$this->h1.'

' : '');?> @@ -35,10 +42,13 @@ else: echo $this->extraHTML ?? ''; ?> +
+ +
diff --git a/template/pages/user.tpl.php b/template/pages/user.tpl.php index 3e4190da..81bf0372 100644 --- a/template/pages/user.tpl.php +++ b/template/pages/user.tpl.php @@ -3,8 +3,11 @@ use \Aowow\Lang; + /** @var PageTemplate $this */ + $this->brick('header'); ?> +
@@ -14,37 +17,50 @@ $this->brick('pageTemplate'); ?> + + brick('infobox'); ?> +
+ userIcon): ?> +

h1; ?>

+

h1; ?>

+ +

description): ?> +
+
+ lvTabs)): ?> + +
diff --git a/template/pages/video.tpl.php b/template/pages/video.tpl.php index f3cded7d..a069c3ab 100644 --- a/template/pages/video.tpl.php +++ b/template/pages/video.tpl.php @@ -3,20 +3,23 @@ use \Aowow\Lang; + /** @var PageTemplate $this */ + $this->brick('header'); ?> +
brick('announcement'); + $this->brick('announcement'); -$this->brick('pageTemplate'); - -$this->brick('infobox'); + $this->brick('pageTemplate'); + $this->brick('infobox'); ?> +

h1; ?>

ucFirst(Lang::main('name')).Lang::main('colon'); ?>