Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
module:avatars [2018/03/01 12:11] – Links to util:binkit changed to module:binkit digital manmodule:avatars [2019/07/17 00:28] – Use syntax highlighting digital man
Line 50: Line 50:
 | ''[[dir:text]]/menu/main.asc''         | Updated to include new ''/A'' (change avatar) main menu option | | ''[[dir:text]]/menu/main.asc''         | Updated to include new ''/A'' (change avatar) main menu option |
 | ''[[dir:exec]]/default.src''           | Updated to include new ''/A'' (change avatar) main menu option | | ''[[dir:exec]]/default.src''           | Updated to include new ''/A'' (change avatar) main menu option |
-| ''[[dir:exec]]/default.bin''           | Generated by compiling ''default.src'' using [[binkit]] |+| ''[[dir:exec]]/default.bin''           | Generated by compiling ''default.src'' using [[util:Baja]] |
 | ''[[dir:exec]]/logon.js''              | Updated to display user's avatar during logon sequence | | ''[[dir:exec]]/logon.js''              | Updated to display user's avatar during logon sequence |
 | ''[[dir:exec]]/newuser.js''            | Updated to set a new user's default avatar, when configured in ''modopts.ini'' | | ''[[dir:exec]]/newuser.js''            | Updated to set a new user's default avatar, when configured in ''modopts.ini'' |
Line 56: Line 56:
  
  
-===== Installation =====+===== Install =====
  
 ==== 3.16 ==== ==== 3.16 ====
Line 84: Line 84:
 From a command prompt, run ''jsexec avatars install'' From a command prompt, run ''jsexec avatars install''
  
-This step will perform all the necessary [[binkit]] changes and optional ''[[config:modopts.ini]]'' changes detailed later in this article.+This step will perform all the necessary [[util:SCFG]] changes and optional ''[[config:modopts.ini]]'' changes detailed later in this article.
  
 ==== Step 3 ====  ==== Step 3 ==== 
 **Optional:** **Optional:**
  
-Update your command shells to either execute ''avatar_chooser.js'' directly (using Baja ''exec_bin'' or JS ''bbs.exec'' or ''load'' functions) **or** use Baja ''exec_xtrn'' or JS ''bbs.exec_xtrn'' to execute the module via internal code (e.g. ''AVATCHOO''). This [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/exec/default.src?r1=1.18&r2=1.19|small change]] was already made in the "Synchronet Classic" command shell:  ''[[dir:exec]]/default.src''. You will need to recompile ''default.src'' to ''default.bin'' using [[binkit]] (in the ''[[dir:exec]]'' directory):+Update your command shells to either execute ''avatar_chooser.js'' directly (using Baja ''exec_bin'' or JS ''bbs.exec'' or ''load'' functions) **or** use Baja ''exec_xtrn'' or JS ''bbs.exec_xtrn'' to execute the module via internal code (e.g. ''AVATCHOO''). This [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/exec/default.src?r1=1.18&r2=1.19|small change]] was already made in the "Synchronet Classic" command shell:  ''[[dir:exec]]/default.src''. You will need to recompile ''default.src'' to ''default.bin'' using [[util:Baja]] (in the ''[[dir:exec]]'' directory):
   baja default.src   baja default.src
  
Line 102: Line 102:
 ==== AVATCHOO ==== ==== AVATCHOO ====
  
-The //Avatar Chooser// script (by echicken) configured in [[binkit]]->External Programs->Online Programs->Main:+The //Avatar Chooser// script (by echicken) configured in [[util:SCFG]]->External Programs->Online Programs->Main:
 <file> <file>
 ╔══════════════════════════════════════════════════════════╗ ╔══════════════════════════════════════════════════════════╗
Line 131: Line 131:
  
 ==== AVAT-IN ====  ==== AVAT-IN ==== 
-Create a timed event to import network user avatars and shared avatar collections via [[binkit]]->External Programs->Timed Events:+Create a timed event to import network user avatars and shared avatar collections via [[util:SCFG]]->External Programs->Timed Events:
 <file> <file>
 ╔════════════════════════════════════════════════════════════════════╗ ╔════════════════════════════════════════════════════════════════════╗
Line 157: Line 157:
  
 ==== AVAT-OUT ====  ==== AVAT-OUT ==== 
-Create a timed event to export local users' avatars to message networks via [[binkit]]->External Programs->Timed Events:+Create a timed event to export local users' avatars to message networks via [[util:SCFG]]->External Programs->Timed Events:
 <file> <file>
 ╔════════════════════════════════════════════════════════════════════╗ ╔════════════════════════════════════════════════════════════════════╗
