diff --git a/modules/displaytags/helpers/displaytags_installer.php b/modules/displaytags/helpers/displaytags_installer.php new file mode 100644 index 00000000..42f58c57 --- /dev/null +++ b/modules/displaytags/helpers/displaytags_installer.php @@ -0,0 +1,27 @@ +item()) { + return; + } + + // Create an array of all the tags for the current item. + $tagsItem = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", $theme->item->id) + ->find_all(); + + // If the current item has at least one tag, display it/them. + if (count($tagsItem) > 0) { + $block = new Block(); + $block->css_id = "gDisplayTags"; + $block->title = t("Tags"); + $block->content = new View("displaytags_block.html"); + $block->content->tags = $tagsItem; + return $block; + } + } +} diff --git a/modules/displaytags/module.info b/modules/displaytags/module.info new file mode 100644 index 00000000..b905a8e4 --- /dev/null +++ b/modules/displaytags/module.info @@ -0,0 +1,3 @@ +name = DisplayTags +description = Display all tags for the current photo/album. +version = 1 diff --git a/modules/displaytags/views/displaytags_block.html.php b/modules/displaytags/views/displaytags_block.html.php new file mode 100644 index 00000000..a003a415 --- /dev/null +++ b/modules/displaytags/views/displaytags_block.html.php @@ -0,0 +1,10 @@ + +
+ + + ">name) ?>, + + ">name) ?> + + +