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
module:avatars [2018/02/28 11:35] – [TheDraw] Fixed typo digital manmodule:avatars [2021/01/11 23:59] (current) – [Options] typo digital man
Line 14: Line 14:
 ===== Collections ===== ===== Collections =====
  
-The set of [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/text/avatars/|stock avatar collections]] available for users to choose from includes over 150 original pieces of ANSI-art created and contributed by Synchronet sysops: [[person:digital man]], [[person:echicken]], and [[person:kirkman]].+The set of [[https://gitlab.synchro.net/sbbs/sbbs/-/tree/master/text/avatars/|stock avatar collections]] available for users to choose from includes over 150 original pieces of ANSI-art created and contributed by Synchronet sysops: [[person:digital man]], [[person:echicken]], and [[person:kirkman]].
  
 The following screen shots are some of the stock avatar collections being shown in the ANSI terminal mode //Avatar Chooser// (a web-based avatar chooser is also [[https://bbs.electronicchicken.com/?page=More/avatar-gallery.xjs|in the works]], per [[person:echicken]]): The following screen shots are some of the stock avatar collections being shown in the ANSI terminal mode //Avatar Chooser// (a web-based avatar chooser is also [[https://bbs.electronicchicken.com/?page=More/avatar-gallery.xjs|in the works]], per [[person:echicken]]):
Line 53: Line 53:
 | ''[[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'' |
-| ''[[dir:text]]/avatars/*.bin''         | Avatar collections (from CVS and imported from SYNCDATA) |+| ''[[dir:text]]/avatars/*.bin''         | Avatar collections (from the Synchronet Source Repository and imported from SYNCDATA) |
  
  
-===== Installation =====+===== Install =====
  
 ==== 3.16 ==== ==== 3.16 ====
 If running Synchronet v3.16 or a non-current v3.17: If running Synchronet v3.16 or a non-current v3.17:
  
-Download the file ''[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/text/menu/msghdr.asc|msghdr.asc]]'' to your ''[[dir:text]]/menu/'' directory, if you do not already have it (e.g. from CVS).+Download the file ''[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/menu/msghdr.asc|msghdr.asc]]'' to your ''[[dir:text]]/menu/'' directory, if you do not already have it (e.g. from [[dev:Git]]).
  
 This ''msghdr.asc'' will execute the script ''[[dir:exec]]/showmsghdr.js'' whenever a message header is displayed to a user of the Terminal Server. This ''msghdr.asc'' will execute the script ''[[dir:exec]]/showmsghdr.js'' whenever a message header is displayed to a user of the Terminal Server.
Line 74: Line 74:
  
 ==== Step 1 ====  ==== Step 1 ==== 
-If you haven't already, get the ''[[dir:text]]/avatars'' directory contents either via CVS or [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/text/avatars/?view=tar|download]] from this web-page: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/text/avatars/+If you haven't already, get the ''[[dir:text]]/avatars'' directory contents either via Git or download from this web-page: https://gitlab.synchro.net/sbbs/sbbs/-/tree/master/text/avatars/
  
 ... and place these files in your Synchronet ''text/avatars'' directory (create it if it doesn't exist). ... and place these files in your Synchronet ''text/avatars'' directory (create it if it doesn't exist).
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
Line 199: Line 199:
 </file> </file>
  
-^ Option       ^ Description ^ +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. 
-| 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''|+^ Option       ^ Default  ^ Description ^ 
 +| sub          | //auto// | Sub-board internal code for import and export command (your networked //sync-data// message area) | 
 +| export_freq  | ''7''    | Maximum export (to message-base) frequency, in days 
 +| msg_default  | //none// | Default avatar (base64-encoded) for displaying messages from users without an avatar | 
 +| //<sub-code>//_default   |//none//| Default avatar (base64-encoded) for the specified message sub-board (internal code, lowercase) | 
 +| //<group-name>//_default |//none//| Default avatar (base64-encoded) for the specified message group (name, lowercase)| 
 +| msghdr_draw_top | ''true''Display message avatar at the top-of-screen when the message header was displayed at top-of-screen | 
 +| msghdr_draw_above | ''true'' | Display message header avatar above current cursor position | 
 +| msghdr_draw_right | ''true'' | Display message header avatar right-justified | 
  
 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 216:
 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 232:
 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/
Line 229: Line 238:
  
 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 248:
 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 286:
   - 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 290: Line 312:
   jsexec sauce -v /full/path/to/filename.bin   jsexec sauce -v /full/path/to/filename.bin
      
-If you would like to edit the SAUCE record, you cah use same utility script like so:+If you would like to edit the SAUCE record, you can use same utility script like so:
  
   jsexec sauce -e /full/path/to/filename.bin   jsexec sauce -e /full/path/to/filename.bin
Line 299: Line 321:
  
 :!: **Note:** :!: **Note:**
-Multiple filenames may be specified (and exported) per invocation. If you wish to use wildcards to automatically expand to multiple files on the command-line with JSexec for Windows, you will need a recent v3.17 build of JSexec.exe (links with ''setargv.obj'').+Multiple filenames may be specified (and exported) per invocation. If you wish to use wildcards to automatically expand to multiple files on the command-line with JSexec for Windows, you will need a recent v3.17 build of JSexec.exe (linked with ''setargv.obj'').
  
 === Automatic Sharing === === Automatic Sharing ===
Line 310: Line 332:
 Export frequency controls (''export_freq'' setting in ''modopts.ini'') applies to avatar collections as well as user avatars. Export frequency controls (''export_freq'' setting in ''modopts.ini'') applies to avatar collections as well as user avatars.
  
 +===== Command-Line =====
 +
 +''avatars.js'' supports several commands and options, many are only to be used for experimental or trouble-shooting purposes. For a comprehensive list of commands and options, view the file: ''avatars.js'': 
 +
 +==== Commands ====
 +Commands are just words (no special prefix), but many commands support an optional ''=<value>'' suffix:
 +
 +^ Command          ^ Description ^
 +| import           | Import user avatars and avatar collections from a networked message base |
 +| import=<usernum> | Import an avatar for a specific local user account number |
 +| export           | Export any new/updated local user avatars to a networked message base |
 +| export <filenames> | Export one or more avatar collections to a networked message base (forced, not throttled by ''export_freq'' value) |
 +| export -share      | Export any/all locally-shared avatar collections (throttled by ''export_freq'') |
 +| dump=<usernum>     | Display a JSON representation of a local user account's avatar configuration |
 +| draw               | Display (using absolute positioning and ANSI only) the current user's avatar |
 +| draw=<usernum>     | Display specified user's avatar |
 +| draw <filenames>   | Display specified avatar collection files |
 +| show               | Display (using relative positioning and terminal-compliant representation) the current user's avatar |
 +| show=<usernum>     | Display specified user's avatar |
 +| show <filenames>   | Display specified avatar collection files |
 +| verify <filenames> | Verify specified avatar collection files |
 +| remove             | Remove current user's avatar |
 +| remove=<usernum>   | Remove specified user's avatar |
 +| enable             | Enable current user's avatar |
 +| enable=<usernum>   | Enable specified user's avatar |
 +| disable            | Disable current user's avatar |
 +| disable=<usernum>  | Disable specified user's avatar |
 +| 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             | Normalize the current user's avatar |
 +| install               | Install the avatars and avatar_chooser modules into a Synchronet system |
 +
 +==== Options ====
 +Command-line options contain a ''-'' prefix and are used to modify the default behavior of the ''avatars.js'' module:
 +
 +^ Option          ^ Description ^
 +| -v              | Increase verbosity of console output (e.g. for trouble-shooting) |
 +| -offset=<value> | Specify a record offset of an avatar in an avatar collection file |
 +| -realnames      | When exporting user avatars, include the user's full real name as well as their alias |
 +| -aliasonly      | When exporting user avatars, do not include even an MD5-digest of the user's real name |
 +| -ptr=<value>    | Over-ride the stored import/export message pointer value |
 +| -all            | Import/export all messages (even those exported locally) - not normally recommended |
 +| -share          | When combined with the ''export'' command, automatically exports any new/updated shared avatar collections and will re-export at the configured ''export_freq'' interval |
 +| -user=<value>   | Specify a user account number to operate on (not normally required) |
 +| -file=<value>   | Specify a filename to operate on (not normally required) |
 ===== See Also ===== ===== See Also =====
   * [[:module:|Modules]]   * [[:module:|Modules]]
module/avatars.1519846518.txt · Last modified: 2018/02/28 11:35 by digital man
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0