From b1450bdef60468834deda81a528fce55fb174505 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 4 Apr 2023 13:35:28 +0200 Subject: [PATCH] Add template events in `userProfileAbout` These events allow content to be displayed in the 'about' tab that is not based on user options. --- com.woltlab.wcf/templates/userProfileAbout.tpl | 4 ++++ .../profile/content/AboutUserProfileMenuContent.class.php | 1 + 2 files changed, 5 insertions(+) diff --git a/com.woltlab.wcf/templates/userProfileAbout.tpl b/com.woltlab.wcf/templates/userProfileAbout.tpl index 4437abb33c..42a20fe519 100644 --- a/com.woltlab.wcf/templates/userProfileAbout.tpl +++ b/com.woltlab.wcf/templates/userProfileAbout.tpl @@ -1,5 +1,7 @@ {hascontent} {content} + {event name='beforeUserOptions'} + {foreach from=$options item=category} {foreach from=$category[categories] item=optionCategory}
@@ -14,6 +16,8 @@
{/foreach} {/foreach} + + {event name='afterUserOptions'} {/content} {hascontentelse}
diff --git a/wcfsetup/install/files/lib/system/menu/user/profile/content/AboutUserProfileMenuContent.class.php b/wcfsetup/install/files/lib/system/menu/user/profile/content/AboutUserProfileMenuContent.class.php index 6aed679524..b71aa0684a 100644 --- a/wcfsetup/install/files/lib/system/menu/user/profile/content/AboutUserProfileMenuContent.class.php +++ b/wcfsetup/install/files/lib/system/menu/user/profile/content/AboutUserProfileMenuContent.class.php @@ -39,6 +39,7 @@ class AboutUserProfileMenuContent extends SingletonFactory implements IUserProfi WCF::getTPL()->assign([ 'options' => $this->optionHandler->getOptionTree(), 'userID' => $user->userID, + 'user' => $user, ]); return WCF::getTPL()->fetch('userProfileAbout'); -- 2.20.1