aboutsummaryrefslogtreecommitdiff
path: root/views/default/photos/tagging
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-02 14:34:58 -0500
committercash <cash.costello@gmail.com>2012-01-02 14:34:58 -0500
commitfbdaf2a33386e6746be4de50a0b4aceb06ff5e68 (patch)
tree7dd062f7ab03b565dc768a46b1df089e03fbad9f /views/default/photos/tagging
parent20ab73de5248b3418bbbad27850e3d3e093c473c (diff)
downloadelgg-fbdaf2a33386e6746be4de50a0b4aceb06ff5e68.tar.gz
elgg-fbdaf2a33386e6746be4de50a0b4aceb06ff5e68.tar.bz2
displaying the tag on the photo but not a label for the tag
Diffstat (limited to 'views/default/photos/tagging')
-rw-r--r--views/default/photos/tagging/tag.php24
-rw-r--r--views/default/photos/tagging/tags.php11
2 files changed, 35 insertions, 0 deletions
diff --git a/views/default/photos/tagging/tag.php b/views/default/photos/tagging/tag.php
new file mode 100644
index 000000000..4d3affeb6
--- /dev/null
+++ b/views/default/photos/tagging/tag.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Photo tag view
+ *
+ * @uses $vars['tag'] Tag object
+ */
+
+$coords = json_decode('{' . $vars['tag']->coords . '}');
+
+$attributes = elgg_format_attributes(array(
+ 'class' => 'tidypics-tag',
+ 'data-x1' => $coords->x1,
+ 'data-y1' => $coords->y1,
+ 'data-width' => $coords->width,
+ 'data-height' => $coords->height,
+));
+
+//var_dump($vars['tag']);
+//$text = "This is a something";
+
+echo <<<HTML
+<div $attributes>
+</div>
+HTML;
diff --git a/views/default/photos/tagging/tags.php b/views/default/photos/tagging/tags.php
new file mode 100644
index 000000000..7a4aa3a59
--- /dev/null
+++ b/views/default/photos/tagging/tags.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * View the tags for this image
+ *
+ * @uses $vars['entity']
+ */
+
+$tags = $vars['entity']->getPhotoTags();
+foreach ($tags as $tag) {
+ echo elgg_view('photos/tagging/tag', array('tag' => $tag));
+}