diff options
-rw-r--r-- | actions/photos/image/tag.php | 16 | ||||
-rw-r--r-- | views/default/photos/css.php | 14 |
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 |