From b252bca43a3a3fe4969c50f5b62a8db998c3db5b Mon Sep 17 00:00:00 2001 From: Znote Date: Sat, 18 Feb 2017 22:59:30 +0000 Subject: [PATCH] forum.php Added player outfit avatars and in-game position. Fix #256 --- config.php | 2 ++ forum.php | 77 ++++++++++++++++++++++++++++++++++---------- layout/css/style.css | 16 ++++++--- 3 files changed, 73 insertions(+), 22 deletions(-) diff --git a/config.php b/config.php index ba37179..f161a7f 100644 --- a/config.php +++ b/config.php @@ -632,6 +632,8 @@ // How to design/display hidden/closed/sticky threads. $config['forum'] = array( 'enabled' => true, + 'outfit_avatars' => true, // Show character outfit as forum avatar? + 'player_position' => true, // Tutor, Community manager, God etc..? 'guildboard' => true, 'level' => 5, 'cooldownPost' => 1,//60, diff --git a/forum.php b/forum.php index 60ab01c..c1748d9 100644 --- a/forum.php +++ b/forum.php @@ -7,11 +7,15 @@ if (!$config['forum']['enabled']) admin_only($user_data); --- Znote AAC forum --- ------------------------------- Created by Znote. - Version 1.2. + Version 1.3. Changelog (1.0 --> 1.2): - Updated to the new date/clock time system - Bootstrap design support. + + Changelog (1.2 --> 1.3): + - Show character outfit as avatar + - Show in-game position */ // BBCODE support: function TransformToBBCode($string) { @@ -530,22 +534,35 @@ if (!empty($_GET)) { if ($access) { + $threadPlayer = ($config['forum']['outfit_avatars'] || $config['forum']['player_position']) ? mysql_select_single("SELECT `id`, `group_id`, `sex`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons` FROM `players` WHERE `id`='".$threadData['player_id']."';") : false; ?> LinkMap: Forum -
Viewing thread: ". $threadData['title'] .""; ?> - + + + @@ -619,23 +636,49 @@ if (!empty($_GET)) { ?>
+ > - - Created by: - ". $threadData['player_name'] .""; - ?> + echo getClock($threadData['created'], true); + if ($threadPlayer === false): ?> + - Created by: + ". $threadData['player_name'] .""; + endif; + ?>
+ '> + +
img + + +
+ +

- + + + diff --git a/layout/css/style.css b/layout/css/style.css index ffe5d60..fefe791 100644 --- a/layout/css/style.css +++ b/layout/css/style.css @@ -619,20 +619,26 @@ hr { } #percent { - position: absolute; - margin-left:175px; + position: absolute; + margin-left:175px; } #bar { - height: 20px; - background-color: green; - border: 1px solid black; + height: 20px; + background-color: green; + border: 1px solid black; } .ThreadTable td { word-break: break-all; } +.ThreadTable td.avatar { + min-width: 100px; + vertical-align: top; + text-align: center; +} + #ThreadTitle { word-wrap: break-word; }
- - - Posted by: - ". $post['player_name'] .""; - ?> + > + + - Posted by: + ". $post['player_name'] .""; + endif; ?>
+ '> + +
img + + +
+ +