2012-05-28 07:10:27 +00:00
|
|
|
{include_template_file file="blocks/account-left.html"}
|
|
|
|
<div class="account-right">
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
{if $mode == 'avatar_bg'}
|
2012-05-28 07:10:27 +00:00
|
|
|
<h2 class="page-header">{lang code='Avatar & Background'}</h2>
|
|
|
|
<img src="{$userquery->getUserThumb($user)}" class="thumbnail moveL marginR10" />
|
|
|
|
<form method="post" enctype="multipart/form-data" name="edit_profile" class="form-horizontal clearfix moveL">
|
|
|
|
<fieldset>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="avatar_file">{lang code='Avatar File'}</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="file" name="avatar_file" id="avatar_file" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<input type="hidden" name="avatar_file_name" value="{$user.avatar}" />
|
|
|
|
</fieldset>
|
|
|
|
<div> </div>
|
|
|
|
<div class="well clearfix">
|
|
|
|
<input type="submit" name="update_avatar_bg" class="btn btn-large btn-primary moveR" value="{lang code='Save Changes'}" />
|
|
|
|
</div>
|
|
|
|
</form>
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
{/if}
|
|
|
|
|
|
|
|
{if $mode == 'make_avatar'}
|
|
|
|
<h2 class="page-header">Set Avatar</h2>
|
|
|
|
{assign var=pd value=$photo.photo_details|json_decode}
|
|
|
|
|
|
|
|
{if $smarty.get.set_avatar != 1}
|
|
|
|
<div class="well clearfix">
|
|
|
|
<h4 style="float:left;">Crop Photo<br /> <small>Drag the corners of the transparent box below to crop this photo into your avatar. </small></h4>
|
|
|
|
<form action="" method="post" class="clearfix" style="margin:0px;">
|
|
|
|
<input type="hidden" name="start_x" id ="start_x" value="0" />
|
|
|
|
<input type="hidden" name="end_x" id ="end_x" value="{$Cbucket->configs.max_profile_pic_width}" />
|
|
|
|
|
|
|
|
<input type="hidden" name="start_y" id="start_y" value="0" />
|
|
|
|
<input type="hidden" name="end_y"id="end_y" value="{$Cbucket->configs.max_profile_pic_width}" />
|
|
|
|
|
|
|
|
<input type="hidden" name="pid" value="{$smarty.get.pid}" />
|
|
|
|
<button type="button" class="moveR btn btn-large" onclick="window.location = '{$cbphoto->photo_links($photo,view_photo)}'">Cancel</button>
|
|
|
|
<input type="submit" name="set_avatar" class="btn btn-large btn-primary marginR10 moveR" value="Set Avatar" />
|
|
|
|
</form>
|
|
|
|
</div>
|
2012-05-28 07:10:27 +00:00
|
|
|
<div id="preview_thumbnail_{$photo.photo_id}" class="thumbnail display-none" style="width:{$Cbucket->configs.max_profile_pic_width}px; height:{$Cbucket->configs.max_profile_pic_width}px; overflow:hidden; margin-bottom:15px; padding:0px;">
|
|
|
|
{get_photo details=$photo size="o" id="preview" style="max-width:none" output="html"}
|
|
|
|
</div>
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
<!-- Jcrop Start -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
function updateCoords ( coords ) {
|
2012-05-28 07:10:27 +00:00
|
|
|
var rx = {$Cbucket->configs.max_profile_pic_width} / coords.w;
|
|
|
|
var ry = {$Cbucket->configs.max_profile_pic_width} / coords.h;
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
|
|
|
|
$('#preview_{$photo.photo_id}').css({
|
|
|
|
width: Math.round(rx * {$pd.l.width}) + 'px',
|
|
|
|
height: Math.round(ry * {$pd.l.height}) + 'px',
|
|
|
|
marginLeft: '-' + Math.round(rx * coords.x) + 'px',
|
|
|
|
marginTop: '-' + Math.round(ry * coords.y) + 'px'
|
2012-05-28 07:10:27 +00:00
|
|
|
});
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
|
|
|
|
$('#start_x').val( coords.x );
|
|
|
|
$('#end_x').val( coords.x2 );
|
|
|
|
|
|
|
|
$('#start_y').val( coords.y );
|
|
|
|
$('#end_y').val( coords.y2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#{$cbphoto->selector_id}_{$photo.photo_id}').Jcrop({
|
|
|
|
onChange: updateCoords,
|
|
|
|
onSelect: updateCoords,
|
|
|
|
setSelect : [0,0,{$Cbucket->configs.max_profile_pic_width},{$Cbucket->configs.max_profile_pic_width}],
|
|
|
|
aspectRatio : 1,
|
|
|
|
minSize : [{$smarty.const.AVATAR_SMALL_SIZE},{$smarty.const.AVATAR_SMALL_SIZE}]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
<!-- Jcrop End -->
|
|
|
|
{/if}
|
|
|
|
<div class="thumbnail" style="width:{$pd.l.width}px; margin:auto;">
|
|
|
|
{get_photo details=$photo size="l" output="html"}
|
|
|
|
</div>
|
2012-05-28 07:10:27 +00:00
|
|
|
|
|
|
|
{/if}
|
|
|
|
</div>
|