Tema: Avatar Crop
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/11/2010, 22:46
BadMonkey
 
Fecha de Ingreso: noviembre-2010
Mensajes: 8
Antigüedad: 13 años, 5 meses
Puntos: 0
Avatar Crop

Hola

tengo un problema en mi sitio cada vez que hay un miembro nuevo tienen que poner una foto por las reglas de la pagina pero en vida real casi nadie pone su foto real pero eso es lo de menos cuando ellos cargan su foto tienen que crear un avatar usando en croping tool para que su avatar salga en los foros o en el chat

este es el codigo original para el avatar crop tool

_____________________________________________



<bx_text:_bx_ava_crop_image_desc />

<div style="position:relative;">
<img id="bx_ava_crop_img" src="__url_img__" style="width:__img_width__px; height:__img_height__px;" />
</div>

<div id="bx_ava_crop_img_preview_cont">
<div id="bx_ava_crop_img_preview">
<img src="__url_img__" style="" />
</div>
</div>

<div class="bx_ava_block">
<b><bx_text:_bx_ava_crop_preview_title /></b>
<bx_text:_bx_ava_crop_preview_desc />
<form method="post" action="__action__">
<div class="button_wrapper">
<input class="form_input_submit" type="submit" value="<bx_text:_bx_ava_add_avatar />" name="set_avatar" />
<div class="button_wrapper_close"></div>
</div>
<div class="button_wrapper">
<input class="form_input_submit" type="submit" value="<bx_text:_bx_ava_remove />" name="remove_avatar" />
<div class="button_wrapper_close"></div>
</div>
<input type="hidden" name="x1" />
<input type="hidden" name="y1" />
<input type="hidden" name="x2" />
<input type="hidden" name="y2" />
<input type="hidden" name="w" />
<input type="hidden" name="h" />
</form>
</div>

<div class="clear_both"></div>

<script type="text/javascript">

function bx_ava_preview(img, sel) {
$('form > input[name=x1]').val(sel.x1);
$('form > input[name=y1]').val(sel.y1);
$('form > input[name=x2]').val(sel.x2);
$('form > input[name=y2]').val(sel.y2);
$('form > input[name=w]').val(sel.width);
$('form > input[name=h]').val(sel.height);
var scaleX = 64 / (sel.width || 1);
var scaleY = 64 / (sel.height || 1);
$('#bx_ava_crop_img_preview > img').css({
width: Math.round(scaleX * __img_width__) + 'px',
height: Math.round(scaleY * __img_height__) + 'px',
marginLeft: '-' + Math.round(scaleX * sel.x1) + 'px',
marginTop: '-' + Math.round(scaleY * sel.y1) + 'px'
});
}

$(document).ready(function () {
var z = (__img_width__ < __img_height__ ? __img_width__ : __img_height__);
var sel = {
x1: 0,
y1: 0,
x2: z,
y2: z,
width: z,
height: z
}
$('#bx_ava_crop_img').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: bx_ava_preview, x1: sel.x1, y1: sel.y1, x2: sel.x2, y2:sel.y2});
bx_ava_preview(null, sel);
});

</script>



_______________________________________________

alguien me dijo que buscara este codigo

<form method="post" action="__action__">

Y lo cambiara por este

<form name="sexycropform" method="post" action="__action__">


luego que puciera este javascript en lo ultimo del codigo original

<script language="JavaScript">

document.sexycropform.submit();

</script>


y que toda va atrabajar muy bien

pero cuando creo una cuenta nuevaparece que crea el avatar automatico pero la pagina se queda cargando y sale en blanco

me prodrias decir si ese codigo que me ofrecio es bueno ho hay otro mejor que ese que puedan compartir con migo para crear el avatar automatica mente sin el miembro nuevo tener que hacerlo

Muchas Gracias