diff --git a/3.0/modules/about_this_album/helpers/about_this_album_block.php b/3.0/modules/about_this_album/helpers/about_this_album_block.php
new file mode 100644
index 00000000..a2a849e5
--- /dev/null
+++ b/3.0/modules/about_this_album/helpers/about_this_album_block.php
@@ -0,0 +1,76 @@
+ t("About This Album"));
+ }
+
+ static function get($block_id, $theme) {
+ switch ($block_id) {
+ case "aboutthisalbum":
+ $item = $theme->item;
+ if ((!$item) or (!$theme->item->is_album())) {
+ return "";
+ }
+ if ($theme->item->is_album()) {
+ $block = new Block();
+ $block->css_id = "g-about-this-album";
+ $block->content = new View("about_this_album.html");
+
+ if ($theme->item()->id == item::root()->id) {
+ $block->title = t("About this Site");
+ $block->content->album_count = ORM::factory("item")->where("type", "=", "album")->where("id", "<>", 1)->count_all();
+ $block->content->photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all();
+ $block->content->vcount = Database::instance()->query("SELECT SUM({items}.view_count) as c FROM {items} WHERE type=\"photo\"")->current()->c;
+ } Else {
+ $block->title = t("About this Album");
+ $block->content->album_count = $item->descendants_count(array(array("type", "=", "album")));
+ $block->content->photo_count = $item->descendants_count(array(array("type", "=", "photo")));
+ // $block->content->vcount= $theme->item()->view_count;
+ $descds = $item->descendants();
+ $descds_view = 0;
+ foreach ($descds as $descd) {
+ if ($descd->is_photo()) {
+ $descds_view += $descd->view_count;
+ }
+ }
+ $block->content->vcount = $descds_view;
+ if ($item->description) {
+ $block->content->description = html::clean($item->description);
+ }
+ }
+
+
+ $all_tags = ORM::factory("tag")
+ ->join("items_tags", "items_tags.tag_id", "tags.id")
+ ->join("items", "items.id", "items_tags.item_id", "LEFT")
+ ->where("items.parent_id", "=", $item->id)
+ ->order_by("tags.id", "ASC")
+ ->find_all();
+ if (count($all_tags) > 0) {
+ $block->content->all_tags = $all_tags;
+ }
+ }
+ break;
+ }
+ return $block;
+ }
+}
diff --git a/3.0/modules/about_this_album/module.info b/3.0/modules/about_this_album/module.info
new file mode 100644
index 00000000..8080a24d
--- /dev/null
+++ b/3.0/modules/about_this_album/module.info
@@ -0,0 +1,3 @@
+name = "About this Album"
+description = "Show some simple, specific and useful info about a given album"
+version = 1
diff --git a/3.0/modules/about_this_album/views/about_this_album.html.php b/3.0/modules/about_this_album/views/about_this_album.html.php
new file mode 100644
index 00000000..01dee4f7
--- /dev/null
+++ b/3.0/modules/about_this_album/views/about_this_album.html.php
@@ -0,0 +1,68 @@
+
+ date_default_timezone_set('Australia/ACT'); ?>
+
diff --git a/3.0/modules/about_this_photo/helpers/about_this_photo_block.php b/3.0/modules/about_this_photo/helpers/about_this_photo_block.php
index 86869844..808d19bd 100644
--- a/3.0/modules/about_this_photo/helpers/about_this_photo_block.php
+++ b/3.0/modules/about_this_photo/helpers/about_this_photo_block.php
@@ -54,7 +54,7 @@ class about_this_photo_block_Core {
$record = ORM::factory("iptc_record")->where("item_id", "=", $theme->item()->id)->find();
if ($record->loaded()) {
$record = unserialize($record->data);
- $block->content->source = $record["Source"];
+ $block->content->name = $record["ObjectName"];
$block->content->caption = $record["Caption"];
}
diff --git a/3.0/modules/about_this_photo/module.info b/3.0/modules/about_this_photo/module.info
index 632c0f05..e324ae3b 100644
--- a/3.0/modules/about_this_photo/module.info
+++ b/3.0/modules/about_this_photo/module.info
@@ -1,3 +1,3 @@
name = "About this Photo"
description = "Show some simple, specific and useful info about a given photo"
-version = 2
+version = 3
diff --git a/3.0/modules/about_this_photo/views/about_this_photo.html.php b/3.0/modules/about_this_photo/views/about_this_photo.html.php
index 45db0274..f0ef130a 100644
--- a/3.0/modules/about_this_photo/views/about_this_photo.html.php
+++ b/3.0/modules/about_this_photo/views/about_this_photo.html.php
@@ -16,14 +16,14 @@
= $vcount ?> |
- = t("Image ID: ") ?> |
- = $source ?> |
+ = t("Name: ") ?> |
+ = $name ?> |
-
+
= t("Caption: ") ?>
= $caption ?>
-
+
= t("Tags: ") ?>
foreach ($tags as $tag): ?>
diff --git a/3.1/modules/about_this_album/helpers/about_this_album_block.php b/3.1/modules/about_this_album/helpers/about_this_album_block.php
new file mode 100644
index 00000000..a2a849e5
--- /dev/null
+++ b/3.1/modules/about_this_album/helpers/about_this_album_block.php
@@ -0,0 +1,76 @@
+ t("About This Album"));
+ }
+
+ static function get($block_id, $theme) {
+ switch ($block_id) {
+ case "aboutthisalbum":
+ $item = $theme->item;
+ if ((!$item) or (!$theme->item->is_album())) {
+ return "";
+ }
+ if ($theme->item->is_album()) {
+ $block = new Block();
+ $block->css_id = "g-about-this-album";
+ $block->content = new View("about_this_album.html");
+
+ if ($theme->item()->id == item::root()->id) {
+ $block->title = t("About this Site");
+ $block->content->album_count = ORM::factory("item")->where("type", "=", "album")->where("id", "<>", 1)->count_all();
+ $block->content->photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all();
+ $block->content->vcount = Database::instance()->query("SELECT SUM({items}.view_count) as c FROM {items} WHERE type=\"photo\"")->current()->c;
+ } Else {
+ $block->title = t("About this Album");
+ $block->content->album_count = $item->descendants_count(array(array("type", "=", "album")));
+ $block->content->photo_count = $item->descendants_count(array(array("type", "=", "photo")));
+ // $block->content->vcount= $theme->item()->view_count;
+ $descds = $item->descendants();
+ $descds_view = 0;
+ foreach ($descds as $descd) {
+ if ($descd->is_photo()) {
+ $descds_view += $descd->view_count;
+ }
+ }
+ $block->content->vcount = $descds_view;
+ if ($item->description) {
+ $block->content->description = html::clean($item->description);
+ }
+ }
+
+
+ $all_tags = ORM::factory("tag")
+ ->join("items_tags", "items_tags.tag_id", "tags.id")
+ ->join("items", "items.id", "items_tags.item_id", "LEFT")
+ ->where("items.parent_id", "=", $item->id)
+ ->order_by("tags.id", "ASC")
+ ->find_all();
+ if (count($all_tags) > 0) {
+ $block->content->all_tags = $all_tags;
+ }
+ }
+ break;
+ }
+ return $block;
+ }
+}
diff --git a/3.1/modules/about_this_album/module.info b/3.1/modules/about_this_album/module.info
new file mode 100644
index 00000000..8080a24d
--- /dev/null
+++ b/3.1/modules/about_this_album/module.info
@@ -0,0 +1,3 @@
+name = "About this Album"
+description = "Show some simple, specific and useful info about a given album"
+version = 1
diff --git a/3.1/modules/about_this_album/views/about_this_album.html.php b/3.1/modules/about_this_album/views/about_this_album.html.php
new file mode 100644
index 00000000..01dee4f7
--- /dev/null
+++ b/3.1/modules/about_this_album/views/about_this_album.html.php
@@ -0,0 +1,68 @@
+
+ date_default_timezone_set('Australia/ACT'); ?>
+
diff --git a/3.1/modules/about_this_photo/helpers/about_this_photo_block.php b/3.1/modules/about_this_photo/helpers/about_this_photo_block.php
index 86869844..808d19bd 100644
--- a/3.1/modules/about_this_photo/helpers/about_this_photo_block.php
+++ b/3.1/modules/about_this_photo/helpers/about_this_photo_block.php
@@ -54,7 +54,7 @@ class about_this_photo_block_Core {
$record = ORM::factory("iptc_record")->where("item_id", "=", $theme->item()->id)->find();
if ($record->loaded()) {
$record = unserialize($record->data);
- $block->content->source = $record["Source"];
+ $block->content->name = $record["ObjectName"];
$block->content->caption = $record["Caption"];
}
diff --git a/3.1/modules/about_this_photo/module.info b/3.1/modules/about_this_photo/module.info
index 632c0f05..e324ae3b 100644
--- a/3.1/modules/about_this_photo/module.info
+++ b/3.1/modules/about_this_photo/module.info
@@ -1,3 +1,3 @@
name = "About this Photo"
description = "Show some simple, specific and useful info about a given photo"
-version = 2
+version = 3
diff --git a/3.1/modules/about_this_photo/views/about_this_photo.html.php b/3.1/modules/about_this_photo/views/about_this_photo.html.php
index 45db0274..f0ef130a 100644
--- a/3.1/modules/about_this_photo/views/about_this_photo.html.php
+++ b/3.1/modules/about_this_photo/views/about_this_photo.html.php
@@ -16,14 +16,14 @@
= $vcount ?> |
- = t("Image ID: ") ?> |
- = $source ?> |
+ = t("Name: ") ?> |
+ = $name ?> |
-
+
= t("Caption: ") ?>
= $caption ?>
-
+
= t("Tags: ") ?>
foreach ($tags as $tag): ?>