phototag

Photo tagging using jquery. Tag people/friend in photo
8 followers

This extension creates photo tagging (also called image tagging). You can tag friends/people in photo. You can also save tagged users in database

It provides save callback url, where you need to save your information. It also provides delete callback url, where you can delete tagged user from database.

Requirements

Tested on Yii 1.1.13

Installation

Extract the release file under protected/extensions.

copy images under 'phototag/assets/img' to your project's images folder

Usage

$this->widget('application.extensions.phototag.PhotoTag', array(
            'imageid' => 'img1', // required if you tag more than one images
            'imageurl' => Yii::app()->baseUrl.'/images/image-tag.jpg', // required (actual image url)
            'height' => '100', // optional (default height of tag box)
            'maxHeight' => '200', // optional (maximum height of tag box)
            'width' => '100',// optional (default width of tag box)
            'maxWidth' => '200', // optional (maximum width of tag box)
            'showTag' => 'hover', //optional ('always','hover')
            'canTag' => 'true', //optional ('true','false')
            'showLabels' => 'false', //optional ('true','false')
            'canDelete' => 'false', //optional ('true','false')
            'save' => CController::createUrl('users/ajaxSaveTag'), //optional (save callback url)
            'remove' => CController::createUrl('users/ajaxRemoveTag'), //optional (delete callback url)
            'autoComplete' => $autocomplete_list, //optional (array contains data for autoComplete list)
            'defaultTags' => $already_tagged //optional (array contains already tagged users)
        ));
  • imageid - provide unique Id (required)
  • imageurl - actual image url (required)
  • height - default height (optional)
  • width - default width (optional)
  • maxHeight - maximum height of tag box (optional)
  • maxWidth - maximum width of tag box (optional)
  • showTag - values:'always','hover' (optional)
  • canTag - values:'true','false'. If set to false, user can not tag anyone (optional)
  • canDelete - values:'true','fasle'. If set to true, user can delete tagged user (optional)
  • save - provide save data url. If set it will generate ajax call to save tag information (optional). Here in ajax call url you will get below parameters,
$left = $_POST['tag_x']; // x cordinates
$top_position = $_POST['tag_y']; // y cordinates
$height = $_POST['height'];  
$width = $_POST['width'];
$tagtitle = $_POST['title'];
  • remove - provide delete tag data url. If set it will generate ajax call to delete tag from database (optional). Here in ajax call url you will get below parameters,
$id = $_POST['id']; // id of tag
  • autoComplete - You can provide autocomplete list when user enter something in tag title. (optional) e.g. pass this array over here
$autocomplete_list = array('Anna','Eric','Kevin','Zenith','James');
  • defaultTags - You can display already tagged users using this option (optional). e.g. Pass this array over here
$already_tagged = array(array('id'=>1,'label'=>'Uncle jack','width'=>100,'height'=>110,'top'=>14,'left'=>115),array('id'=>2,'label'=>'Baby john','width'=>100,'height'=>140,'top'=>19,'left'=>395));

Total 2 comments

#16404 report it
rajesh chaurasia at 2014/02/20 02:30am
nice

i was looking for this extension thanks.

#13841 report it
Dhamodharan R at 2013/07/01 06:46am
Great !!

Its really a great extension. Let me try this out. :)

Leave a comment

Please to leave your comment.

Create extension
Downloads