Changeset 280 for albumembed
- Timestamp:
- 06.04.2007 14:59:13 (21 months ago)
- Location:
- albumembed
- Files:
-
- 2 modified
-
AlbumEmbed.php (modified) (9 diffs)
-
example.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
albumembed/AlbumEmbed.php
r269 r280 51 51 'lifeTime' => 86400, 52 52 'automaticSerialization' => true, 53 'errorHandlingAPIBreak' => true, 53 54 ); 54 55 … … 97 98 { 98 99 $this->rss_url = $rss_url; 99 if (empty(self::$location)) self::$location = basename(__FILE__);100 if (empty(self::$location)) self::$location = ((isset($_SERVER['HTTPS']) and strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . basename(__FILE__); 100 101 } 101 102 … … 134 135 } 135 136 } 136 137 $Cache->save($images, $this->rss_url, 'images');138 137 if (empty($images)) throw new AlbumEmbed_Exception('No images found.'); 138 $result = $Cache->save($images, $this->rss_url, 'images'); 139 if ($result !== true) { 140 throw new AlbumEmbed_Exception('Cache error: ' . $result->getMessage()); 141 } 139 142 return $images; 140 143 } … … 174 177 $return = ''; 175 178 if ($static) $return = '<div class="' . $class. '" id="' . $id . '">'; 176 $return .= ' <dl class="' . $image['orientation'] . '">' 177 . ' <dt>'; 178 $return .= ' <span class="prev" id="' . $this->getId(self::ID_PREV) . '">'; 179 $return .= '<div class="box ' . $image['orientation'] . '"><ul><li class="prev" id="' . $this->getId(self::ID_PREV) . '">'; 179 180 if ($current_item > 0) { 180 181 $return .= ($static) ? '<a href="' . $req . ($current_item - 1) . '#' . $id . '">' : ''; … … 182 183 $return .= ($static) ? '</a>' : ''; 183 184 } 184 $return .= '</ span>';185 $return .= '<a href="' . $image['link'] . '">' . (($image['img_html']) ? $image['img_html'] : 'No image.') . '</a>';186 $return .= ' <spanclass="next" id="' . $this->getId(self::ID_NEXT) . '">';185 $return .= '</li>' 186 . '<li class="foto"><a href="' . $image['link'] . '">' . (($image['img_html']) ? $image['img_html'] : 'No image.') . '</a></li>' 187 . '<li class="next" id="' . $this->getId(self::ID_NEXT) . '">'; 187 188 if ($current_item < $n_items - 1) { 188 189 $return .= ($static) ? '<a href="' . $req . ($current_item + 1) . '#' . $id . '">' : ''; … … 190 191 $return .= ($static) ? '</a>' : ''; 191 192 } 192 $return .= '</span>'; 193 $return .= '</dt>' 194 . ' <dd>' . (($image['title']) ? htmlspecialchars($image['title']) : ' ') . '</dd>' 195 . ' </dl>'; 196 $return .= ' <p class="info">' . ($current_item + 1) . ' / ' . $n_items . '</p>'; 197 if ($static) $return .= '</div>'; 198 193 $return .= '</li></ul>' 194 . '<p class="caption">' . (($image['title']) ? htmlspecialchars($image['title']) : ' ') . '</p><p class="info">' . ($current_item + 1) . ' / ' . $n_items . '</p>' 195 . '</div>'; 196 if ($static) $return .= "</div>\n"; 199 197 return $return; 200 198 } catch (AlbumEmbed_Exception $E) { … … 234 232 $return = '<script type="text/javascript"><!--//--><