<div class="specialTrophyContainer">
<ul>
{foreach from=$userProfile->getSpecialTrophies() item=trophy}
- <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32)}</a></li>
+ <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32, true)}</a></li>
{/foreach}
</ul>
</div>
<span
- class="icon icon{$size} fa-{$trophy->iconName} trophyIcon jsTooltip"
+ class="icon icon{$size} fa-{$trophy->iconName} trophyIcon{if $showTooltip} jsTooltip{/if}"
style="color: {$trophy->iconColor}; background-color: {$trophy->badgeColor}"
data-trophy-id="{$trophy->trophyID}"
- title="{$trophy->getTitle()}"
+ {if $showTooltip}title="{$trophy->getTitle()}"{/if}
></span>
<img
src="{@$__wcf->getPath()}images/trophy/{$trophy->iconFile}"
style="width:{$size}px;height:{$size}px"
- title="{$trophy->getTitle()}"
- class="jsTooltip trophyIcon"
+ {if $showTooltip}title="{$trophy->getTitle()}"{/if}
+ class="trophyIcon{if $showTooltip} jsTooltip{/if}"
data-trophy-id="{$trophy->getObjectID()}"
/>
<div class="specialTrophyUserContainer">
<ul>
{foreach from=$user->getSpecialTrophies() item=trophy}
- <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32)}</a></li>
+ <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32, true)}</a></li>
{/foreach}
</ul>
</div>
<div class="specialTrophyUserContainer">
<ul>
{foreach from=$user->getSpecialTrophies() item=trophy}
- <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32)}</a></li>
+ <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32, true)}</a></li>
{/foreach}
</ul>
</div>
* Renders a trophy.
*
* @param integer $size
+ * @param boolean $showTooltip
* @return string
*/
- public function renderTrophy($size = self::DEFAULT_SIZE) {
+ public function renderTrophy($size = self::DEFAULT_SIZE, $showTooltip = false) {
switch ($this->type) {
case self::TYPE_IMAGE: {
return WCF::getTPL()->fetch('trophyImage', 'wcf', [
'size' => $size,
- 'trophy' => $this
+ 'trophy' => $this,
+ 'showTooltip' => $showTooltip
], true);
break;
}
case self::TYPE_BADGE:
return WCF::getTPL()->fetch('trophyBadge', 'wcf', [
'size' => $size,
- 'trophy' => $this
+ 'trophy' => $this,
+ 'showTooltip' => $showTooltip
], true);
break;
default:
$parameters = [
'renderedTemplate' => null,
- 'size' => $size
+ 'size' => $size,
+ 'showTooltip' => $showTooltip
];
EventHandler::getInstance()->fireAction($this, 'renderTrophy', $parameters);