From: Joshua Rüsweg Date: Sat, 29 Jul 2017 14:08:24 +0000 (+0200) Subject: Add special trophies X-Git-Tag: 3.1.0_Alpha_1~174 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a83d788ae9f95569a625865eb4448568d868346d;p=GitHub%2FWoltLab%2FWCF.git Add special trophies See #2315 --- diff --git a/com.woltlab.wcf/templates/messageSidebar.tpl b/com.woltlab.wcf/templates/messageSidebar.tpl index 004553e22c..ded7ae5baf 100644 --- a/com.woltlab.wcf/templates/messageSidebar.tpl +++ b/com.woltlab.wcf/templates/messageSidebar.tpl @@ -44,6 +44,16 @@
{@$userProfile->getRank()->getImage()}
{/if} {/if} + + {if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($userProfile->isAccessible('canViewTrophies') || $userProfile->userID == $__wcf->session->userID) && $userProfile->getSpecialTrophies()|count} +
+ +
+ {/if} {else}
{if $userProfile->username} diff --git a/com.woltlab.wcf/templates/settings.tpl b/com.woltlab.wcf/templates/settings.tpl index c807aaa292..b8ee04b883 100644 --- a/com.woltlab.wcf/templates/settings.tpl +++ b/com.woltlab.wcf/templates/settings.tpl @@ -82,6 +82,36 @@ {event name='styleFields'} {/if} + + {if MODULE_TROPHY && $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') > 0 && $availableTrophies|count} +
+

{lang}wcf.user.trophy.trophies{/lang}

+ +
{lang}wcf.user.trophy.specialTrophies{/lang}
+
+
    + {if $__wcf->getSession()->getPermission('user.profile.trophy.maxUserSpecialTrophies') == 1} + {foreach from=$availableTrophies item=trophy} +
  • + {/foreach} + {else} + {foreach from=$availableTrophies item=trophy} +
  • + {/foreach} + {/if} +
+ {if $errorField == 'specialTrophies'} + + {lang}wcf.user.trophy.specialTrophies.error.{$errorType}{/lang} + + {/if} + {lang}wcf.user.trophy.specialTrophies.description{/lang} +
+ + + {event name='trophyFields'} +
+ {/if} {/if} {if !$optionTree|empty} diff --git a/com.woltlab.wcf/templates/user.tpl b/com.woltlab.wcf/templates/user.tpl index 40b2f50785..2dac794e66 100644 --- a/com.woltlab.wcf/templates/user.tpl +++ b/com.woltlab.wcf/templates/user.tpl @@ -172,6 +172,15 @@
+ {if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($user->isAccessible('canViewTrophies') || $user->userID == $__wcf->session->userID) && $user->getSpecialTrophies()|count} +
+ +
+ {/if}
    {if !$user->isProtected()} {if $user->isVisibleOption('gender') && $user->gender}
  • {lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}
  • {/if} diff --git a/com.woltlab.wcf/templates/userProfilePreview.tpl b/com.woltlab.wcf/templates/userProfilePreview.tpl index 9366018be7..a115d09221 100644 --- a/com.woltlab.wcf/templates/userProfilePreview.tpl +++ b/com.woltlab.wcf/templates/userProfilePreview.tpl @@ -10,6 +10,16 @@
    {include file='userInformation'} + + {if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($user->isAccessible('canViewTrophies') || $user->userID == $__wcf->session->userID) && $user->getSpecialTrophies()|count} +
    + +
    + {/if} {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
    diff --git a/com.woltlab.wcf/userGroupOption.xml b/com.woltlab.wcf/userGroupOption.xml index b67b60dd9e..c24c47a514 100644 --- a/com.woltlab.wcf/userGroupOption.xml +++ b/com.woltlab.wcf/userGroupOption.xml @@ -740,6 +740,15 @@ png 1 module_trophy +