| | 1 | |
| | 2 | == How to change avatar size in Dolphin 7.1. == |
| | 3 | |
| | 4 | 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'''. |
| | 5 | |
| | 6 | Need to execute the following steps (all path relates to Dolphin's root): |
| | 7 | |
| | 8 | '''1) size of converted picture''' is responsible for size of avatar pics after upload (will start to act only after this step) |
| | 9 | |
| | 10 | find file ''modules/boonex/avatar/include.php'' and write new size in the next lines (replace 64 to 96): |
| | 11 | |
| | 12 | |
| | 13 | {{{ |
| | 14 | define ('BX_AVA_W', 64); // avatar image width |
| | 15 | define ('BX_AVA_H', 64); // avatar image height |
| | 16 | }}} |
| | 17 | |
| | 18 | |
| | 19 | '''2) size of thumbnail avatar block''' is responsible for sizes of avatar block in main part of site |
| | 20 | |
| | 21 | redeclare the following CSS settings from from file ''templates/base/css/common.css'' to the file ''templates/tmpl_uni/css/common.css'' |
| | 22 | |
| | 23 | |
| | 24 | {{{ |
| | 25 | div.thumbnail_image img.thumbnail_image_file, |
| | 26 | div.thumbnail_image img.thumbnail_image_file2 { |
| | 27 | width: 96px; |
| | 28 | height: 96px; |
| | 29 | } |
| | 30 | |
| | 31 | div.thumbnail_image { |
| | 32 | height: 96px; |
| | 33 | width: 96px; |
| | 34 | } |
| | 35 | |
| | 36 | div.thumbnail_block { |
| | 37 | height: 96px; |
| | 38 | width: auto; |
| | 39 | } |
| | 40 | |
| | 41 | }}} |
| | 42 | |
| | 43 | '''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: |
| | 44 | |
| | 45 | |
| | 46 | {{{ |
| | 47 | @import url(../../base/css/common.css); |
| | 48 | }}} |
| | 49 | |
| | 50 | |
| | 51 | '''3) new avatar size in communicator page''' (communicator.php) |
| | 52 | |
| | 53 | Set new settings from file ''templates/base/css/communicator_page.css'' |
| | 54 | |
| | 55 | |
| | 56 | {{{ |
| | 57 | div.sys-connections-fr { |
| | 58 | height: 96px; |
| | 59 | } |
| | 60 | |
| | 61 | div.sys-connections-row { |
| | 62 | height: 106px; |
| | 63 | } |
| | 64 | |
| | 65 | }}} |
| | 66 | |
| | 67 | '''4) new size in avatars module itself''' will affect in pages, where user operates with avatars: |
| | 68 | |
| | 69 | a. 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/''. |
| | 70 | |
| | 71 | Replace from 64 to 96 in the following line there: |
| | 72 | |
| | 73 | |
| | 74 | {{{ |
| | 75 | <img class="bx-def-shadow bx-def-round-corners" style="background-image: url(__url__); width: 96px; height: 96px;" src="<bx_image_url:spacer.gif />" /> |
| | 76 | }}} |
| | 77 | |
| | 78 | |
| | 79 | b. 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: |
| | 80 | |
| | 81 | |
| | 82 | {{{ |
| | 83 | @import url(../../base/css/main.css); |
| | 84 | |
| | 85 | #bx_ava_current { |
| | 86 | height: 100px; |
| | 87 | width: 100px; |
| | 88 | } |
| | 89 | |
| | 90 | #bx_ava_my_avatars .bx_ava_tar { |
| | 91 | height: 132px; |
| | 92 | width: 96px; |
| | 93 | } |
| | 94 | }}} |