diff --git a/modules/rwinfo/helpers/rwinfo_block.php b/modules/rwinfo/helpers/rwinfo_block.php new file mode 100644 index 00000000..2d129b1e --- /dev/null +++ b/modules/rwinfo/helpers/rwinfo_block.php @@ -0,0 +1,59 @@ + t("Metadata")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "metadata": + if ($theme->item()) { + // rWatcher Edit: Don't display on root album. + if ($theme->item->id == 1) { + return ""; + } + // End rWatcher Edit + + $block = new Block(); + $block->css_id = "g-metadata"; + + // rWatcher Edit: Add Movie Info Option + //$block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info"); + $block_title = ""; + if ($theme->item->is_album()) { + $block_title = t("Album Info"); + } else if ($theme->item->is_movie()) { + $block_title = t("Movie Info"); + } else { + $block_title = t("Photo Info"); + } + $block->title = $block_title; + // End rWatcher Edit + + // rWatcher Edit: File Name change. + $block->content = new View("rwinfo_block.html"); + } + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/rwinfo/helpers/rwinfo_installer.php b/modules/rwinfo/helpers/rwinfo_installer.php deleted file mode 100644 index fd0359ae..00000000 --- a/modules/rwinfo/helpers/rwinfo_installer.php +++ /dev/null @@ -1,24 +0,0 @@ -item()) { - if ($theme->item->id == 1) { - return ; - } - - $block = new Block(); - $block->css_id = "g-metadata"; - $block_title = ""; - if ($theme->item->is_album()) { - $block_title = t("Album Info"); - } else if ($theme->item->is_movie()) { - $block_title = t("Movie Info"); - } else { - $block_title = t("Photo Info"); - } - $block->title = $block_title; - $block->content = new View("rwinfo_block.html"); - return $block; - } - } - static function thumb_info($theme, $item) { $results = ""; if ($item->view_count) { @@ -48,6 +26,7 @@ class rwinfo_theme_Core { $results .= ""; } + // rWatcher Edit: Display Tags if (module::is_active("tag")) { $tagsItem = ORM::factory("tag") ->join("items_tags", "tags.id", "items_tags.tag_id") @@ -66,13 +45,16 @@ class rwinfo_theme_Core { $results .= ""; } } + // rWatcher End Edit if ($item->owner) { $results .= "
  • "; if ($item->owner->url) { - $results .= t("By: %owner_name", array("owner_name" => "owner->url}\">{$item->owner->full_name}")); + $results .= t("By: %owner_name", + array("owner_name" => $item->owner->display_name(), + "owner_url" => $item->owner->url)); } else { - $results .= t("By: %owner_name", array("owner_name" => "{$item->owner->full_name}")); + $results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name())); } $results .= "
  • "; } diff --git a/modules/rwinfo/views/rwinfo_block.html.php b/modules/rwinfo/views/rwinfo_block.html.php index c23aa3e6..8e3b36f6 100644 --- a/modules/rwinfo/views/rwinfo_block.html.php +++ b/modules/rwinfo/views/rwinfo_block.html.php @@ -9,27 +9,27 @@ owner->display_name()) ?> + + is_album()): ?>
  • created)?>
  • + captured): ?> +
  • + + captured)?> +
  • - is_album()): ?>
  • name) ?>
  • - captured): ?> -
  • - - captured)?> -
  • -