From 824874e3900dc18ecda00e4f8dd13999543de3b8 Mon Sep 17 00:00:00 2001 From: Znote Date: Thu, 12 Nov 2020 17:33:32 +0000 Subject: [PATCH] Fix #448 TFS 0.3/4 Guild House support Guildhalls that have an owner now shows the Guild Name, which you can click to view the guild. Before it would consider the owner to be player id instead of guild id, and load the player which was completely wrong. Not all TFS 0.3 servers support this, so added a check to see if the guild column declaration was available in town data. Also fixed a bug where it tries to load a sub page if you enter without posting selected town data to it. And added town selection to the top of the list. --- houses.php | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/houses.php b/houses.php index a4149bd..378945b 100644 --- a/houses.php +++ b/houses.php @@ -32,10 +32,28 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') { // Design and present the list if ($array) { + $guild_support = (isset($array[0]['guild'])) ? true : false; ?>

house list.

+
+
+ Town list / houses +
+
+
"> + + + +
+
+
@@ -57,8 +75,13 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') { if ($value['owner'] == 0) echo ""; else { - $data = user_character_data($value['owner'], 'name'); - echo ''; + if ($guild_support && $value['guild'] == 1) { + $guild_name = get_guild_name($value['owner']); + echo ''; + } else { + $data = user_character_data($value['owner'], 'name'); + echo ''; + } } echo ''; } @@ -76,10 +99,25 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') { } } else { if (empty($_POST) === true && $config['ServerEngine'] === 'TFS_03') { - if ($config['allowSubPages']) - header('Location: sub.php?page=houses'); - else - echo 'Sub page system disabled.'; + ?> +
+
+ Town list / houses +
+
+
"> + + + + +
+
+
Name:None'. $data['name'] .''. $guild_name .''. $data['name'] .'