From b5332f78228d27372576ae4586d6865b5c94104e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 1 Jun 2020 15:05:21 +0200 Subject: [PATCH] Use UserTemplatePlugin See #3321 --- com.woltlab.wcf/templates/article.tpl | 6 +++--- com.woltlab.wcf/templates/articleListItems.tpl | 2 +- com.woltlab.wcf/templates/boxFollowingsOnline.tpl | 2 +- com.woltlab.wcf/templates/boxRecentActivitySidebar.tpl | 2 +- com.woltlab.wcf/templates/boxSidebarCommentList.tpl | 2 +- com.woltlab.wcf/templates/boxStaffOnline.tpl | 2 +- com.woltlab.wcf/templates/boxStatistics.tpl | 2 +- com.woltlab.wcf/templates/boxTodaysBirthdays.tpl | 4 ++-- .../templates/boxTodaysFollowingBirthdays.tpl | 2 +- com.woltlab.wcf/templates/boxUserList.tpl | 2 +- com.woltlab.wcf/templates/boxUserTrophyList.tpl | 4 ++-- com.woltlab.wcf/templates/boxUsersOnline.tpl | 2 +- com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl | 4 ++-- com.woltlab.wcf/templates/boxWhoWasOnline.tpl | 4 ++-- com.woltlab.wcf/templates/commentList.tpl | 4 ++-- com.woltlab.wcf/templates/commentResponseList.tpl | 4 ++-- com.woltlab.wcf/templates/mediaEditor.tpl | 2 +- com.woltlab.wcf/templates/messageSidebar.tpl | 2 +- com.woltlab.wcf/templates/moderationActivation.tpl | 2 +- com.woltlab.wcf/templates/moderationList.tpl | 10 ++++++++-- com.woltlab.wcf/templates/moderationReport.tpl | 4 ++-- com.woltlab.wcf/templates/quoteMetaCode.tpl | 2 +- com.woltlab.wcf/templates/recentActivityListItem.tpl | 2 +- com.woltlab.wcf/templates/searchResultList.tpl | 8 +++++++- com.woltlab.wcf/templates/trophy.tpl | 4 ++-- com.woltlab.wcf/templates/userInformationHeadline.tpl | 2 +- com.woltlab.wcf/templates/userProfileLikeItem.tpl | 2 +- com.woltlab.wcf/templates/usersOnlineInfoBox.tpl | 2 +- wcfsetup/install/files/acp/templates/mediaEditor.tpl | 2 +- wcfsetup/install/files/js/WCF.Moderation.js | 2 +- .../install/files/lib/data/user/UserProfile.class.php | 2 +- .../handler/TUserOnlineLocationPageHandler.class.php | 5 ++++- wcfsetup/install/lang/de.xml | 2 +- wcfsetup/install/lang/en.xml | 2 +- 34 files changed, 60 insertions(+), 45 deletions(-) diff --git a/com.woltlab.wcf/templates/article.tpl b/com.woltlab.wcf/templates/article.tpl index 046024892e..0f9968fc49 100644 --- a/com.woltlab.wcf/templates/article.tpl +++ b/com.woltlab.wcf/templates/article.tpl @@ -21,8 +21,8 @@ diff --git a/com.woltlab.wcf/templates/boxRecentActivitySidebar.tpl b/com.woltlab.wcf/templates/boxRecentActivitySidebar.tpl index 69151ea388..c7646b676a 100644 --- a/com.woltlab.wcf/templates/boxRecentActivitySidebar.tpl +++ b/com.woltlab.wcf/templates/boxRecentActivitySidebar.tpl @@ -5,7 +5,7 @@

- {$event->getUserProfile()->username} + {user object=$event->getUserProfile()} {@$event->time|time}

{@$event->getTitle()} diff --git a/com.woltlab.wcf/templates/boxSidebarCommentList.tpl b/com.woltlab.wcf/templates/boxSidebarCommentList.tpl index ef1531678a..203bb8a554 100644 --- a/com.woltlab.wcf/templates/boxSidebarCommentList.tpl +++ b/com.woltlab.wcf/templates/boxSidebarCommentList.tpl @@ -6,7 +6,7 @@

{@$boxComment->getExcerpt(50)}

-

{if $boxComment->userID}{$boxComment->username}{else}{$boxComment->username}{/if} {@$boxComment->time|time}

+

{if $boxComment->userID}{user object=$boxComment->getUserProfile()}{else}{$boxComment->username}{/if} {@$boxComment->time|time}

{/foreach} diff --git a/com.woltlab.wcf/templates/boxStaffOnline.tpl b/com.woltlab.wcf/templates/boxStaffOnline.tpl index 6e464e7e2c..3a91b56c0a 100644 --- a/com.woltlab.wcf/templates/boxStaffOnline.tpl +++ b/com.woltlab.wcf/templates/boxStaffOnline.tpl @@ -6,7 +6,7 @@

{event name='beforeUsername'} - {$userOnline->username} + {user object=$userOnline}

