|
Revision 1170, 1.2 kB
(checked in by GneX, 3 years ago)
|
|
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | require_once(WCF_DIR.'lib/data/user/option/UserOptionOutputImage.class.php'); |
|---|
| 3 | /** |
|---|
| 4 | * SpritmonitorOutput |
|---|
| 5 | * |
|---|
| 6 | * @author Tim Wittenberg |
|---|
| 7 | * @copyright GneX |
|---|
| 8 | * @url GneX.org |
|---|
| 9 | * @license GPL |
|---|
| 10 | */ |
|---|
| 11 | class UserOptionOutputSpritmonitor extends UserOptionOutputImage { |
|---|
| 12 | /** |
|---|
| 13 | * @see UserOptionOutput::getShortOutput() |
|---|
| 14 | */ |
|---|
| 15 | public function getShortOutput(User $user, $optionData, $value) { |
|---|
| 16 | $value = intval($value); |
|---|
| 17 | return $this->getOutput($user, $optionData, $value); |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | /** |
|---|
| 21 | * @see UserOptionOutput::getMediumOutput() |
|---|
| 22 | */ |
|---|
| 23 | public function getMediumOutput(User $user, $optionData, $value) { |
|---|
| 24 | $value = intval($value); |
|---|
| 25 | if (empty($value)) return ''; |
|---|
| 26 | |
|---|
| 27 | return '<a href="http://www.spritmonitor.de/de/detailansicht/'.$value.'.html"><img src="http://images.spritmonitor.de/'.$value.'.png" alt="" style="max-width: 50px; max-height: 50px" /></a>'; |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | /** |
|---|
| 31 | * @see UserOptionOutput::getOutput() |
|---|
| 32 | */ |
|---|
| 33 | public function getOutput(User $user, $optionData, $value) { |
|---|
| 34 | $value = intval($value); |
|---|
| 35 | if (empty($value)) return ''; |
|---|
| 36 | |
|---|
| 37 | return '<a href="http://www.spritmonitor.de/de/detailansicht/'.$value.'.html"><img src="http://images.spritmonitor.de/'.$value.'.png" alt="" /></a>'; |
|---|
| 38 | } |
|---|
| 39 | } |
|---|
| 40 | ?> |
|---|