Index: trunk/extensions/RandomImage/RandomImage.class.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | private $parser = null; |
13 | 13 | |
14 | | - private $width = 'thumb'; |
| 14 | + private $width = false; |
15 | 15 | private $float = false; |
16 | 16 | private $caption = ''; |
17 | 17 | |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | if( isset( $options['size'] ) ) { |
40 | 40 | $size = intval( $options['size'] ); |
41 | 41 | if( $size > 0 ) |
42 | | - $this->width = "{$size}px"; |
| 42 | + $this->width = $size; |
43 | 43 | } |
44 | 44 | if( isset( $options['float'] ) ) { |
45 | 45 | $float = strtolower( $options['float'] ); |
— | — | @@ -83,6 +83,12 @@ |
84 | 84 | */ |
85 | 85 | protected function buildMarkup( $image ) { |
86 | 86 | $parts[] = $image->getTitle()->getPrefixedText(); |
| 87 | + if( $this->width !== false ) { |
| 88 | + $parts[] = "{$this->width}px"; |
| 89 | + $parts[] = 'frame'; |
| 90 | + } else { |
| 91 | + $parts[] = 'thumb'; |
| 92 | + } |
87 | 93 | $parts[] = $this->width; |
88 | 94 | if( $this->float ) |
89 | 95 | $parts[] = $this->float; |