<page>com.woltlab.wcf.Dashboard</page>
</visibilityExceptions>
</box>
+
+ <box identifier="com.woltlab.wcf.PaidSubscriptions">
+ <name language="de">Bezahlte Mitgliedschaften</name>
+ <name language="en">Paid Subscriptions</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\PaidSubscriptionsBoxController</controller>
+ <position>contentBottom</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.PaidSubscriptionsSidebar">
+ <name language="de">Bezahlte Mitgliedschaften (Sidebar)</name>
+ <name language="en">Paid Subscriptions (Sidebar)</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\PaidSubscriptionsBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.RegisterButton">
+ <name language="de">Registrierungs-Button</name>
+ <name language="en">Register Button</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\RegisterButtonBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>0</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ <!--<cssClassName></cssClassName> todo -->
+ <visibilityExceptions>
+ <page>com.woltlab.wcf.Dashboard</page>
+ </visibilityExceptions>
+ </box>
+
+ <box identifier="com.woltlab.wcf.SignedInAs">
+ <name language="de">Angemeldet als</name>
+ <name language="en">Signed In As</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\SignedInAsBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>0</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ <visibilityExceptions>
+ <page>com.woltlab.wcf.Dashboard</page>
+ </visibilityExceptions>
+ </box>
+
+ <box identifier="com.woltlab.wcf.Statistics">
+ <name language="de">Statistiken</name>
+ <name language="en">Statistics</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\StatisticsBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ <visibilityExceptions>
+ <page>com.woltlab.wcf.Dashboard</page>
+ </visibilityExceptions>
+ </box>
+
+ <box identifier="com.woltlab.wcf.NewestMembers">
+ <name language="de">Neueste Mitglieder</name>
+ <name language="en">Newest Members</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\NewestMembersBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.MostActiveMembers">
+ <name language="de">Aktivste Mitglieder</name>
+ <name language="en">Most Active Members</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\MostActiveMembersBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.MostLikedMembers">
+ <name language="de">Mitglieder mit den meisten Likes</name>
+ <name language="en">Most Liked Members</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\MostLikedMembersBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.TodaysBirthdays">
+ <name language="de">Heutige Geburtstage</name>
+ <name language="en">Today’s Birthdays</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\TodaysBirthdaysBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.TodaysFollowingBirthdays">
+ <name language="de">Heutige Geburtstage von Nutzern, denen der Nutzer folgt</name>
+ <name language="en">Today’s Birthdays of Users the User Follows</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\TodaysFollowingBirthdaysBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.UsersOnline">
+ <name language="de">Benutzer online</name>
+ <name language="en">Users Online</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\UsersOnlineBoxController</controller>
+ <position>footerBoxes</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.UsersOnlineSidebar">
+ <name language="de">Benutzer online (Sidebar)</name>
+ <name language="en">Users Online (Sidebar)</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\UsersOnlineBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.StaffOnline">
+ <name language="de">Team-Mitglieder online</name>
+ <name language="en">Staff-Members Online</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\StaffOnlineBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
+
+ <box identifier="com.woltlab.wcf.FollowingsOnline">
+ <name language="de">Benutzer online, denen der Nutzer folgt</name>
+ <name language="en">Users Online the User Follows</name>
+ <boxType>system</boxType>
+ <controller>wcf\system\box\FollowingsBoxController</controller>
+ <position>sidebarRight</position>
+ <showHeader>1</showHeader>
+ <visibleEverywhere>0</visibleEverywhere>
+ </box>
</import>
</data>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/dashboardBox.xsd">
- <import>
- <dashboardbox name="com.woltlab.wcf.user.recentActivity">
- <classname><![CDATA[wcf\system\dashboard\box\RecentActivityDashboardBox]]></classname>
- <boxtype>content</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.paidSubscriptions">
- <classname><![CDATA[wcf\system\dashboard\box\PaidSubscriptionsDashboardBox]]></classname>
- <boxtype>content</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.recentActivitySidebar">
- <classname><![CDATA[wcf\system\dashboard\box\RecentActivitySidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.registerButton">
- <classname><![CDATA[wcf\system\dashboard\box\RegisterButtonDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.signedInAs">
- <classname><![CDATA[wcf\system\dashboard\box\SignedInAsDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.statsSidebar">
- <classname><![CDATA[wcf\system\dashboard\box\StatsSidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.newestMembers">
- <classname><![CDATA[wcf\system\dashboard\box\NewestMembersDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.mostActiveMembers">
- <classname><![CDATA[wcf\system\dashboard\box\MostActiveMembersDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.like.mostLikedMembers">
- <classname><![CDATA[wcf\system\dashboard\box\MostLikedMembersDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.todaysBirthdays">
- <classname><![CDATA[wcf\system\dashboard\box\TodaysBirthdaysDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.todaysFollowingBirthdays">
- <classname><![CDATA[wcf\system\dashboard\box\TodaysFollowingBirthdaysDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.usersOnlineSidebar">
- <classname><![CDATA[wcf\system\dashboard\box\UsersOnlineSidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.followingsOnlineSidebar">
- <classname><![CDATA[wcf\system\dashboard\box\FollowingsOnlineSidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.user.staffOnlineSidebar">
- <classname><![CDATA[wcf\system\dashboard\box\StaffOnlineSidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
-
- <dashboardbox name="com.woltlab.wcf.paidSubscriptionsSidebar">
- <classname><![CDATA[wcf\system\dashboard\box\PaidSubscriptionsSidebarDashboardBox]]></classname>
- <boxtype>sidebar</boxtype>
- </dashboardbox>
- </import>
-</data>
<classname><![CDATA[wcf\system\user\activity\event\FollowUserActivityEvent]]></classname>
</type>
- <type>
- <name>com.woltlab.wcf.user.DashboardPage</name>
- <definitionname>com.woltlab.wcf.user.dashboardContainer</definitionname>
- <allowcontent>1</allowcontent>
- <allowsidebar>1</allowsidebar>
- </type>
-
- <type>
- <name>com.woltlab.wcf.user.MembersListPage</name>
- <definitionname>com.woltlab.wcf.user.dashboardContainer</definitionname>
- <allowcontent>0</allowcontent>
- <allowsidebar>1</allowsidebar>
- </type>
-
<type>
<name>com.woltlab.wcf.user</name>
<definitionname>com.woltlab.wcf.moderation.report</definitionname>
<instruction type="bbcode" />
<instruction type="smiley" />
<instruction type="sitemap" />
- <instruction type="dashboardBox" />
<instruction type="userProfileMenu" />
<instruction type="userMenu" />
<instruction type="userNotificationEvent" />
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$usersOnlineList item=userOnline}
+ <li class="box32">
+ <a href="{link controller='User' object=$userOnline}{/link}">{@$userOnline->getAvatar()->getImageTag(32)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$userOnline}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{$userOnline->username}</a></h3>
+ <small>{@$userOnline->lastActivityTime|time}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$mostActiveMembers item=activeMember}
+ <li class="box24">
+ <a href="{link controller='User' object=$activeMember}{/link}">{@$activeMember->getAvatar()->getImageTag(24)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$activeMember}{/link}" class="userLink" data-user-id="{@$activeMember->userID}">{$activeMember->username}</a></h3>
+ <small>{lang}wcf.dashboard.box.mostActiveMembers.points{/lang}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$mostLikedMembers item=likedMember}
+ <li class="box24">
+ <a href="{link controller='User' object=$likedMember}{/link}">{@$likedMember->getAvatar()->getImageTag(24)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$likedMember}{/link}" class="userLink" data-user-id="{@$likedMember->userID}">{$likedMember->username}</a></h3>
+ <small>{lang}wcf.dashboard.box.mostLikedMembers.likes{/lang}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$newestMembers item=newMember}
+ <li class="box24">
+ <a href="{link controller='User' object=$newMember}{/link}">{@$newMember->getAvatar()->getImageTag(24)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$newMember}{/link}" class="userLink" data-user-id="{@$newMember->userID}">{$newMember->username}</a></h3>
+ <small>{@$newMember->registrationDate|time}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<ul class="containerBoxList tripleColumned">
+ {foreach from=$subscriptions item=subscription}
+ <li>
+ <div class="containerHeadline" title="{$subscription->description|language}">
+ <h3>{$subscription->title|language}</h3>
+ <small>{lang}wcf.paidSubscription.formattedCost{/lang}</small>
+ </div>
+
+ {if !PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
+ <div class="containerContent">
+ <ul class="buttonList">
+ {foreach from=$subscription->getPurchaseButtons() item=button}
+ <li>{@$button}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+ </li>
+ {/foreach}
+</ul>
+
+{if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
+ <ul class="buttonList">
+ <li><a class="button small" href="{link controller='PaidSubscriptionList'}{/link}">{lang}wcf.paidSubscription.button.moreInformation{/lang}</a></li>
+ </ul>
+{/if}
\ No newline at end of file
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$subscriptions item=subscription}
+ <li>
+ <div class="sidebarBoxHeadline" title="{$subscription->description|language}">
+ <h3>{$subscription->title|language}</h3>
+ <small>{lang}wcf.paidSubscription.formattedCost{/lang}</small>
+ </div>
+
+ {if !PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
+ <ul class="buttonList">
+ {foreach from=$subscription->getPurchaseButtons() item=button}
+ <li>{@$button}</li>
+ {/foreach}
+ </ul>
+ {/if}
+ </li>
+ {/foreach}
+</ul>
+
+{if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
+ <a class="button small more" href="{link controller='PaidSubscriptionList'}{/link}">{lang}wcf.paidSubscription.button.moreInformation{/lang}</a>
+{/if}
\ No newline at end of file
--- /dev/null
+<a href="{link controller='Register'}{/link}" class="button">{lang}wcf.user.button.registerNow{/lang}</a>
--- /dev/null
+<div class="box96">
+ {@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(96)}
+
+ <div>
+ <div class="containerHeadline">
+ <h3><a href="{link controller='User' object=$__wcf->user}{/link}">{$__wcf->user->username}</a></h3>
+ {if MODULE_USER_RANK}
+ {if $__wcf->getUserProfileHandler()->getUserTitle()}
+ <p><span class="badge userTitleBadge{if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->cssClassName} {@$__wcf->getUserProfileHandler()->getRank()->cssClassName}{/if}">{$__wcf->getUserProfileHandler()->getUserTitle()}</span></p>
+ {/if}
+ {if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->rankImage}
+ <p><span class="userRankImage">{@$__wcf->getUserProfileHandler()->getRank()->getImage()}</span></p>
+ {/if}
+ {/if}
+ </div>
+
+ <dl class="plain dataList">
+ {include file='userInformationStatistics' user=$__wcf->user}
+ </dl>
+ </div>
+</div>
\ No newline at end of file
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$usersOnlineList item=userOnline}
+ <li class="box32">
+ <a href="{link controller='User' object=$userOnline}{/link}">{@$userOnline->getAvatar()->getImageTag(32)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$userOnline}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{$userOnline->username}</a></h3>
+ {if MODULE_USER_RANK}
+ {if $userOnline->getUserTitle()}
+ <p><span class="badge userTitleBadge{if $userOnline->getRank() && $userOnline->getRank()->cssClassName} {@$userOnline->getRank()->cssClassName}{/if}">{$userOnline->getUserTitle()}</span></p>
+ {/if}
+ {if $userOnline->getRank() && $userOnline->getRank()->rankImage}
+ <p><span class="userRankImage">{@$userOnline->getRank()->getImage()}</span></p>
+ {/if}
+ {/if}
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<dl class="plain dataList">
+ <dt>{lang}wcf.user.members{/lang}</dt>
+ <dd>{#$statistics[members]}</dd>
+
+ {event name='stats'}
+
+ {if $statistics[newestMember]}
+ <dt>{lang}wcf.user.newestMember{/lang}</dt>
+ <dd><a href="{link controller='User' object=$statistics[newestMember]}{/link}" class="userLink" data-user-id="{$statistics[newestMember]->userID}">{$statistics[newestMember]}</a></dd>
+ {/if}
+</dl>
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$birthdayUserProfiles item=birthdayUserProfile}
+ <li class="box32">
+ <a href="{link controller='User' object=$birthdayUserProfile}{/link}">{@$birthdayUserProfile->getAvatar()->getImageTag(32)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$birthdayUserProfile}{/link}" class="userLink" data-user-id="{@$birthdayUserProfile->userID}">{$birthdayUserProfile->username}</a></h3>
+ <small>{$birthdayUserProfile->getBirthday()}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
+
+{if $birthdayUserProfiles|count >= 10}
+ <a class="jsTodaysBirthdays button small more jsOnly">{lang}wcf.global.button.showAll{/lang}</a>
+
+ <script data-relocate="true">
+ //<![CDATA[
+ $(function() {
+ var $todaysBirthdays = null;
+ $('.jsTodaysBirthdays').click(function() {
+ if ($todaysBirthdays === null) {
+ $todaysBirthdays = new WCF.User.List('wcf\\data\\user\\UserBirthdayAction', '{lang}wcf.dashboard.box.com.woltlab.wcf.user.todaysBirthdays{/lang} ({@TIME_NOW|date})', { date: '{@TIME_NOW|date:'Y-m-d'}' });
+ }
+ $todaysBirthdays.open();
+ });
+ });
+ //]]>
+ </script>
+{/if}
\ No newline at end of file
--- /dev/null
+<ul class="sidebarBoxList">
+ {foreach from=$birthdayUserProfiles item=birthdayUserProfile}
+ <li class="box32">
+ <a href="{link controller='User' object=$birthdayUserProfile}{/link}">{@$birthdayUserProfile->getAvatar()->getImageTag(32)}</a>
+
+ <div class="sidebarBoxHeadline">
+ <h3><a href="{link controller='User' object=$birthdayUserProfile}{/link}" class="userLink" data-user-id="{@$birthdayUserProfile->userID}">{$birthdayUserProfile->username}</a></h3>
+ <small>{$birthdayUserProfile->getBirthday()}</small>
+ </div>
+ </li>
+ {/foreach}
+</ul>
--- /dev/null
+<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}
+</ul>
+
+{if $usersOnlineList|count}
+ <ul class="inlineList commaSeparated">
+ {foreach from=$usersOnlineList->getObjects() item=userOnline}
+ <li><a href="{link controller='User' object=$userOnline->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{@$userOnline->getFormattedUsername()}</a></li>
+ {/foreach}
+ </ul>
+{/if}
+
+{if USERS_ONLINE_ENABLE_LEGEND && $usersOnlineList->getUsersOnlineMarkings()|count}
+ <dl class="plain inlineDataList usersOnlineLegend">
+ <dt>{lang}wcf.user.usersOnline.marking.legend{/lang}</dt>
+ <dd>
+ <ul class="inlineList commaSeparated">
+ {foreach from=$usersOnlineList->getUsersOnlineMarkings() item=usersOnlineMarking}
+ <li>{@$usersOnlineMarking}</li>
+ {/foreach}
+ </ul>
+ </dd>
+
+ </dl>
+{/if}
--- /dev/null
+<ul class="dataList userList">
+ {foreach from=$usersOnlineList->getObjects() item=userOnline}
+ <li><a href="{link controller='User' object=$userOnline->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{@$userOnline->getFormattedUsername()}</a></li>
+ {/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
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$usersOnlineList item=userOnline}
- <li class="box32">
- <a href="{link controller='User' object=$userOnline}{/link}">{@$userOnline->getAvatar()->getImageTag(32)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$userOnline}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{$userOnline->username}</a></h3>
- <small>{@$userOnline->lastActivityTime|time}</small>
- </div>
- </li>
- {/foreach}
-</ul>
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$mostActiveMembers item=activeMember}
- <li class="box24">
- <a href="{link controller='User' object=$activeMember}{/link}">{@$activeMember->getAvatar()->getImageTag(24)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$activeMember}{/link}" class="userLink" data-user-id="{@$activeMember->userID}">{$activeMember->username}</a></h3>
- <small>{lang}wcf.dashboard.box.mostActiveMembers.points{/lang}</small>
- </div>
- </li>
- {/foreach}
-</ul>
\ No newline at end of file
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$mostLikedMembers item=likedMember}
- <li class="box24">
- <a href="{link controller='User' object=$likedMember}{/link}">{@$likedMember->getAvatar()->getImageTag(24)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$likedMember}{/link}" class="userLink" data-user-id="{@$likedMember->userID}">{$likedMember->username}</a></h3>
- <small>{lang}wcf.dashboard.box.mostLikedMembers.likes{/lang}</small>
- </div>
- </li>
- {/foreach}
-</ul>
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$newestMembers item=newMember}
- <li class="box24">
- <a href="{link controller='User' object=$newMember}{/link}">{@$newMember->getAvatar()->getImageTag(24)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$newMember}{/link}" class="userLink" data-user-id="{@$newMember->userID}">{$newMember->username}</a></h3>
- <small>{@$newMember->registrationDate|time}</small>
- </div>
- </li>
- {/foreach}
-</ul>
\ No newline at end of file
+++ /dev/null
-<section class="section">
- <h2 class="sectionTitle">{lang}wcf.dashboard.box.com.woltlab.wcf.paidSubscriptions{/lang}</h2>
-
- <ul class="containerBoxList tripleColumned">
- {foreach from=$subscriptions item=subscription}
- <li>
- <div class="containerHeadline" title="{$subscription->description|language}">
- <h3>{$subscription->title|language}</h3>
- <small>{lang}wcf.paidSubscription.formattedCost{/lang}</small>
- </div>
-
- {if !PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
- <div class="containerContent">
- <ul class="buttonList">
- {foreach from=$subscription->getPurchaseButtons() item=button}
- <li>{@$button}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
- </li>
- {/foreach}
- </ul>
-
- {if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
- <ul class="buttonList">
- <li><a class="button small" href="{link controller='PaidSubscriptionList'}{/link}">{lang}wcf.paidSubscription.button.moreInformation{/lang}</a></li>
- </ul>
- {/if}
-</section>
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$subscriptions item=subscription}
- <li>
- <div class="sidebarBoxHeadline" title="{$subscription->description|language}">
- <h3>{$subscription->title|language}</h3>
- <small>{lang}wcf.paidSubscription.formattedCost{/lang}</small>
- </div>
-
- {if !PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
- <ul class="buttonList">
- {foreach from=$subscription->getPurchaseButtons() item=button}
- <li>{@$button}</li>
- {/foreach}
- </ul>
- {/if}
- </li>
- {/foreach}
-</ul>
-
-{if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
- <a class="button small more" href="{link controller='PaidSubscriptionList'}{/link}">{lang}wcf.paidSubscription.button.moreInformation{/lang}</a>
-{/if}
\ No newline at end of file
+++ /dev/null
-<section class="section sectionContainerList dashboardBoxRecentActivity" id="dashboardBoxRecentActivity">
- <header class="sectionHeader">
- <h2 class="sectionTitle">{lang}wcf.user.recentActivity{/lang}</h2>
-
- {if $canFilterByFollowedUsers}{*todo*}
- <nav class="jsMobileNavigation buttonGroupNavigation jsOnly jsRecentActivitySwitchContext">
- <ul class="buttonGroup">
- <li><a href="#" class="button small{if !$filteredByFollowedUsers} active{/if}">{lang}wcf.user.recentActivity.scope.all{/lang}</a></li>
- <li><a href="#" class="button small{if $filteredByFollowedUsers} active{/if}">{lang}wcf.user.recentActivity.scope.followedUsers{/lang}</a></li>
- </ul>
- </nav>
- {/if}
- </header>
-
- {assign var='__events' value=$eventList->getObjects()}
- {assign var='__lastEvent' value=$__events|end}
- <ul id="recentActivities" class="containerList recentActivityList" data-last-event-time="{@$lastEventTime}" data-last-event-id="{if $__lastEvent}{@$__lastEvent->eventID}{else}0{/if}">
- {include file='recentActivityListItem'}
- </ul>
-</section>
-
-<script data-relocate="true">
- //<![CDATA[
- $(function() {
- WCF.Language.addObject({
- 'wcf.user.recentActivity.more': '{lang}wcf.user.recentActivity.more{/lang}',
- 'wcf.user.recentActivity.noMoreEntries': '{lang}wcf.user.recentActivity.noMoreEntries{/lang}'
- });
-
- new WCF.User.RecentActivityLoader(null, {if $filteredByFollowedUsers}true{else}false{/if});
- });
- //]]>
-</script>
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$eventList item=event}
- <li class="box24">
- <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(24)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3>
- <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a>
- <small class="separatorLeft">{@$event->time|time}</small>
- </h3>
- <small>{@$event->getTitle()}</small>
- </div>
- </li>
- {/foreach}
-</ul>
+++ /dev/null
-<div class="box dashboardBoxSidebarButton">
- <div class="boxContent">
- <a href="{link controller='Register'}{/link}" class="button">{lang}wcf.user.button.registerNow{/lang}</a>
- </div>
-</div>
+++ /dev/null
-<section class="dashboardBox dashboardBoxSignedInAs">
- <h1 class="invisible">{lang}wcf.dashboard.box.{$box->boxName}{/lang}</h1>
-
- <div class="box96">
- {@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(96)}
-
- <div>
- <div class="containerHeadline">
- <h3><a href="{link controller='User' object=$__wcf->user}{/link}">{$__wcf->user->username}</a></h3>
- {if MODULE_USER_RANK}
- {if $__wcf->getUserProfileHandler()->getUserTitle()}
- <p><span class="badge userTitleBadge{if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->cssClassName} {@$__wcf->getUserProfileHandler()->getRank()->cssClassName}{/if}">{$__wcf->getUserProfileHandler()->getUserTitle()}</span></p>
- {/if}
- {if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->rankImage}
- <p><span class="userRankImage">{@$__wcf->getUserProfileHandler()->getRank()->getImage()}</span></p>
- {/if}
- {/if}
- </div>
-
- <dl class="plain dataList">
- {include file='userInformationStatistics' user=$__wcf->user}
- </dl>
- </div>
- </div>
-</section>
\ No newline at end of file
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$usersOnlineList item=userOnline}
- <li class="box32">
- <a href="{link controller='User' object=$userOnline}{/link}">{@$userOnline->getAvatar()->getImageTag(32)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$userOnline}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{$userOnline->username}</a></h3>
- {if MODULE_USER_RANK}
- {if $userOnline->getUserTitle()}
- <p><span class="badge userTitleBadge{if $userOnline->getRank() && $userOnline->getRank()->cssClassName} {@$userOnline->getRank()->cssClassName}{/if}">{$userOnline->getUserTitle()}</span></p>
- {/if}
- {if $userOnline->getRank() && $userOnline->getRank()->rankImage}
- <p><span class="userRankImage">{@$userOnline->getRank()->getImage()}</span></p>
- {/if}
- {/if}
- </div>
- </li>
- {/foreach}
-</ul>
+++ /dev/null
-<dl class="plain dataList">
- <dt>{lang}wcf.user.members{/lang}</dt>
- <dd>{#$dashboardStats[members]}</dd>
-
- {event name='stats'}
-
- {if $dashboardStats[newestMember]}
- <dt>{lang}wcf.user.newestMember{/lang}</dt>
- <dd><a href="{link controller='User' object=$dashboardStats[newestMember]}{/link}" class="userLink" data-user-id="{$dashboardStats[newestMember]->userID}">{$dashboardStats[newestMember]}</a></dd>
- {/if}
-</dl>
\ No newline at end of file
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$birthdayUserProfiles item=birthdayUserProfile}
- <li class="box32">
- <a href="{link controller='User' object=$birthdayUserProfile}{/link}">{@$birthdayUserProfile->getAvatar()->getImageTag(32)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$birthdayUserProfile}{/link}" class="userLink" data-user-id="{@$birthdayUserProfile->userID}">{$birthdayUserProfile->username}</a></h3>
- <small>{$birthdayUserProfile->getBirthday()}</small>
- </div>
- </li>
- {/foreach}
-</ul>
-
-{if $birthdayUserProfiles|count >= 10}
- <a class="jsTodaysBirthdays button small more jsOnly">{lang}wcf.global.button.showAll{/lang}</a>
-
- <script data-relocate="true">
- //<![CDATA[
- $(function() {
- var $todaysBirthdays = null;
- $('.jsTodaysBirthdays').click(function() {
- if ($todaysBirthdays === null) {
- $todaysBirthdays = new WCF.User.List('wcf\\data\\user\\UserBirthdayAction', '{lang}wcf.dashboard.box.com.woltlab.wcf.user.todaysBirthdays{/lang} ({@TIME_NOW|date})', { date: '{@TIME_NOW|date:'Y-m-d'}' });
- }
- $todaysBirthdays.open();
- });
- });
- //]]>
- </script>
-{/if}
\ No newline at end of file
+++ /dev/null
-<ul class="sidebarBoxList">
- {foreach from=$birthdayUserProfiles item=birthdayUserProfile}
- <li class="box32">
- <a href="{link controller='User' object=$birthdayUserProfile}{/link}">{@$birthdayUserProfile->getAvatar()->getImageTag(32)}</a>
-
- <div class="sidebarBoxHeadline">
- <h3><a href="{link controller='User' object=$birthdayUserProfile}{/link}" class="userLink" data-user-id="{@$birthdayUserProfile->userID}">{$birthdayUserProfile->username}</a></h3>
- <small>{$birthdayUserProfile->getBirthday()}</small>
- </div>
- </li>
- {/foreach}
-</ul>
+++ /dev/null
-<ul class="dataList userList">
- {foreach from=$usersOnlineList->getObjects() item=userOnline}
- <li><a href="{link controller='User' object=$userOnline->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{@$userOnline->getFormattedUsername()}</a></li>
- {/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
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\user\online\UsersOnlineList;
+use wcf\system\WCF;
+
+/**
+ * Lists online users the active user is following.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class FollowingsOnlineBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.user.followingsOnline'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList') && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
+ $usersOnlineList = new UsersOnlineList();
+ $usersOnlineList->getConditionBuilder()->add('session.userID IN (?)', array(WCF::getUserProfileHandler()->getFollowingUsers()));
+ $usersOnlineList->sqlLimit = 10;
+ $usersOnlineList->readObjects();
+
+ if (count($usersOnlineList)) {
+ WCF::getTPL()->assign([
+ 'usersOnlineList' => $usersOnlineList
+ ]);
+
+ $this->content = WCF::getTPL()->fetch('boxFollowingsOnline');
+ }
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\DatabaseObject;
+use wcf\system\cache\builder\MostActiveMembersCacheBuilder;
+use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+
+/**
+ * Shows a list of the most active members.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class MostActiveMembersBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.mostActiveMembers'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function hasImage() {
+ if (MODULE_MEMBERS_LIST) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getLink() {
+ if (MODULE_MEMBERS_LIST) {
+ return LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=activityPoints&sortOrder=DESC');
+ }
+
+ return '';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ // get ids
+ $mostActiveMemberIDs = MostActiveMembersCacheBuilder::getInstance()->getData();
+ if (!empty($mostActiveMemberIDs)) {
+ UserProfileRuntimeCache::getInstance()->cacheObjectIDs($mostActiveMemberIDs);
+
+ // get users
+ $mostActiveMembers = UserProfileRuntimeCache::getInstance()->getObjects($mostActiveMemberIDs);
+ DatabaseObject::sort($mostActiveMembers, 'activityPoints', 'DESC');
+
+ WCF::getTPL()->assign([
+ 'mostActiveMembers' => $mostActiveMembers
+ ]);
+ $this->content = WCF::getTPL()->fetch('boxMostActiveMembers');
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\DatabaseObject;
+use wcf\system\cache\builder\MostLikedMembersCacheBuilder;
+use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+
+/**
+ * Shows a list of the most liked members.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class MostLikedMembersBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.mostLikedMembers'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function hasImage() {
+ if (MODULE_MEMBERS_LIST) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getLink() {
+ if (MODULE_MEMBERS_LIST) {
+ return LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=likesReceived&sortOrder=DESC');;
+ }
+
+ return '';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ // get ids
+ $mostLikedMemberIDs = MostLikedMembersCacheBuilder::getInstance()->getData();
+ if (!empty($mostLikedMemberIDs)) {
+ UserProfileRuntimeCache::getInstance()->cacheObjectIDs($mostLikedMemberIDs);
+
+ // get users
+ $mostLikedMembers = UserProfileRuntimeCache::getInstance()->getObjects($mostLikedMemberIDs);
+ DatabaseObject::sort($mostLikedMembers, 'likesReceived', 'DESC');
+
+ WCF::getTPL()->assign([
+ 'mostLikedMembers' => $mostLikedMembers
+ ]);
+ $this->content = WCF::getTPL()->fetch('boxMostLikedMembers');
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\DatabaseObject;
+use wcf\system\cache\builder\NewestMembersCacheBuilder;
+use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+
+/**
+ * Shows a list of the newest members.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class NewestMembersBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.newestMembers'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function hasImage() {
+ if (MODULE_MEMBERS_LIST) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getLink() {
+ if (MODULE_MEMBERS_LIST) {
+ return LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=registrationDate&sortOrder=DESC');
+ }
+
+ return '';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ // get ids
+ $newestMemberIDs = NewestMembersCacheBuilder::getInstance()->getData();
+ if (!empty($newestMemberIDs)) {
+ UserProfileRuntimeCache::getInstance()->cacheObjectIDs($newestMemberIDs);
+
+ // get users
+ $newestMembers = UserProfileRuntimeCache::getInstance()->getObjects($newestMemberIDs);
+ DatabaseObject::sort($newestMembers, 'registrationDate', 'DESC');
+
+ WCF::getTPL()->assign([
+ 'newestMembers' => $newestMembers
+ ]);
+ $this->content = WCF::getTPL()->fetch('boxNewestMembers');
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\paid\subscription\user\PaidSubscriptionUserList;
+use wcf\system\cache\builder\PaidSubscriptionCacheBuilder;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+
+/**
+ * Box for paid subscriptions.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class PaidSubscriptionsBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['contentTop', 'contentBottom', 'sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.user.menu.settings.paidSubscription');
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getLink() {
+ return LinkHandler::getInstance()->getLink('PaidSubscriptionList');
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function hasLink() {
+ return true;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (WCF::getUser()->userID && MODULE_PAID_SUBSCRIPTION) {
+ // get available subscriptions
+ $subscriptions = PaidSubscriptionCacheBuilder::getInstance()->getData();
+
+ // get purchased subscriptions
+ $userSubscriptionList = new PaidSubscriptionUserList();
+ $userSubscriptionList->getConditionBuilder()->add('userID = ?', [WCF::getUser()->userID]);
+ $userSubscriptionList->getConditionBuilder()->add('isActive = ?', [1]);
+ $userSubscriptionList->readObjects();
+
+ // remove purchased subscriptions
+ foreach ($userSubscriptionList as $userSubscription) {
+ if (isset($subscriptions[$userSubscription->subscriptionID])) {
+ $userSubscription->setSubscription($subscriptions[$userSubscription->subscriptionID]);
+ unset($subscriptions[$userSubscription->subscriptionID]);
+ }
+ }
+ // remove excluded subscriptions
+ foreach ($userSubscriptionList as $userSubscription) {
+ if ($userSubscription->getSubscription()->excludedSubscriptionIDs) {
+ foreach (explode(',', $userSubscription->getSubscription()->excludedSubscriptionIDs) as $subscriptionID) {
+ if (isset($subscriptions[$subscriptionID])) unset($subscriptions[$subscriptionID]);
+ }
+ }
+ }
+
+ if (!empty($this->subscriptions)) {
+ if ($this->getBox()->position == 'contentTop' || $this->getBox()->position == 'contentBottom') {
+ $templateName = 'boxPaidSubscriptions';
+ }
+ else {
+ $templateName = 'boxPaidSubscriptionsSidebar';
+ }
+
+ WCF::getTPL()->assign([
+ 'subscriptions' => $subscriptions
+ ]);
+
+ $this->content = WCF::getTPL()->fetch($templateName);
+ }
+
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\system\WCF;
+
+/**
+ * Box that shows the register button.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class RegisterButtonBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.user.register');
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (!WCF::getUser()->userID && !REGISTER_DISABLED) {
+ $this->content = WCF::getTPL()->fetch('boxRegisterButton');
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\system\WCF;
+
+/**
+ * Box that shows the register button.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class SignedInAsBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (WCF::getUser()->userID) {
+ $this->content = WCF::getTPL()->fetch('boxSignedInAs');
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\user\online\UsersOnlineList;
+use wcf\system\WCF;
+
+/**
+ * Lists staff members who are online.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class StaffOnlineBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.user.staffOnline'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {
+ $usersOnlineList = new UsersOnlineList();
+ $usersOnlineList->getConditionBuilder()->add('session.userID IN (SELECT userID FROM wcf'.WCF_N.'_user_to_group WHERE groupID IN (SELECT groupID FROM wcf'.WCF_N.'_user_group WHERE showOnTeamPage = ?))', array(1));
+ $usersOnlineList->readObjects();
+
+ if (count($usersOnlineList)) {
+ WCF::getTPL()->assign([
+ 'usersOnlineList' => $usersOnlineList
+ ]);
+
+ $this->content = WCF::getTPL()->fetch('boxStaffOnline');
+ }
+ }
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\system\cache\builder\UserStatsCacheBuilder;
+use wcf\system\WCF;
+
+/**
+ * Box that shows global statistics.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class StatisticsBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.statistics'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ WCF::getTPL()->assign(array(
+ 'statistics' => UserStatsCacheBuilder::getInstance()->getData()
+ ));
+
+ $this->content = WCF::getTPL()->fetch('boxStatistics');
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\user\option\UserOption;
+use wcf\system\cache\builder\UserOptionCacheBuilder;
+use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\user\UserBirthdayCache;
+use wcf\system\WCF;
+use wcf\util\DateUtil;
+
+/**
+ * Shows today's birthdays.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class TodaysBirthdaysBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['sidebarLeft', 'sidebarRight'];
+
+ /**
+ * template name
+ * @var string
+ */
+ protected $templateName = 'boxTodaysBirthdays';
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.todaysBirthdays'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ // get current date
+ $currentDay = DateUtil::format(null, 'm-d');
+ $date = explode('-', DateUtil::format(null, 'Y-n-j'));
+
+ // get user ids
+ $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]);
+ $this->filterUserIDs($userIDs);
+
+ if (!empty($userIDs)) {
+ $userOptions = UserOptionCacheBuilder::getInstance()->getData([], 'options');
+ if (isset($userOptions['birthday'])) {
+ /** @var UserOption $birthdayUserOption */
+ $birthdayUserOption = $userOptions['birthday'];
+
+ $userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIDs);
+ $visibleUserProfiles = [];
+
+ $i = 0;
+ foreach ($userProfiles as $userProfile) {
+ if ($i == 10) break;
+
+ $birthdayUserOption->setUser($userProfile->getDecoratedObject());
+
+ if (!$userProfile->isProtected() && $birthdayUserOption->isVisible() && substr($userProfile->birthday, 5) == $currentDay) {
+ $visibleUserProfiles[] = $userProfile;
+ $i++;
+ }
+ }
+
+ if (!empty($visibleUserProfiles)) {
+ WCF::getTPL()->assign([
+ 'birthdayUserProfiles' => $visibleUserProfiles
+ ]);
+ $this->content = WCF::getTPL()->fetch($this->templateName);
+ }
+ }
+ }
+ }
+
+ /**
+ * Filters given user ids.
+ *
+ * @param integer[] $userIDs
+ */
+ protected function filterUserIDs(&$userIDs) {}
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\system\WCF;
+
+/**
+ * Shows today's birthdays of users the active user is following.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class TodaysFollowingBirthdaysBoxController extends TodaysBirthdaysBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $templateName = 'boxTodaysFollowingBirthdays';
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.page.todaysFollowingBirthdays'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function filterUserIDs(&$userIDs) {
+ $userIDs = array_intersect($userIDs, WCF::getUserProfileHandler()->getFollowingUsers());
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\user\online\UsersOnlineList;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+
+/**
+ * Lists all users who are online.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.box
+ * @category Community Framework
+ */
+class UsersOnlineBoxController extends AbstractBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $supportedPositions = ['footerBoxes', 'sidebarLeft', 'sidebarRight'];
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return WCF::getLanguage()->get('wcf.user.usersOnline'); // @todo
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getLink() {
+ return LinkHandler::getInstance()->getLink('UsersOnlineList');
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function hasLink() {
+ return true;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function loadContent() {
+ if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {
+ $usersOnlineList = new UsersOnlineList();
+ $usersOnlineList->readStats();
+ $usersOnlineList->checkRecord();
+ $usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL');
+ $usersOnlineList->readObjects();
+
+ if (count($usersOnlineList)) {
+ if ($this->getBox()->position == 'footerBoxes') {
+ $templateName = 'boxUsersOnline';
+ }
+ else {
+ $templateName = 'boxUsersOnlineSidebar';
+ }
+
+ WCF::getTPL()->assign([
+ 'usersOnlineList' => $usersOnlineList
+ ]);
+
+ $this->content = WCF::getTPL()->fetch($templateName);
+ }
+ }
+ }
+}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\online\UsersOnlineList;
-use wcf\page\IPage;
-use wcf\system\WCF;
-
-/**
- * Lists online users the active user is following.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class FollowingsOnlineSidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * users online list
- * @var \wcf\data\user\online\UsersOnlineList
- */
- public $usersOnlineList = null;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList') && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
- $this->usersOnlineList = new UsersOnlineList();
- $this->usersOnlineList->getConditionBuilder()->add('session.userID IN (?)', array(WCF::getUserProfileHandler()->getFollowingUsers()));
- $this->usersOnlineList->sqlLimit = 10;
- $this->usersOnlineList->readObjects();
- }
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (empty($this->usersOnlineList) || !count($this->usersOnlineList->getObjects())) {
- return '';
- }
-
- WCF::getTPL()->assign(array(
- 'usersOnlineList' => $this->usersOnlineList
- ));
- return WCF::getTPL()->fetch('dashboardBoxFollowingsOnlineSidebar');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\DatabaseObject;
-use wcf\page\IPage;
-use wcf\system\cache\builder\MostActiveMembersCacheBuilder;
-use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
-
-/**
- * Shows a list of the most active members.
- *
- * @author Marcel Werk
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class MostActiveMembersDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * ids of the most active members
- * @var integer[]
- */
- public $mostActiveMemberIDs = [];
-
- /**
- * @inheritDoc
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- // get ids
- $this->mostActiveMemberIDs = MostActiveMembersCacheBuilder::getInstance()->getData();
- if (!empty($this->mostActiveMemberIDs)) {
- UserProfileRuntimeCache::getInstance()->cacheObjectIDs($this->mostActiveMemberIDs);
- }
-
- $this->fetched();
- }
-
- /**
- * @inheritDoc
- */
- protected function render() {
- if (empty($this->mostActiveMemberIDs)) return '';
-
- if (MODULE_MEMBERS_LIST) {
- $this->titleLink = LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=activityPoints&sortOrder=DESC');
- }
-
- $mostActiveMembers = UserProfileRuntimeCache::getInstance()->getObjects($this->mostActiveMemberIDs);
- DatabaseObject::sort($mostActiveMembers, 'activityPoints', 'DESC');
-
- WCF::getTPL()->assign([
- 'mostActiveMembers' => $mostActiveMembers
- ]);
- return WCF::getTPL()->fetch('dashboardBoxMostActiveMembers');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\DatabaseObject;
-use wcf\page\IPage;
-use wcf\system\cache\builder\MostLikedMembersCacheBuilder;
-use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
-
-/**
- * Shows a list of the most liked members.
- *
- * @author Marcel Werk
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class MostLikedMembersDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * ids of the most liked members
- * @var integer[]
- */
- public $mostLikedMemberIDs = [];
-
- /**
- * @inheritDoc
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- // get ids
- $this->mostLikedMemberIDs = MostLikedMembersCacheBuilder::getInstance()->getData();
-
- $this->fetched();
-
- if (!empty($this->mostLikedMemberIDs)) {
- UserProfileRuntimeCache::getInstance()->cacheObjectIDs($this->mostLikedMemberIDs);
- }
- }
-
- /**
- * @inheritDoc
- */
- protected function render() {
- if (empty($this->mostLikedMemberIDs)) return '';
-
- if (MODULE_MEMBERS_LIST) {
- $this->titleLink = LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=likesReceived&sortOrder=DESC');
- }
-
- $mostLikedMembers = UserProfileRuntimeCache::getInstance()->getObjects($this->mostLikedMemberIDs);
- DatabaseObject::sort($mostLikedMembers, 'likesReceived', 'DESC');
-
- WCF::getTPL()->assign([
- 'mostLikedMembers' => $mostLikedMembers
- ]);
- return WCF::getTPL()->fetch('dashboardBoxMostLikedMembers');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\DatabaseObject;
-use wcf\page\IPage;
-use wcf\system\cache\builder\NewestMembersCacheBuilder;
-use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
-
-/**
- * Shows a list of the newest members.
- *
- * @author Marcel Werk
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class NewestMembersDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * ids of the newest members
- * @var integer[]
- */
- public $newestMemberIDs = [];
-
- /**
- * @inheritDoc
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- // get ids
- $this->newestMemberIDs = NewestMembersCacheBuilder::getInstance()->getData();
- if (!empty($this->newestMemberIDs)) {
- UserProfileRuntimeCache::getInstance()->cacheObjectIDs($this->newestMemberIDs);
- }
-
- $this->fetched();
- }
-
- /**
- * @inheritDoc
- */
- protected function render() {
- if (empty($this->newestMemberIDs)) return '';
-
- if (MODULE_MEMBERS_LIST) {
- $this->titleLink = LinkHandler::getInstance()->getLink('MembersList', [], 'sortField=registrationDate&sortOrder=DESC');
- }
-
- $newestMembers = UserProfileRuntimeCache::getInstance()->getObjects($this->newestMemberIDs);
- DatabaseObject::sort($newestMembers, 'registrationDate', 'DESC');
-
- WCF::getTPL()->assign([
- 'newestMembers' => $newestMembers
- ]);
- return WCF::getTPL()->fetch('dashboardBoxNewestMembers');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\paid\subscription\user\PaidSubscriptionUserList;
-use wcf\page\IPage;
-use wcf\system\cache\builder\PaidSubscriptionCacheBuilder;
-use wcf\system\WCF;
-
-/**
- * Dashboard box for paid subscriptions.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class PaidSubscriptionsDashboardBox extends AbstractContentDashboardBox {
- /**
- * list of available paid subscriptions
- * @var array
- */
- public $subscriptions = array();
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (WCF::getUser()->userID && MODULE_PAID_SUBSCRIPTION) {
- // get available subscriptions
- $this->subscriptions = PaidSubscriptionCacheBuilder::getInstance()->getData();
-
- // get purchased subscriptions
- $userSubscriptionList = new PaidSubscriptionUserList();
- $userSubscriptionList->getConditionBuilder()->add('userID = ?', array(WCF::getUser()->userID));
- $userSubscriptionList->getConditionBuilder()->add('isActive = ?', array(1));
- $userSubscriptionList->readObjects();
-
- // remove purchased subscriptions
- foreach ($userSubscriptionList as $userSubscription) {
- if (isset($this->subscriptions[$userSubscription->subscriptionID])) {
- $userSubscription->setSubscription($this->subscriptions[$userSubscription->subscriptionID]);
- unset($this->subscriptions[$userSubscription->subscriptionID]);
- }
- }
- // remove excluded subscriptions
- foreach ($userSubscriptionList as $userSubscription) {
- if ($userSubscription->getSubscription()->excludedSubscriptionIDs) {
- foreach (explode(',', $userSubscription->getSubscription()->excludedSubscriptionIDs) as $subscriptionID) {
- if (isset($this->subscriptions[$subscriptionID])) unset($this->subscriptions[$subscriptionID]);
- }
- }
- }
- }
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (!empty($this->subscriptions)) {
- WCF::getTPL()->assign(array(
- 'subscriptions' => $this->subscriptions
- ));
-
- return WCF::getTPL()->fetch('dashboardBoxPaidSubscriptions');
- }
-
- return '';
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\paid\subscription\user\PaidSubscriptionUserList;
-use wcf\page\IPage;
-use wcf\system\cache\builder\PaidSubscriptionCacheBuilder;
-use wcf\system\WCF;
-
-/**
- * Dashboard box for paid subscriptions.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class PaidSubscriptionsSidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * list of available paid subscriptions
- * @var array
- */
- public $subscriptions = array();
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (WCF::getUser()->userID && MODULE_PAID_SUBSCRIPTION) {
- // get available subscriptions
- $this->subscriptions = PaidSubscriptionCacheBuilder::getInstance()->getData();
-
- // get purchased subscriptions
- $userSubscriptionList = new PaidSubscriptionUserList();
- $userSubscriptionList->getConditionBuilder()->add('userID = ?', array(WCF::getUser()->userID));
- $userSubscriptionList->getConditionBuilder()->add('isActive = ?', array(1));
- $userSubscriptionList->readObjects();
-
- // remove purchased subscriptions
- foreach ($userSubscriptionList as $userSubscription) {
- if (isset($this->subscriptions[$userSubscription->subscriptionID])) {
- $userSubscription->setSubscription($this->subscriptions[$userSubscription->subscriptionID]);
- unset($this->subscriptions[$userSubscription->subscriptionID]);
- }
- }
- // remove excluded subscriptions
- foreach ($userSubscriptionList as $userSubscription) {
- if ($userSubscription->getSubscription()->excludedSubscriptionIDs) {
- foreach (explode(',', $userSubscription->getSubscription()->excludedSubscriptionIDs) as $subscriptionID) {
- if (isset($this->subscriptions[$subscriptionID])) unset($this->subscriptions[$subscriptionID]);
- }
- }
- }
- }
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (!empty($this->subscriptions)) {
- WCF::getTPL()->assign(array(
- 'subscriptions' => $this->subscriptions
- ));
-
- return WCF::getTPL()->fetch('dashboardBoxPaidSubscriptionsSidebar');
- }
-
- return '';
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\activity\event\ViewableUserActivityEventList;
-use wcf\page\IPage;
-use wcf\system\user\activity\event\UserActivityEventHandler;
-use wcf\system\WCF;
-
-/**
- * Dashboard box for recent activity.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class RecentActivityDashboardBox extends AbstractContentDashboardBox {
- /**
- * true, if user can filter by followed users
- * @var boolean
- */
- public $canFilterByFollowedUsers = false;
-
- /**
- * recent activity list
- * @var \wcf\data\user\activity\event\ViewableUserActivityEventList
- */
- public $eventList = null;
-
- /**
- * true, if results were filtered by followed users
- * @var boolean
- */
- public $filteredByFollowedUsers = false;
-
- /**
- * latest event time
- * @var integer
- */
- public $lastEventTime = 0;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (WCF::getUser()->userID && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
- $this->canFilterByFollowedUsers = true;
- }
-
- $this->eventList = new ViewableUserActivityEventList();
- if ($this->canFilterByFollowedUsers && WCF::getUser()->recentActivitiesFilterByFollowing) {
- $this->filteredByFollowedUsers = true;
- $this->eventList->getConditionBuilder()->add('user_activity_event.userID IN (?)', array(WCF::getUserProfileHandler()->getFollowingUsers()));
- }
- $this->eventList->sqlLimit = RECENT_ACTIVITY_ITEMS;
- $this->eventList->readObjects();
- $this->lastEventTime = $this->eventList->getLastEventTime();
-
- // removes orphaned and non-accessable events
- UserActivityEventHandler::validateEvents($this->eventList);
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (count($this->eventList) || $this->filteredByFollowedUsers) {
- WCF::getTPL()->assign(array(
- 'canFilterByFollowedUsers' => $this->canFilterByFollowedUsers,
- 'eventList' => $this->eventList,
- 'lastEventTime' => $this->lastEventTime,
- 'filteredByFollowedUsers' => $this->filteredByFollowedUsers
- ));
-
- return WCF::getTPL()->fetch('dashboardBoxRecentActivity');
- }
-
- return '';
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\activity\event\ViewableUserActivityEventList;
-use wcf\page\IPage;
-use wcf\system\user\activity\event\UserActivityEventHandler;
-use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
-
-/**
- * Dashboard box for recent activity in the sidebar.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class RecentActivitySidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * recent activity list
- * @var \wcf\data\user\activity\event\ViewableUserActivityEventList
- */
- public $eventList = null;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- $this->eventList = new ViewableUserActivityEventList();
- $this->eventList->sqlLimit = RECENT_ACTIVITY_SIDEBAR_ITEMS;
- $this->eventList->readObjects();
-
- // removes orphaned and non-accessable events
- UserActivityEventHandler::validateEvents($this->eventList);
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (count($this->eventList)) {
- $this->titleLink = LinkHandler::getInstance()->getLink('RecentActivityList');
- WCF::getTPL()->assign(array(
- 'eventList' => $this->eventList
- ));
-
- return WCF::getTPL()->fetch('dashboardBoxRecentActivitySidebar');
- }
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\system\WCF;
-
-/**
- * Dashboard box for registration button.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class RegisterButtonDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::$templateName
- */
- public $templateName = 'dashboardBoxRegisterButton';
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- return ((!WCF::getUser()->userID && !REGISTER_DISABLED) ? true : false);
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\system\WCF;
-
-/**
- * 'Signed in as' dashboard box.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class SignedInAsDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::$templateName
- */
- public $templateName = 'dashboardBoxSignedInAs';
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- return (WCF::getUser()->userID ? true : false);
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\online\UsersOnlineList;
-use wcf\page\IPage;
-use wcf\system\WCF;
-
-/**
- * Lists staff members who are online.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class StaffOnlineSidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * users online list
- * @var \wcf\data\user\online\UsersOnlineList
- */
- public $usersOnlineList = null;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (MODULE_USERS_ONLINE) {
- $this->usersOnlineList = new UsersOnlineList();
- $this->usersOnlineList->getConditionBuilder()->add('session.userID IN (SELECT userID FROM wcf'.WCF_N.'_user_to_group WHERE groupID IN (SELECT groupID FROM wcf'.WCF_N.'_user_group WHERE showOnTeamPage = ?))', array(1));
- $this->usersOnlineList->readObjects();
- }
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (empty($this->usersOnlineList) || !count($this->usersOnlineList->getObjects())) {
- return '';
- }
-
- WCF::getTPL()->assign(array(
- 'usersOnlineList' => $this->usersOnlineList
- ));
- return WCF::getTPL()->fetch('dashboardBoxStaffOnlineSidebar');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\page\IPage;
-use wcf\system\cache\builder\UserStatsCacheBuilder;
-use wcf\system\WCF;
-
-/**
- * Stats dashboard box.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class StatsSidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * displayed stats
- * @var array
- */
- public $stats = null;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- $this->stats = UserStatsCacheBuilder::getInstance()->getData();
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- WCF::getTPL()->assign(array(
- 'dashboardStats' => $this->stats
- ));
-
- return WCF::getTPL()->fetch('dashboardBoxStatsSidebar');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\UserProfile;
-use wcf\page\IPage;
-use wcf\system\cache\builder\UserOptionCacheBuilder;
-use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\user\UserBirthdayCache;
-use wcf\system\WCF;
-use wcf\util\DateUtil;
-
-/**
- * Shows today's birthdays.
- *
- * @author Marcel Werk
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class TodaysBirthdaysDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * user profiles
- * @var UserProfile[]
- */
- public $userProfiles = [];
-
- /**
- * @inheritDoc
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- // get current date
- $currentDay = DateUtil::format(null, 'm-d');
- $date = explode('-', DateUtil::format(null, 'Y-n-j'));
-
- // get user ids
- $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]);
-
- if (!empty($userIDs)) {
- $userOptions = UserOptionCacheBuilder::getInstance()->getData([], 'options');
- if (isset($userOptions['birthday'])) {
- $birthdayUserOption = $userOptions['birthday'];
-
- $userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIDs);
-
- $i = 0;
- foreach ($userProfiles as $userProfile) {
- if ($i == 10) break;
-
- $birthdayUserOption->setUser($userProfile->getDecoratedObject());
-
- if (!$userProfile->isProtected() && $birthdayUserOption->isVisible() && substr($userProfile->birthday, 5) == $currentDay) {
- $this->userProfiles[] = $userProfile;
- $i++;
- }
- }
- }
- }
-
- $this->fetched();
- }
-
- /**
- * @inheritDoc
- */
- protected function render() {
- if (empty($this->userProfiles)) {
- return '';
- }
-
- WCF::getTPL()->assign([
- 'birthdayUserProfiles' => $this->userProfiles
- ]);
- return WCF::getTPL()->fetch('dashboardBoxTodaysBirthdays');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\UserProfile;
-use wcf\page\IPage;
-use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\user\UserBirthdayCache;
-use wcf\system\WCF;
-use wcf\util\DateUtil;
-
-/**
- * Shows today's birthdays of users the active user is following.
- *
- * @author Marcel Werk
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class TodaysFollowingBirthdaysDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * user profiles
- * @var UserProfile[]
- */
- public $userProfiles = [];
-
- /**
- * @inheritDoc
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- // get current date
- $currentDay = DateUtil::format(null, 'm-d');
- $date = explode('-', DateUtil::format(null, 'Y-n-j'));
-
- // get user ids
- $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]);
- $userIDs = array_intersect($userIDs, WCF::getUserProfileHandler()->getFollowingUsers());
-
- if (!empty($userIDs)) {
- $userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIDs);
-
- $i = 0;
- foreach ($userProfiles as $userProfile) {
- if ($i == 10) break;
-
- if (!$userProfile->isProtected() && substr($userProfile->birthday, 5) == $currentDay) {
- $this->userProfiles[] = $userProfile;
- $i++;
- }
- }
- }
-
- $this->fetched();
- }
-
- /**
- * @inheritDoc
- */
- protected function render() {
- if (empty($this->userProfiles)) {
- return '';
- }
-
- WCF::getTPL()->assign([
- 'birthdayUserProfiles' => $this->userProfiles
- ]);
- return WCF::getTPL()->fetch('dashboardBoxTodaysFollowingBirthdays');
- }
-}
+++ /dev/null
-<?php
-namespace wcf\system\dashboard\box;
-use wcf\data\dashboard\box\DashboardBox;
-use wcf\data\user\online\UsersOnlineList;
-use wcf\page\IPage;
-use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
-
-/**
- * Lists all users who are online.
- *
- * @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.dashboard.box
- * @category Community Framework
- */
-class UsersOnlineSidebarDashboardBox extends AbstractSidebarDashboardBox {
- /**
- * users online list
- * @var \wcf\data\user\online\UsersOnlineList
- */
- public $usersOnlineList = null;
-
- /**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
- */
- public function init(DashboardBox $box, IPage $page) {
- parent::init($box, $page);
-
- if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {
- $this->usersOnlineList = new UsersOnlineList();
- $this->usersOnlineList->readStats();
- $this->usersOnlineList->checkRecord();
- $this->usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL');
- $this->usersOnlineList->readObjects();
- }
-
- $this->fetched();
- }
-
- /**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
- */
- protected function render() {
- if (empty($this->usersOnlineList) || !count($this->usersOnlineList->getObjects())) {
- return '';
- }
-
- $this->titleLink = LinkHandler::getInstance()->getLink('UsersOnlineList');
- WCF::getTPL()->assign(array(
- 'usersOnlineList' => $this->usersOnlineList
- ));
- return WCF::getTPL()->fetch('dashboardBoxUsersOnlineSidebar');
- }
-}
</category>
<category name="wcf.dashboard">
- <item name="wcf.dashboard.box.availableBoxes"><![CDATA[Deaktivierte Boxen]]></item>
- <item name="wcf.dashboard.box.enabledBoxes"><![CDATA[Aktive Boxen]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.recentActivitySidebar"><![CDATA[Letzte Aktivität]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.statsSidebar"><![CDATA[Statistiken]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.newestMembers"><![CDATA[Neueste Mitglieder]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.mostActiveMembers"><![CDATA[Aktivste Mitglieder]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.registerButton"><![CDATA[Registrierungs-Button]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.signedInAs"><![CDATA[Angemeldet als]]></item>
- <item name="wcf.dashboard.boxType.content"><![CDATA[Inhaltsbereich]]></item>
- <item name="wcf.dashboard.boxType.sidebar"><![CDATA[Seitenleiste]]></item>
- <item name="wcf.dashboard.objectType"><![CDATA[Seite]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.DashboardPage"><![CDATA[Dashboard]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.MembersListPage"><![CDATA[Mitgliederliste]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.RecentActivityListPage"><![CDATA[Letzte Aktivitäten]]></item>
- <item name="wcf.dashboard.box.mostActiveMembers.points"><![CDATA[{#$activeMember->activityPoints} Punkt{if $activeMember->activityPoints != 1}e{/if}]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.recentActivity"><![CDATA[Letzte Aktivität]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.like.mostLikedMembers"><![CDATA[Mitglieder mit den meisten Likes]]></item>
- <item name="wcf.dashboard.box.mostLikedMembers.likes"><![CDATA[{#$likedMember->likesReceived} Like{if $likedMember->likesReceived != 1}s{/if}]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.todaysBirthdays"><![CDATA[Heutige Geburtstage]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.todaysFollowingBirthdays"><![CDATA[Heutige Geburtstage von Nutzern, denen Sie folgen]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.usersOnlineSidebar"><![CDATA[Benutzer online]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.followingsOnlineSidebar"><![CDATA[Benutzer online, denen Sie folgen]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.staffOnlineSidebar"><![CDATA[Team-Mitglieder online]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.paidSubscriptions"><![CDATA[Bezahlte Mitgliedschaften]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.paidSubscriptionsSidebar"><![CDATA[Bezahlte Mitgliedschaften]]></item>
+ <item name="wcf.dashboard.box.mostActiveMembers.points"><![CDATA[todo{#$activeMember->activityPoints} Punkt{if $activeMember->activityPoints != 1}e{/if}]]></item>
+ <item name="wcf.dashboard.box.mostLikedMembers.likes"><![CDATA[todo{#$likedMember->likesReceived} Like{if $likedMember->likesReceived != 1}s{/if}]]></item>
</category>
<category name="wcf.date">
</category>
<category name="wcf.dashboard">
- <item name="wcf.dashboard.box.availableBoxes"><![CDATA[Disabled Boxes]]></item>
- <item name="wcf.dashboard.box.enabledBoxes"><![CDATA[Active Boxes]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.recentActivitySidebar"><![CDATA[Recent Activity]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.statsSidebar"><![CDATA[Statistics]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.newestMembers"><![CDATA[Newest Members]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.mostActiveMembers"><![CDATA[Most Active Members]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.registerButton"><![CDATA[Register Button]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.signedInAs"><![CDATA[Signed In As]]></item>
- <item name="wcf.dashboard.boxType.content"><![CDATA[Content Area]]></item>
- <item name="wcf.dashboard.boxType.sidebar"><![CDATA[Sidebar]]></item>
- <item name="wcf.dashboard.objectType"><![CDATA[Page]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.DashboardPage"><![CDATA[Dashboard]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.MembersListPage"><![CDATA[Members List]]></item>
- <item name="wcf.dashboard.objectType.com.woltlab.wcf.user.RecentActivityListPage"><![CDATA[Recent Activities]]></item>
- <item name="wcf.dashboard.box.mostActiveMembers.points"><![CDATA[{#$activeMember->activityPoints} Point{if $activeMember->activityPoints != 1}s{/if}]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.recentActivity"><![CDATA[Recent Activity]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.like.mostLikedMembers"><![CDATA[Most Liked Members]]></item>
- <item name="wcf.dashboard.box.mostLikedMembers.likes"><![CDATA[{#$likedMember->likesReceived} Like{if $likedMember->likesReceived != 1}s{/if}]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.todaysBirthdays"><![CDATA[Today’s Birthdays]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.todaysFollowingBirthdays"><![CDATA[Today’s Birthdays of Users you Follow]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.usersOnlineSidebar"><![CDATA[Users Online]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.followingsOnlineSidebar"><![CDATA[Users Online you Follow]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.user.staffOnlineSidebar"><![CDATA[Staff-Members Online]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.paidSubscriptions"><![CDATA[Paid Subscriptions]]></item>
- <item name="wcf.dashboard.box.com.woltlab.wcf.paidSubscriptionsSidebar"><![CDATA[Paid Subscriptions]]></item>
+ <item name="wcf.dashboard.box.mostActiveMembers.points"><![CDATA[todo{#$activeMember->activityPoints} Point{if $activeMember->activityPoints != 1}s{/if}]]></item>
+ <item name="wcf.dashboard.box.mostLikedMembers.likes"><![CDATA[todo{#$likedMember->likesReceived} Like{if $likedMember->likesReceived != 1}s{/if}]]></item>
</category>
<category name="wcf.date">