diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-22 21:59:41 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-22 21:59:41 +0000 |
commit | 1b76def26fbfc4ef3f0fcb2df210d916b972628b (patch) | |
tree | 78d12d06e6cc8f5cd3897349b1a4408a4aba0a6a | |
parent | 35cfbfdef457d7d330c5a3839baea250a563af67 (diff) |
Create thumbnail insertion points (top/bottom/info) and move
the generic item info into the info module.
-rw-r--r-- | core/libraries/Theme.php | 3 | ||||
-rw-r--r-- | modules/info/helpers/info_block.php | 9 | ||||
-rw-r--r-- | themes/default/views/album.html.php | 7 |
3 files changed, 15 insertions, 4 deletions
diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index 569b2d52..42843a5a 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -74,6 +74,9 @@ class Theme_Core { case "album_top": case "album_blocks": case "album_bottom": + case "thumbnail_top": + case "thumbnail_bottom": + case "thumbnail_info": case "photo_top": case "photo_blocks": case "photo_bottom": diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 62c2919c..975acd6a 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -26,4 +26,13 @@ class info_block_Core { $block->content = new View("info_block.html"); return $block; } + + public static function thumbnail_info($theme, $item) { + print "<li>Views: 321</li>"; + if ($item->owner) { + print "<li>"; + printf(_("By: %s"), "<a href=\"#\">{$item->owner->name}</a>"); + print "</li>"; + } + } }
\ No newline at end of file diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index f4869479..c56aed22 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -12,6 +12,7 @@ <? $album_class = "gAlbum "; ?> <? endif ?> <li class="gItem <?= $album_class ?>"> + <?= $theme->thumbnail_top($child) ?> <a href="<?= url::site("{$child->type}s/{$child->id}") ?>"> <img id="gPhotoID-<?= $child->id ?>" class="gThumbnail" alt="photo" src="<?= $child->thumbnail_url() ?>" @@ -19,11 +20,9 @@ height="<?= $child->thumbnail_height ?>" /> </a> <h2><?= $child->title_edit ?></h2> + <?= $theme->thumbnail_bottom($child) ?> <ul class="gMetadata"> - <li>Views: 321</li> - <? if ($child->owner): ?> - <li><?= _("By: ") ?><a href="#"><?= $child->owner->name ?></a></li> - <? endif ?> + <?= $theme->thumbnail_info($child) ?> </ul> </li> <? endforeach ?> |