This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

concrete5's built in avatar editor has an almost unknown feature. The ability to put rounded corners on avatars!

First copy /concrete/single_pages/profile/avatar.php or if you upgraded your site /updates/concrete5.x.x.x/concrete/single_pages/profile/avatar.php to /single_pages/profile/

open the file and search for var flashvars there should be a code block similar to:

var flashvars = {
    width: '<?=AVATAR_WIDTH?>',
    height: '<?=AVATAR_HEIGHT?>',
    image: '<?=$av->getImagePath($ui)?>',
    save: "<?=$this->url($c->getCollectionPath(), 'save_thumb')?>"
};

now all we have to do is add a parameter. first we have to add a comma after ...'save_thumb')?>"

save: "<?=$this->url($c->getCollectionPath(), 'save_thumb')?>",

then under that we can add:

rounding: 12

so it looks like

var flashvars = {
    width: '<?=AVATAR_WIDTH?>',
    height: '<?=AVATAR_HEIGHT?>',
    image: '<?=$av->getImagePath($ui)?>',
    save: "<?=$this->url($c->getCollectionPath(), 'save_thumb')?>",
    rounding: 12
};

and that gives a slight rounded corner like here on concrete5.org. you can change the number to almost anything you want, for example 100 is a circle.

Loading Conversation