Add `userBBCodeTag` to the shared templates
authorSascha Greuel <github@1-2.dev>
Tue, 28 Mar 2023 16:17:19 +0000 (18:17 +0200)
committerSascha Greuel <github@1-2.dev>
Tue, 28 Mar 2023 16:17:19 +0000 (18:17 +0200)
syncTemplates.json
wcfsetup/install/files/acp/templates/userBBCodeTag.tpl [new file with mode: 0644]

index bb8d4279fc2d2c40c6a378dc8a86a518b8fe364d..4f470c514c73046da5ee162398b38b30579e8dc3 100644 (file)
@@ -95,6 +95,7 @@
     "trophyImage",
     "unfurlUrl",
     "uploadFieldComponent",
+    "userBBCodeTag",
     "userConditions",
     "userOptionsCondition",
     "worker",
diff --git a/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl b/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl
new file mode 100644 (file)
index 0000000..dbe32b2
--- /dev/null
@@ -0,0 +1,6 @@
+{if $userProfile === null}
+       {* user no longer exists, use plain output rather than using a broken link *}
+       @{$username}{* no newline after the tag
+*}{else}
+       <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="userMention userLink" data-object-id="{@$userProfile->userID}">{@$userProfile->getFormattedUsername()}</a>{* no newline after the tag
+*}{/if}