Add template events in `userProfileAbout`
authorMarcel Werk <burntime@woltlab.com>
Tue, 4 Apr 2023 11:35:28 +0000 (13:35 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 4 Apr 2023 11:35:28 +0000 (13:35 +0200)
These events allow content to be displayed in the 'about' tab that is not based on user options.

com.woltlab.wcf/templates/userProfileAbout.tpl
wcfsetup/install/files/lib/system/menu/user/profile/content/AboutUserProfileMenuContent.class.php

index 4437abb33cd112d5bf1b82f8374b9e56b62fdeb0..42a20fe51928259f5ba0d155fe9cf36d8275cc45 100644 (file)
@@ -1,5 +1,7 @@
 {hascontent}
        {content}
+               {event name='beforeUserOptions'}
+
                {foreach from=$options item=category}
                        {foreach from=$category[categories] item=optionCategory}
                                <section class="section">
@@ -14,6 +16,8 @@
                                </section>
                        {/foreach}
                {/foreach}
+
+               {event name='afterUserOptions'}
        {/content}
 {hascontentelse}
        <div class="section">
index 6aed679524fcb4d5cdded9ff46764b44f92b898c..b71aa0684a58aea0987d6f7412f3d538e7759e5e 100644 (file)
@@ -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');