| @@ 184-215 (lines=32) @@ | ||
| 181 | return $sidebar; |
|
| 182 | } |
|
| 183 | ||
| 184 | private function get_album() |
|
| 185 | { |
|
| 186 | $album = array(); |
|
| 187 | ||
| 188 | if($this->log->album == 0) |
|
| 189 | return $album; |
|
| 190 | ||
| 191 | $photo_list = AlbumCollector::getPhotoListForAlbum($this->log->album); |
|
| 192 | foreach($photo_list as $photo) |
|
| 193 | { |
|
| 194 | $photo_array = array(); |
|
| 195 | $photo_array['full_link'] = sprintf(self::$FULL_IMAGE_LINK, $photo->category, $photo->name); |
|
| 196 | $photo_array['description'] = $photo->description; |
|
| 197 | ||
| 198 | if($photo->height < $photo->width) |
|
| 199 | list($height, $width) = array(75, 100); |
|
| 200 | else |
|
| 201 | list($height, $width) = array(100, 75); |
|
| 202 | ||
| 203 | $photo_array['image_node'] = sprintf( |
|
| 204 | self::$THUMB_IMAGE_NODE, |
|
| 205 | $photo->category, |
|
| 206 | $photo->name, |
|
| 207 | $photo->description, |
|
| 208 | $height, |
|
| 209 | $width); |
|
| 210 | ||
| 211 | $album[] = (object) $photo_array; |
|
| 212 | } |
|
| 213 | ||
| 214 | return $album; |
|
| 215 | } |
|
| 216 | ||
| 217 | } |
|
| 218 | ||
| @@ 117-148 (lines=32) @@ | ||
| 114 | return $content; |
|
| 115 | } |
|
| 116 | ||
| 117 | private function get_album() |
|
| 118 | { |
|
| 119 | $album = array(); |
|
| 120 | ||
| 121 | if($this->waterfall->album == 0) |
|
| 122 | return $album; |
|
| 123 | ||
| 124 | $photo_list = AlbumCollector::getPhotoListForAlbum($this->waterfall->album); |
|
| 125 | foreach($photo_list as $photo) |
|
| 126 | { |
|
| 127 | $photo_array = array(); |
|
| 128 | $photo_array['full_link'] = sprintf(self::$FULL_IMAGE_LINK, $photo->category, $photo->name); |
|
| 129 | $photo_array['description'] = $photo->description; |
|
| 130 | ||
| 131 | if($photo->height < $photo->width) |
|
| 132 | list($height, $width) = array(75, 100); |
|
| 133 | else |
|
| 134 | list($height, $width) = array(100, 75); |
|
| 135 | ||
| 136 | $photo_array['image_node'] = sprintf( |
|
| 137 | self::$THUMB_IMAGE_NODE, |
|
| 138 | $photo->category, |
|
| 139 | $photo->name, |
|
| 140 | $photo->description, |
|
| 141 | $height, |
|
| 142 | $width); |
|
| 143 | ||
| 144 | $album[] = (object) $photo_array; |
|
| 145 | } |
|
| 146 | ||
| 147 | return $album; |
|
| 148 | } |
|
| 149 | ||
| 150 | private function get_sidebar($waterfall) |
|
| 151 | { |
|