<xen:if is="{$canViewCover}">
<div class="userCover" style="margin-top: 0; margin-bottom: 10px;">
<xen:require css="sonnb_xengallery_author_view.css" />
<xen:if is="{$canManageCover}">
<xen:require js="js/sonnb/XenGallery/gallery.cover.js" /> а это за саму кнопку
<ul class="controls">
<li title="{xen:phrase sonnb_xengallery_delete_cover}" class="button delete" style="{xen:if 'empty({$user.sonnb_xengallery_profile_cover})', 'display: none;'}"><span class="icon delete"></span></li>
<li title="{xen:phrase sonnb_xengallery_upload_cover_image}" class="button upload">
<form action="{xen:link members/cover-upload, $user}" method="post" enctype="multipart/form-data"
class="AutoInlineUploader formOverlay">
<input type="file" name="cover" class="textCtrl" onchange="this.blur()" id="ctrl_cover" title="{xen:phrase supported_formats_jpeg_png_gif}" />
<span class="icon upload"></span>
<input type="hidden" name="crop_x" value="" autocomplete="off" />
<input type="hidden" name="crop_y" value="" autocomplete="off" />
<input type="hidden" name="width" value="" autocomplete="off" />
<input type="hidden" name="height" value="" autocomplete="off" />
<input type="hidden" name="delete" value="" autocomplete="off" />
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" autocomplete="off" />
</form>
</li>
<li title="{xen:phrase sonnb_xengallery_change_cover_position}" class="button edit"><span class="icon edit"></span></li>
</ul>
</xen:if>
<label class="CoverCropControl" style="{xen:if 'empty({$user.sonnb_xengallery_profile_cover})', 'display: none;'}">
<img class="coverImage" src="{xen:helper sonnb_xengallery_cover, $user, 'sonnb_xengallery_profile_cover', 'xengallery-profile-cover'}" />
<div class="instructionWrap"><div class="instruction">{xen:phrase sonnb_xengallery_drag_to_reposition_cover}</div></div>
</label> вроде как отвечает за вывод картики
</div>
</xen:if>