Hi,
I dug and I got the solution for the User Photo plugin.
1 = Open your theme function.php and call Thickbox in frontend:
function tb_enqueue() {
wp_enqueue_script(‘jquery’);
wp_enqueue_script(‘thickbox’);
}
function tb_inject() {
?>
<link rel="stylesheet" href="<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/thickbox.css" type="text/css" media="screen" />
<script type="text/javascript">
var tb_pathToImage = "<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/loadingAnimation.gif";
var tb_closeImage = "<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/tb-close.png"
</script>
<?php
}
add_action(‘wp_head’, ‘tb_enqueue’, 1);
add_action(‘wp_footer’, ‘tb_inject’, 10);
2 = Call User Photo frontend:
<div id="user-avatar-display" >
<h3>Avatar</h3>
<p id="user-avatar-display-image"><?php echo get_avatar( $current_user->ID, 150);?></p>
<a id="user-avatar-link" class="button thickbox" href="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo $current_user->ID; ?>&TB_iframe=true&width=720&height=450" title="Personalizza il tuo Avatar" >Cambia Avatar</a>
</div>
<script type="text/javascript">
function user_avatar_refresh_image(img){
jQuery('#user-avatar-display-image').html(img);
}
</script>
3 = open your css your theme and add :
#user-avatar-display {
background-color: #000;
border:1px solid #454545;
-moz-border-radius: 5px;
-webkit-border-radius:5px;margin: 0 auto;
padding: 0 20px 20px;
position: absolute;
right: 250px;
text-align: center;
top: 390px;
}
#user-avatar-display-image{
border:4px solid #323232;
width:150px;
height:150px;
}
#user-avatar-link{
float:left;
margin:15px 0 15px 32px;
font-size:13px;
}
https://img16.imageshack.us/img16/4346/userphotofrontend.png
P.S: Beware of formatting quotes ”