| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| module:avatars [2019/07/17 00:28] – Use syntax highlighting digital man | module:avatars [2026/03/01 23:45] (current) – [modopts.ini] Document the enabled option (defaults to true) digital man |
|---|
| ===== 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]]): |
| | ''[[dir:exec]]/load/graphic.js'' | ANSI "graphics" library | | | ''[[dir:exec]]/load/graphic.js'' | ANSI "graphics" library | |
| | ''[[dir:exec]]/load/ansiterm_lib.js'' | ANSI terminal library | | | ''[[dir:exec]]/load/ansiterm_lib.js'' | ANSI terminal library | |
| | | ''[[dir:exec]]/load/identicon.js'' | Identicon library | |
| | ''[[dir:exec]]/showmsghdr.js'' | Module to display a message header, with avatar (i.e. executed via ''msghdr.asc'' for v3.16 ) | | | ''[[dir:exec]]/showmsghdr.js'' | Module to display a message header, with avatar (i.e. executed via ''msghdr.asc'' for v3.16 ) | |
| | ''[[dir:exec]]/showmsgavatar.js'' | Module to display a message avatar, only (using ''text.dat'' approach or custom ''msghdr.asc'') | | | ''[[dir:exec]]/showmsgavatar.js'' | Module to display a message avatar, only (using ''text.dat'' approach or custom ''msghdr.asc'') | |
| | ''[[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) | |
| |
| |
| 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. |
| |
| ==== 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). |
| 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. | 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 ^ Default ^ Description ^ |
| | sub | Sub-board internal code for import and export command (default: //auto-detected//) | | | enabled | ''true'' | Set to ''false'' to disable avatar prompting and display from the various avatar-enabled JS modules | |
| | export_freq | Maximum export (to message-base) frequency, in days (default: ''7'') | | | sub | //auto// | Sub-board internal code for import and export command (your networked //sync-data// message area) | |
| | msg_default | Default avatar (base64-encoded) for displaying messages from users without an avatar | | | export_freq | ''7'' | Maximum export (to message-base) frequency, in days | |
| | //<sub-code>//_default | Default avatar (base64-encoded) for the specified message sub-board (internal code, lowercase) | | | msg_default | //none// | Default avatar (base64-encoded) for displaying messages from users without an avatar | |
| | //<group-name>//_default | Default avatar (base64-encoded) for the specified message group (name, lowercase)| | | //<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 | |
| | | auto_identicon | ''true'' | Auto-generate [[wp>identicons]] for users or message-authors/file-uploaders that don't have an avatar set | |
| |
| 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). |
| avatar_file = <filename of avatar collection> | avatar_file = <filename of avatar collection> |
| avatar_offset = <0-based record number of avatar to use> | avatar_offset = <0-based record number of avatar to use> |
| | avatar_identicon = <set to true to auto-generate an identicon based on new user's alias for their default avatar> |
| |
| [logon] | [logon] |
| 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. | 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. |
| | |
| | ===== Disable ===== |
| | |
| | While the Avatar system can be disabled by deleting the events and changing ''set_avatar'' to ''false'' in the ''[login]'' section of ''modopts.ini'', the events will be re-added and ''set_avatar'' set back to ''true'' the next time you run the ''update.js'' script. To prevent this, you must delete all the ''text/avatars/*.bin'' files, which will cause the ''install'' option of ''avatar.js'' to fail. |
| | |
| ===== Specifications ===== | ===== Specifications ===== |
| |
| | -v | Increase verbosity of console output (e.g. for trouble-shooting) | | | -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 | | | -offset=<value> | Specify a record offset of an avatar in an avatar collection file | |
| | -realnames | When exporting user avatar, include the user's real name as well as their alias - required if the message network uses/requires real names | | | -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 | | | -ptr=<value> | Over-ride the stored import/export message pointer value | |
| | -all | Import/export all messages (even those exported locally) - not normally recommended | | | -all | Import/export all messages (even those exported locally) - not normally recommended | |