Commit 0e60a47231f57e9e95819bb59ba84525cf03cbd8
- Diff rendering mode:
- inline
- side by side
modules/flickr/flickr.class.php
(11 / 0)
|   | |||
| 1 | 1 | <?php | |
| 2 | 2 | class Flickr extends Multimedia{ | |
| 3 | var $canHaveMultiples = TRUE; | ||
| 3 | 4 | var $img = 'http://www.flickr.com/favicon.ico'; | |
| 4 | 5 | function getSingleDescription(){ | |
| 5 | 6 | // Trusting HTML from Flickr... | |
| … | … | ||
| 12 | 12 | $summary = "<p><em>$summary</em></p>"; | |
| 13 | 13 | return $content . $summary; | |
| 14 | 14 | } | |
| 15 | |||
| 16 | /** | ||
| 17 | * Scrap image, but replace with square. | ||
| 18 | */ | ||
| 19 | function getMultipleTitle(){ | ||
| 20 | preg_match('/(\<a.*\<\/a\>)/', $this->getSingleDescription(), $matches); | ||
| 21 | $square = str_replace('_m.jpg', '_s.jpg', $matches[0]); | ||
| 22 | $square = preg_replace('/(width|height)="\d+"/i', '${1}="75"', $square); | ||
| 23 | return $square; | ||
| 24 | } | ||
| 15 | 25 | } |

