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