Tagging systems [closed]

Tagging is like Comments. You have to make sql table, put a reference to the item that it’s tagging, to the tagger, tag contents like the person that we tagged, and some additional datas of tag (like the position of the tag in a photo).
So we will got a table like this:

ID ID_IMAGE ID_TAGGER ID_TARGET tag_position_x tag_position_y

Now that you have made you table you need to build a php page where you will retrieve the tags. Then you need to make the front end code, which will need some js code so that the tag will be placed in position(tag_position_x,tag_position_y) in a photo. This can be done like this:

//some css code 
container_img{
  position : relative;
  background : rgba(0,0,0,0.7);
}
.tag{
  position : absolute;
}

and the js will be like (in jquery):

$(".tag").each(function() {
   $( this ).css("top",$(this).data("position-x"));
   $( this ).css("top",$(this).data("position-y"));
});

Now what I gave you is hints so you know what you have to do.

Leave a Comment