Synchronet v3.17b-Win32 (install) has been released (Jan-2019).

New Synchronet YouTube channel

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
module:avatars [2019/02/08 04:34]
digital man [PabloDraw] typos
module:avatars [2019/06/06 12:17]
digital man [modopts.ini] clarification and fixed typo
Line 56: Line 56:
  
  
-===== Installation ​=====+===== Install ​=====
  
 ==== 3.16 ==== ==== 3.16 ====
Line 198: Line 198:
 export_freq ​ = 7 export_freq ​ = 7
 </​file>​ </​file>​
 +
 +The ''​showmsgavatar.js''​ module uses the ''​sub_default''​ or ''//<​group-name>//​_default''​ or ''//<​sub-code>//​_default''​ values for a default avatar to show for messages from users without an avatar.
  
 ^ Option ​      ^ Description ^ ^ Option ​      ^ Description ^
 | sub          | Sub-board internal code for import and export command (default: //​auto-detected//​) | | sub          | Sub-board internal code for import and export command (default: //​auto-detected//​) |
 | export_freq ​ | Maximum export (to message-base) frequency, in days (default: ''​7''​) | | export_freq ​ | Maximum export (to message-base) frequency, in days (default: ''​7''​) |
 +| msg_default ​ | Default avatar (base64-encoded) for displaying messages from users without an avatar |
 +| //<​sub-code>//​_default | Default avatar (base64-encoded) for the specified message sub-board (internal code, lowercase) |
 +| //<​group-name>//​_default | Default avatar (base64-encoded) for the specified message group (name, lowercase)|
  
 When user avatars or shared avatar collections (''​.bin''​ files) are updated, they will be exported immediately (or when the ''​AVAT-OUT''​ event is executed). When user avatars or shared avatar collections (''​.bin''​ files) are updated, they will be exported immediately (or when the ''​AVAT-OUT''​ event is executed).
Line 229: Line 234:
  
 This value can be set/changed with the ''​avatar.js''​ ''​newuser''​ command. For example, using [[util:​JSexec]]:​ This value can be set/changed with the ''​avatar.js''​ ''​newuser''​ command. For example, using [[util:​JSexec]]:​
-  jsexec avatars newuser=/​sbbs/​text/​avatars/​silhouettes.bin+  jsexec avatars newuser=/​sbbs/​text/​avatars/​silhouettes.bin ​-offset=0 
 +   
 +**Note:​**\\ 
 +If no ''​-offset''​ value is provided, then an avatar will be chosen from the specified avatar collection (''​.bin''​ file) at random.
   ​   ​
  
Line 236: Line 244:
 If the ''​avatar_offset''​ key is not set (e.g. to a 0-based record index into the ''​.bin''​ file), then an avatar will be chosen at random from the specified ''​avatar_file''​. If the ''​avatar_offset''​ key is not set (e.g. to a 0-based record index into the ''​.bin''​ file), then an avatar will be chosen at random from the specified ''​avatar_file''​.
  
 +==== Message Default Avatar ====
 +
 +A default message avatar may be imported into the ''​msg_default''​ key of the ''​[avatars]''​ section of the ''​[[dir:​ctrl]]/​[[config:​modopts.ini]]''​ file using [[util:​JSexec]]:​
 +  jsexec avatars msg-default=/​sbbs/​text/​avatars/​silhouettes.bin -offset=0
 +  ​
 +**Note:**\\
 +If no ''​-offset''​ value is provided, then an avatar will be chosen from the specified avatar collection (''​.bin''​ file) at random.
 +
 +Once imported into the ''​modopts.ini''​ file, you can rename or copy the ''​msg_default''​ key to ''//<​sub-code>//​_default''​ or ''//<​group-name>//​_default''​ as desired. The ''//<​sub-code>//''​ and ''//<​group-name>//''​ must be lower-case.
 +  ​
 ===== Specifications ===== ===== Specifications =====
  
Line 337: Line 355:
 | disable ​           | Disable current user's avatar | | disable ​           | Disable current user's avatar |
 | disable=<​usernum> ​ | Disable specified user's avatar | | disable=<​usernum> ​ | Disable specified user's avatar |
-| newuser <​filename>​ | Import a new user default avatar from specified avatar collection file |+| newuser <​filename>​ | Import a new user default avatar from specified avatar collection file (use with ''​-offset''​) | 
 +| msg-default <​filename>​ | Import a default message avatar from specified avatar collection file (use with ''​-offset''​) ​|
 | normalize <​filenames>​ | Normalize one or more avatars | | normalize <​filenames>​ | Normalize one or more avatars |
 | normalize ​            | Normalize the current user's avatar | | normalize ​            | Normalize the current user's avatar |

In Other Languages