From 966e888a24fa7115527f2e2da1ff48d0fa3bb400 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 30 Jun 2016 20:19:54 +0200 Subject: [PATCH] Improved user online box --- com.woltlab.wcf/templates/boxUsersOnline.tpl | 2 +- com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl | 2 +- .../lib/system/box/UserOnlineListBoxController.class.php | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/com.woltlab.wcf/templates/boxUsersOnline.tpl b/com.woltlab.wcf/templates/boxUsersOnline.tpl index 3299e48cb5..cb88c70db4 100644 --- a/com.woltlab.wcf/templates/boxUsersOnline.tpl +++ b/com.woltlab.wcf/templates/boxUsersOnline.tpl @@ -1,6 +1,6 @@ {if $usersOnlineList|count} diff --git a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl index 7be8458fb6..79c45ba9b4 100644 --- a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl +++ b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl @@ -4,4 +4,4 @@ {/foreach} -

{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD} {lang}wcf.user.usersOnline.record{/lang}{/if}

\ No newline at end of file +

{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD && $__showRecord} {lang}wcf.user.usersOnline.record{/lang}{/if}

\ No newline at end of file diff --git a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php index b4bd877396..40dfe3e35b 100644 --- a/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php @@ -19,6 +19,12 @@ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxControlle */ protected $supportedPositions = ['footerBoxes', 'sidebarLeft', 'sidebarRight']; + /** + * enables the display of the user online record + * @var boolean + */ + public $showRecord = true; + /** * @inheritDoc */ @@ -47,7 +53,7 @@ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxControlle $templateName = 'boxUsersOnline'; } - return WCF::getTPL()->fetch($templateName, 'wcf', ['usersOnlineList' => $this->objectList]); + return WCF::getTPL()->fetch($templateName, 'wcf', ['usersOnlineList' => $this->objectList, '__showRecord' => $this->showRecord]); } /** -- 2.20.1