Index: openacs-4/packages/acs-subsite/www/shared/avatar-x100.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/avatar-x100.png,v diff -u Binary files differ Index: openacs-4/packages/acs-subsite/www/shared/avatar-x50.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/avatar-x50.png,v diff -u Binary files differ Index: openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 5 Jul 2018 09:49:33 -0000 1.14 +++ openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 13 Nov 2018 18:22:23 -0000 1.15 @@ -9,6 +9,9 @@ {size ""} } +# Show the portrait only to authenticated users +auth::require_login + # # The size info is a valid geometry as provided for image magicks # "convert". We provide here a sample list of valid sizes @@ -37,14 +40,14 @@ # we provide cached thumbnails, which use in their cache # key the revision id. # - + set folder [acs_root_dir]/portrait-thumbnails if {![file exists $folder]} { file mkdir $folder } set filename $folder/$itemInfo(revision_id).$size - + if {![file exists $filename]} { switch -- $itemInfo(storage_type) { "file" { @@ -89,6 +92,9 @@ ns_returnnotfound } } +} else { + # Return default avatar image + ns_returnfile 200 image/png [acs_root_dir]/packages/acs-subsite/www/shared/avatar-x50.png } # Local variables: Index: openacs-4/packages/chat/www/resources/chat.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/resources/Attic/chat.css,v diff -u -r1.11 -r1.12 --- openacs-4/packages/chat/www/resources/chat.css 13 Nov 2018 16:54:10 -0000 1.11 +++ openacs-4/packages/chat/www/resources/chat.css 13 Nov 2018 18:22:23 -0000 1.12 @@ -57,14 +57,25 @@ background-color: rgb(235,235,235); } +#xowiki-chat-users .xowiki-chat-user-pic { + width: 45px; + height: 45px; + border-radius: 50%; + border: 2px solid; + padding: 3px; + margin-right: 15px; +} + +#xowiki-chat-users .xowiki-chat-user-pic-wrap { + float: left; +} + #xowiki-chat-users .xowiki-chat-user { font-weight: bold; } #xowiki-chat-users .xowiki-chat-timestamp { color: rgb(152,152,152); - float: right; - padding-left: 4px; } /* Messages block */ Index: openacs-4/packages/xowiki/www/ajax/chat-common.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ajax/Attic/chat-common.js,v diff -u -r1.6 -r1.7 --- openacs-4/packages/xowiki/www/ajax/chat-common.js 12 Nov 2018 16:35:32 -0000 1.6 +++ openacs-4/packages/xowiki/www/ajax/chat-common.js 13 Nov 2018 18:22:23 -0000 1.7 @@ -152,13 +152,26 @@ user_block.className = 'xowiki-chat-user-block'; a.appendChild(user_block); + // User picture + wrapper = document.createElement('div'); + wrapper.className = 'xowiki-chat-user-pic-wrap'; + img = document.createElement('img'); + img.src = '/shared/portrait-bits.tcl?user_id=' + user_id + img.className = 'xowiki-chat-user-pic'; + img.style = 'border-color:' + color; + wrapper.appendChild(img); + user_block.appendChild(wrapper); + // User name span = document.createElement('span'); span.innerHTML = user; span.className = 'xowiki-chat-user'; span.style = 'color:' + color; user_block.appendChild(span); + br = document.createElement('br'); + user_block.appendChild(br); + // Timestamp span = document.createElement('span'); span.innerHTML = msg.message[i].timestamp;