summaryrefslogtreecommitdiff
path: root/modules/info
diff options
context:
space:
mode:
Diffstat (limited to 'modules/info')
-rw-r--r--modules/info/helpers/info_block.php7
-rw-r--r--modules/info/helpers/info_installer.php5
-rw-r--r--modules/info/module.info2
3 files changed, 13 insertions, 1 deletions
diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php
index 62aa0746..238b18b5 100644
--- a/modules/info/helpers/info_block.php
+++ b/modules/info/helpers/info_block.php
@@ -72,6 +72,13 @@ class info_block_Core {
);
}
}
+ if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_dimensions")) {
+ $info["size"] = array(
+ "label" => t("Dimensions:"),
+ "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height))
+ );
+ }
+
$block->content->metadata = $info;
module::event("info_block_get_metadata", $block, $theme->item);
diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php
index 43c216dc..2d06a0ef 100644
--- a/modules/info/helpers/info_installer.php
+++ b/modules/info/helpers/info_installer.php
@@ -25,6 +25,7 @@ class info_installer {
module::set_var("info", "show_owner", 1);
module::set_var("info", "show_name", 1);
module::set_var("info", "show_captured", 1);
+ module::set_var("info", "show_dimensions", 1);
}
static function upgrade($version) {
@@ -36,5 +37,9 @@ class info_installer {
module::set_var("info", "show_captured", 1);
module::set_version("info", $version = 2);
}
+ if ($version == 2) {
+ module::set_var("info", "show_dimensions", 1);
+ module::set_version("info", $version = 3);
+ }
}
}
diff --git a/modules/info/module.info b/modules/info/module.info
index 0f35c922..33b16222 100644
--- a/modules/info/module.info
+++ b/modules/info/module.info
@@ -1,6 +1,6 @@
name = "Info"
description = "Display extra information about photos and albums"
-version = 2
+version = 3
author_name = "Gallery Team"
author_url = "http://codex.galleryproject.org/Gallery:Team"
info_url = "http://codex.galleryproject.org/Gallery3:Modules:info"