Improved user online box
authorMarcel Werk <burntime@woltlab.com>
Thu, 30 Jun 2016 18:19:54 +0000 (20:19 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 30 Jun 2016 18:19:54 +0000 (20:19 +0200)
com.woltlab.wcf/templates/boxUsersOnline.tpl
com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl
wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php

index 3299e48cb54a200ed510143e405c1d3fb17fb758..cb88c70db4ff26a9a32c566932f410e7f6eb3319 100644 (file)
@@ -1,6 +1,6 @@
 <ul class="inlineList dotSeparated">
        <li>{lang}wcf.user.usersOnline.detail{/lang}</li>
-       {if USERS_ONLINE_RECORD}<li>{lang}wcf.user.usersOnline.record{/lang}</li>{/if}
+       {if USERS_ONLINE_RECORD && $__showRecord}<li>{lang}wcf.user.usersOnline.record{/lang}</li>{/if}
 </ul>
 
 {if $usersOnlineList|count}
index 7be8458fb6552b73250cf728442b38b733628d90..79c45ba9b4077a9170ad9c1b5ea910a3b45c848b 100644 (file)
@@ -4,4 +4,4 @@
        {/foreach}
 </ul>
 
-<p><small>{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD} <span class="separatorLeft">{lang}wcf.user.usersOnline.record{/lang}</span>{/if}</small></p>
\ No newline at end of file
+<p><small>{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD && $__showRecord} <span class="separatorLeft">{lang}wcf.user.usersOnline.record{/lang}</span>{/if}</small></p>
\ No newline at end of file
index b4bd877396451d26747902fdefb3a0aba17b4bca..40dfe3e35bb745bcab2dac2daafa71a3dbf0b61a 100644 (file)
@@ -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]);
        }
        
        /**