From 706480c069b5396504b4cbc7375f45f34c73268e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 4 Apr 2009 20:40:01 +0000 Subject: adding unique id to each tag div --- views/default/object/image.php | 121 +++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 76 deletions(-) (limited to 'views/default/object') diff --git a/views/default/object/image.php b/views/default/object/image.php index cd3d8fe53..17e1a2974 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -34,13 +34,12 @@ if ($photo_tags) { $phototag_text = "unknown user"; } - $photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '"},'; + $photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '","id":"' . $p->id . '"},'; } $photo_tags_json = rtrim($photo_tags_json,','); $photo_tags_json .= ']'; } - if (get_context() == "search") { //if this is the search view if (get_input('search_viewtype') == "gallery") { @@ -124,68 +123,6 @@ if ($photo_tags) {
'; ?>
-
-getGUID(), false, 'user', '', 0); - - $content = ""; - $content .= ""; - $content .= ""; - $content .= ""; - - $content .= ""; - - $content .= "
"; - - echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'body' => $content)); - -?> -
- -value); - $data_tag->type = 'word'; - $data_tag->value = 'Test tag'; - $data_tag->id = 32; - $data_tag->x1 = 73; - $data_tag->y1 = 56; - $data_tag->width = 100; - $data_tag->height = 32; - - if($data_tag->type == 'user') - $data_tag->data = get_entity($data_tag->value); - else - $data_tag->data = $data_tag->value; - - echo "
"; - - if($data_tag->type == 'user') - echo "{$data_tag->data->name}"; - else - echo "{$data_tag->data}"; - - echo ""; - echo "
"; -// } -//} -?> -
@@ -194,17 +131,33 @@ if ($photo_tags) {
  • + +
    +

    + +
    + +
    - +
    $tags));?>
    - + name; ?>
    + +'; // content wrapper + } // // end of individual image display + + } + +?>
    @@ -217,18 +170,34 @@ if ($photo_tags) {
    - +
    +getGUID(), false, 'user', '', 0); - echo elgg_view_comments($file); + $content = ""; + $content .= ""; + $content .= ""; + $content .= ""; - echo '
    '; // content wrapper - } // // end of individual image display + $content .= ""; + + $content .= "
    "; + + echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'body' => $content)); + ?> + @@ -304,7 +273,7 @@ if ($photo_tags) { tag_top = parseInt(imgOffset.top) + parseInt(tag.y1); tag_left = parseInt(imgOffset.left) + parseInt(tag.x1); - tag_div = $('
    ').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' }); + tag_div = $('
    ').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' }); tag_text_div = $('
    '+tag.text+'
    ').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: 20 + 'px' }); -- cgit v1.2.3