echo $config->getLevelName($badge->getLevel()); ?> (<?php echo wfMsg('achievements-points', $config->getLevelScore($badge->getLevel())); ?> )</p> <p><?php echo $badge->getGiveFor(); ?> </p> </div> <div class="image-form"> <p> <img width="90" height="90" src="<?php echo $badge->getPictureUrl(90); ?> " /> <br /> <span class="custom-text"><?php echo wfMsg('achievements-customize'); ?> <br /> <a href="#" onclick="Achievements.revert(this, <?php echo $badgeTypeId; ?> , <?php echo $lap; ?> ); return false;"> <?php
public static function resetBadge() { global $wgRequest, $wgUser; if (!$wgUser->isAllowed('editinterface')) { return false; } $badge_type_id = $wgRequest->getVal('type_id'); $lap = $wgRequest->getVal('lap') != '' ? $wgRequest->getVal('lap') : null; $image = wfFindFile(AchConfig::getInstance()->getBadgePictureName($badge_type_id, $lap)); if ($image) { $image->delete(''); } $badge = new AchBadge($badge_type_id, $lap); $ret = array('output' => $badge->getPictureUrl(90, true), 'message' => wfMsg('achievements-reverted')); return json_encode($ret); }