aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-20 19:56:10 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-20 19:56:10 +0000
commit3f750d86ed5b4acd80c9ed656eac9610c76201f9 (patch)
treecdbb52b599ca892e7f68b36a2814c1fc5a6bcbcb /views
parentff9fc926e60a06777e589d1fad9af1f59c8a2376 (diff)
downloadelgg-3f750d86ed5b4acd80c9ed656eac9610c76201f9.tar.gz
elgg-3f750d86ed5b4acd80c9ed656eac9610c76201f9.tar.bz2
added some documentation to object/album view
Diffstat (limited to 'views')
-rw-r--r--views/default/object/album.php75
1 files changed, 48 insertions, 27 deletions
diff --git a/views/default/object/album.php b/views/default/object/album.php
index eb26123e2..34174e571 100644
--- a/views/default/object/album.php
+++ b/views/default/object/album.php
@@ -17,31 +17,45 @@
if (get_context() == "search") {
if (get_input('search_viewtype') == "gallery") {
- //default gallery view for album listing @ /photos/owned/
-
+
+/******************************************************************************
+ *
+ * Gallery view of an album object
+ *
+ * This is called when looking at page of albums (index.php).
+ *
+ *
+ *****************************************************************************/
+
//get album cover if one was set
- if($file->cover)
- $album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$file->cover.'&size=small" border="0" class="tidypics_album_cover" alt="thumbnail"/>';
+ if ($file->cover)
+ $album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$file->cover.'&size=small" class="tidypics_album_cover" alt="thumbnail"/>';
else
$album_cover = '<img src="'.$vars['url'].'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="new album">';
- ?>
- <div class="tidypics_album_gallery_item">
- <a href="<?php echo $file->getURL();?>"><?php echo $title;?></a><br>
- <a href="<?php echo $file->getURL();?>"><?php echo $album_cover;?></a><br>
- <small><a href="<?php echo $vars['url'];?>pg/profile/<?php echo $owner->username;?>"><?php echo $owner->name;?></a> <?php echo $friendlytime;?><br>
- <?php
- //get the number of comments
- $numcomments = elgg_count_comments($file);
- if ($numcomments)
- echo "<a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
- ?>
- </small>
- </div>
-
- <?php
+?>
+<div class="tidypics_album_gallery_item">
+ <a href="<?php echo $file->getURL();?>"><?php echo $title;?></a><br>
+ <a href="<?php echo $file->getURL();?>"><?php echo $album_cover;?></a><br>
+ <small><a href="<?php echo $vars['url'];?>pg/profile/<?php echo $owner->username;?>"><?php echo $owner->name;?></a> <?php echo $friendlytime;?><br>
+<?php
+ //get the number of comments
+ $numcomments = elgg_count_comments($file);
+ if ($numcomments)
+ echo "<a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+?>
+ </small>
+</div>
+<?php
} else {
- //album list-entity view
+/******************************************************************************
+ *
+ * List view of an album object
+ *
+ * This is called when an album object is returned in a search.
+ *
+ *
+ *****************************************************************************/
$info = '<p><a href="' .$file->getURL(). '">'.$title.'</a></p>';
$info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
@@ -53,11 +67,18 @@
$icon = "<a href=\"{$file->getURL()}\">" . elgg_view("tidypics/icon", array('album' => true, 'size' => 'small')) . "</a>";
echo elgg_view_listing($icon, $info);
-
}
-
- } else {
- // individual album view
+ } else {
+
+/******************************************************************************
+ *
+ * Individual view of an album object
+ *
+ * This is called when getting a listing of the photos in an album
+ *
+ *
+ *****************************************************************************/
+
$page = get_input("page");
list($album_placeholder, $album_id, $album_title) = split("/", $page);
@@ -85,7 +106,7 @@
array_push($_SESSION['image_sort'], $image->guid);
}
- echo list_entities("object","image", $file_guid, 24, false);
+ echo list_entities("object","image", $file_guid, 24, false);
} else {
echo elgg_echo('image:none');
}
@@ -97,12 +118,12 @@
<div class="object_tag_string"><?php echo elgg_view('output/tags',array('value' => $tags));?></div>
<?php } ?>
<?php echo elgg_echo('album:by');?> <b><a href="<?php echo $vars['url'] ;?>pg/profile/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b> <?php echo $friendlytime; ?><br>
- <?php echo elgg_echo('image:total');?> <b><?php echo count($count);?></b><br>
+ <?php echo elgg_echo('image:total');?> <b><?php echo count($count);?></b><br>
</div>
<?php
if ($vars['full']) {
- echo elgg_view_comments($file);
+ echo elgg_view_comments($file);
}
echo '</div>';