Line 193: Line 193:
 Other than command-line parameters, the only configuration options for ''avatars.js'' are stored in the ''[avatars]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file: Other than command-line parameters, the only configuration options for ''avatars.js'' are stored in the ''[avatars]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file:
  
-<file modopts.ini>+<file ini>
 [avatars] [avatars]
 sub          = dove-syncdata sub          = dove-syncdata
 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 207: Line 212:
 Also in the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file: Also in the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file:
  
-<file modopts.ini>+<file ini>
 [newuser] [newuser]
 avatar = <base64-encoded avatar data> avatar = <base64-encoded avatar data>
Line 223: Line 228:
 The new user default avatar, if you have one, will be set with the ''avatar'' value in the ''[newuser]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file: The new user default avatar, if you have one, will be set with the ''avatar'' value in the ''[newuser]'' section of the ''[[dir:ctrl]]/[[config:modopts.ini]]'' file:
  
-<file>+<file ini>
 [newuser] [newuser]
 avatar=IH8gfyB/3H/cf9x/3H8gfyB/IH8gfyB/3n/bf9t/23/bf91/IH8gfyB/IH/ef9t/23/bf9t/3X8gfyB/IH8gf9x/23/bf9t/23/cfyB/IH8gf9t/23/bf9t/23/bf9t/238gfyB/23/bf9t/23/bf9t/23/bfyB/ avatar=IH8gfyB/3H/cf9x/3H8gfyB/IH8gfyB/3n/bf9t/23/bf91/IH8gfyB/IH/ef9t/23/bf9t/3X8gfyB/IH8gf9x/23/bf9t/23/cfyB/IH8gf9t/23/bf9t/23/bf9t/238gfyB/23/bf9t/23/bf9t/23/bfyB/
 </file> </file>
  
-This value can be set/changed with the ''avatar.js'' ''newuser'' command. For example, using [[binkit]]: +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 264: Line 282:
   - PabloDraw defaults to 80 columns width, so you may need to change the width to 10 columns manually   - PabloDraw defaults to 80 columns width, so you may need to change the width to 10 columns manually
   - PabloDraw defaults to enabling iCE colors, so you may want to disable this to be sure you don't accidentally include the BLINK attribute   - PabloDraw defaults to enabling iCE colors, so you may want to disable this to be sure you don't accidentally include the BLINK attribute
-  - PabloDraw truncates (chops-off) the last line of ''.bin'' files when saving them, so you'll need to add an extra line (e.g. of ''X''s) before saving, and repeat this step if you close and re-open the file in PabloDraw +  - PabloDraw truncates (chops-off) the last row of ''.bin'' files when saving them, so you'll need to add an extra line (e.g. of ''X'''s) before saving, and repeat this step if you close and re-open the file in PabloDraw 
-  - PabloDraw has issues creating the SAUCE comment block correctly (at last, on Windows) - instead of an array of 64 character fields, it creates a single \n-delimited field, of up to 64 characters+  - PabloDraw has issues creating the SAUCE comment block correctly (at least, on Windows) - instead of an array of 64 character fields, it creates a //single// \n-delimited field, of up to 64 characters
   - You can use ''jsexec sauce -e <filename>'' to edit SAUCE records of files and work around some of these issues   - You can use ''jsexec sauce -e <filename>'' to edit SAUCE records of files and work around some of these issues
  
Line 305: Line 323:
 If you use the ''-share'' command-line option along with the ''export'' command, then any files matching the pattern: If you use the ''-share'' command-line option along with the ''export'' command, then any files matching the pattern:
 ''[[dir:text]]/avatars///<QWK-ID>//.*.bin'' will be automatically exported whenever the ''avatars.js'' ''export'' command is used. ''[[dir:text]]/avatars///<QWK-ID>//.*.bin'' will be automatically exported whenever the ''avatars.js'' ''export'' command is used.
-Where ''//<QWK-ID//'' is the local system's QWK-ID ([[binkit]]->Message Options->BBS ID) value, in uppercase.+Where ''//<QWK-ID//'' is the local system's QWK-ID ([[util:SCFG]]->Message Options->BBS ID) value, in uppercase.
    
 :!: **Note:** :!: **Note:**
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 |
Line 356: Line 375:
 ===== See Also ===== ===== See Also =====
   * [[:module:|Modules]]   * [[:module:|Modules]]
-  * [[binkit]]+  * [[:util:JSexec]]
   * [[https://bbs.electronicchicken.com/?page=More/avatar-gallery.xjs|Web-based Avatar Gallery]]   * [[https://bbs.electronicchicken.com/?page=More/avatar-gallery.xjs|Web-based Avatar Gallery]]
  
 {{tag>ansi avatar}} {{tag>ansi avatar}}