{if MODULE_USER_RANK} {if $userOnline->getUserTitle()} diff --git a/com.woltlab.wcf/templates/boxStatistics.tpl b/com.woltlab.wcf/templates/boxStatistics.tpl index 449883cbde..9a1f8dbfea 100644 --- a/com.woltlab.wcf/templates/boxStatistics.tpl +++ b/com.woltlab.wcf/templates/boxStatistics.tpl @@ -11,6 +11,6 @@ {if $statistics[newestMember]}
{lang}wcf.user.newestMember{/lang}
-
{$statistics[newestMember]}
+
{user object=$statistics[newestMember]}
{/if} diff --git a/com.woltlab.wcf/templates/boxTodaysBirthdays.tpl b/com.woltlab.wcf/templates/boxTodaysBirthdays.tpl index 8c7a0daac9..77b5c83c5c 100644 --- a/com.woltlab.wcf/templates/boxTodaysBirthdays.tpl +++ b/com.woltlab.wcf/templates/boxTodaysBirthdays.tpl @@ -4,7 +4,7 @@
-

{$birthdayUserProfile->username}

+

{user object=$birthdayUserProfile}

{$birthdayUserProfile->getBirthday()}
@@ -25,4 +25,4 @@ }); }); -{/if} \ No newline at end of file +{/if} diff --git a/com.woltlab.wcf/templates/boxTodaysFollowingBirthdays.tpl b/com.woltlab.wcf/templates/boxTodaysFollowingBirthdays.tpl index 657133e1e6..d47a0a686c 100644 --- a/com.woltlab.wcf/templates/boxTodaysFollowingBirthdays.tpl +++ b/com.woltlab.wcf/templates/boxTodaysFollowingBirthdays.tpl @@ -4,7 +4,7 @@
-

{$birthdayUserProfile->username}

+

{user object=$birthdayUserProfile}

{$birthdayUserProfile->getBirthday()}
diff --git a/com.woltlab.wcf/templates/boxUserList.tpl b/com.woltlab.wcf/templates/boxUserList.tpl index 69b4f987e3..7933ede988 100644 --- a/com.woltlab.wcf/templates/boxUserList.tpl +++ b/com.woltlab.wcf/templates/boxUserList.tpl @@ -4,7 +4,7 @@
-

{$boxUser->username}

+

{user object=$boxUser}

{capture assign='__boxUserLanguageItem'}{lang __optional=true}wcf.user.boxList.description.{$boxSortField}{/lang}{/capture} {if $__boxUserLanguageItem} {@$__boxUserLanguageItem} diff --git a/com.woltlab.wcf/templates/boxUserTrophyList.tpl b/com.woltlab.wcf/templates/boxUserTrophyList.tpl index 061b4b924b..bf16e8657f 100644 --- a/com.woltlab.wcf/templates/boxUserTrophyList.tpl +++ b/com.woltlab.wcf/templates/boxUserTrophyList.tpl @@ -9,7 +9,7 @@ {$boxUserTrophy->getTrophy()->getTitle()} - {@$boxUserTrophy->getUserProfile()->getAnchorTag()} + {user object=$boxUserTrophy->getUserProfile()} {@$boxUserTrophy->time|time}
@@ -24,7 +24,7 @@

{$boxUserTrophy->getTrophy()->getTitle()}

- {if !$boxUserTrophy->getDescription()|empty}

{@$boxUserTrophy->getDescription()}

{/if}

{@$boxUserTrophy->getUserProfile()->getAnchorTag()} {@$boxUserTrophy->time|time}

+ {if !$boxUserTrophy->getDescription()|empty}

{@$boxUserTrophy->getDescription()}

{/if}

{user object=$boxUserTrophy->getUserProfile()} {@$boxUserTrophy->time|time}

{/foreach} diff --git a/com.woltlab.wcf/templates/boxUsersOnline.tpl b/com.woltlab.wcf/templates/boxUsersOnline.tpl index cb88c70db4..e6f63aee50 100644 --- a/com.woltlab.wcf/templates/boxUsersOnline.tpl +++ b/com.woltlab.wcf/templates/boxUsersOnline.tpl @@ -6,7 +6,7 @@ {if $usersOnlineList|count} {/if} diff --git a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl index 79c45ba9b4..f713a8a160 100644 --- a/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl +++ b/com.woltlab.wcf/templates/boxUsersOnlineSidebar.tpl @@ -1,7 +1,7 @@ -

{lang}wcf.user.usersOnline.detail{/lang}{if USERS_ONLINE_RECORD && $__showRecord} {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}

diff --git a/com.woltlab.wcf/templates/boxWhoWasOnline.tpl b/com.woltlab.wcf/templates/boxWhoWasOnline.tpl index f3424ad78c..f9a1fd45c2 100644 --- a/com.woltlab.wcf/templates/boxWhoWasOnline.tpl +++ b/com.woltlab.wcf/templates/boxWhoWasOnline.tpl @@ -1,13 +1,13 @@ {if $whoWasOnlineList|count < 29} {else} {/if} diff --git a/com.woltlab.wcf/templates/commentList.tpl b/com.woltlab.wcf/templates/commentList.tpl index 382f754ecb..f38c2f1173 100644 --- a/com.woltlab.wcf/templates/commentList.tpl +++ b/com.woltlab.wcf/templates/commentList.tpl @@ -28,8 +28,8 @@