aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-02 15:55:09 -0500
committercash <cash.costello@gmail.com>2012-01-02 15:55:09 -0500
commit9e54d3a4c5274b235a29de9a00e967695024d8e1 (patch)
tree2af48e3315b48aea2a6e16be1211bcbb38d75eb1
parentad4f0fc6c003e0b3365f542795c1c6b3ee06749d (diff)
downloadelgg-9e54d3a4c5274b235a29de9a00e967695024d8e1.tar.gz
elgg-9e54d3a4c5274b235a29de9a00e967695024d8e1.tar.bz2
added support for plain word tags
-rw-r--r--actions/photos/image/tag.php16
-rw-r--r--views/default/photos/css.php14
2 files changed, 14 insertions, 16 deletions
diff --git a/actions/photos/image/tag.php b/actions/photos/image/tag.php
index 0c7ce06ae..20f476944 100644
--- a/actions/photos/image/tag.php
+++ b/actions/photos/image/tag.php
@@ -26,7 +26,17 @@ if (empty($username)) {
forward(REFERER);
}
-/*
+$user = get_user_by_username($username);
+if (!$user) {
+ // plain tag
+ $relationships_type = 'word';
+ $value = $username;
+} else {
+ $relationships_type = 'user';
+ $value = $user->guid;
+}
+
+/* // not adding as plain tag yet
$new_word_tag = false;
if ($user_id != 0) {
$relationships_type = 'user';
@@ -60,8 +70,8 @@ if ($new_word_tag) {
$tag = new stdClass();
$tag->coords = $coordinates_str;
-$tag->type = 'user';
-$tag->value = get_user_by_username($username)->getGUID();
+$tag->type = $relationships_type;
+$tag->value = $value;
$access_id = $image->getAccessID();
$annotation_id = $image->annotate('phototag', serialize($tag), $access_id);
diff --git a/views/default/photos/css.php b/views/default/photos/css.php
index 3e18d1908..4429ca0c7 100644
--- a/views/default/photos/css.php
+++ b/views/default/photos/css.php
@@ -23,19 +23,6 @@
.tidypics-gallery-widget > li {
width: 100%;
}
-/*
-.tidypics-lightbox {
- margin: 0 auto;
- display: block;
- width: auto;
-}
-*/
-/*
-.tidypics-photo {
- margin: 0 auto;
- display: block;
-}
-*/
.tidypics-photo-wrapper {
position: relative;
}
@@ -136,6 +123,7 @@
.tidypics-tag-label {
float: left;
margin-top: 5px;
+ color: #666;
}
<?php