Version 1 (modified by LeonidS, 11 years ago) (diff)

--

How to change avatar size in Dolphin 7.1.

By default avatar size is important parameter for proper view of pages that new size will require changes not only in one place. So let's review the example task - you have site on Dolphin 7.1.3 and higher, with standard template "Uni" and want to change avatar size from 64*64 pixels to 96*96.

Need to execute the following steps (all path relates to Dolphin's root):

1) size of converted picture is responsible for size of avatar pics after upload (will start to act only after this step)

find file modules/boonex/avatar/include.php and write new size in the next lines (replace 64 to 96):

define ('BX_AVA_W', 64); // avatar image width
define ('BX_AVA_H', 64); // avatar image height

2) size of thumbnail avatar block is responsible for sizes of avatar block in main part of site

redeclare the following CSS settings from from file templates/base/css/common.css to the file templates/tmpl_uni/css/common.css

div.thumbnail_image img.thumbnail_image_file,
div.thumbnail_image img.thumbnail_image_file2 {
    width: 96px;
    height: 96px;
}

div.thumbnail_image {
    height: 96px;
    width: 96px;
}

div.thumbnail_block {
    height: 96px;
	width: auto;
}

NB''' Every child (template) css file should have connection to the parent (base) css. In this case templates/tmpl_uni/css/common.css will start from the next line:

@import url(../../base/css/common.css);

3) new avatar size in communicator page (communicator.php)

Set new settings from file templates/base/css/communicator_page.css

div.sys-connections-fr {
    height: 96px;
}

div.sys-connections-row {
    height: 106px;
}

4) new size in avatars module itself will affect in pages, where user operates with avatars:

  1. Set the new size in file modules/boonex/avatar/templates/base/avatars_my.html. Better way is copy this file to the new folder in modules/boonex/avatar/templates/tmpl_uni/.

Replace from 64 to 96 in the following line there:

<img class="bx-def-shadow bx-def-round-corners" style="background-image: url(__url__); width: 96px; height: 96px;" src="<bx_image_url:spacer.gif />" />
  1. Rewrite the next settings from modules/boonex/avatar/templates/base/css. Again - it's better to create new file modules/boonex/avatar/templates/tmpl_uni/css/main.css with the content like:
@import url(../../base/css/main.css);

#bx_ava_current {
    height: 100px;
    width: 100px;
}

#bx_ava_my_avatars .bx_ava_tar {
    height: 132px;
    width: 96px;
}

Attachments (2)

Download all attachments as: .zip

 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub