bbs-scene.org onelinerz for Synchronet Bulletin Board Systems
echicken@bbs.electronicchicken.com
December 21, 2010

echttp.js v1.1
onelinerz.js v3
randomoneliner.js v1.1
wonelinerz.ssjs v1.7

What's New
----------

Pipe colour-code support.  This can be turned on or off via the "colourCodes" key in the
bbs-scene.ini configuration file: 1 for on, 0 for off.  I also wrote an input function
that parses pipe codes on the fly, so you can see what your message will look like, in
colour, as you type it.

Dynamic oneliner length limitation.  Previous versions used a "oneLinerLength" key in the
bbs-scene.ini configuration file to limit the length of both displayed oneliners as well
as the input box for new oneliners.  This length limit is now calculated on the fly so
that the shorter the user's alias or the shorter the BBS name, the longer their oneliner
can be / more of their message can be displayed.


What's Included
---------------

bbs-scene.ini		- Contains info about your bbs-scene.org account
echttp.js		- My library of HTTP functions
onelinerz.ans		- The onelinerz header graphic by phlash
onelinerz.js		- The main onelinerz script, for the console
randomoneliner.js	- A "rumors"-like mod to print out a single oneliner on the console
readme.txt		- You're reading it, foo!
wonelinerz.ssjs		- A semi-useful onelinerz script for the web

Installation
------------

- Back up your shit before you follow any of the installation & configuration steps
  described in this file and before you run any of these scripts.

- Copy bbs-scene.ini to your sbbs/ctrl/ directory.
- Edit bbs-scene.ini to your liking;
  Change "username" and "password" to match your account;
  Details on the rest of the keys in bbs-scene.ini come later in this file.

- Copy echttp.js, onelinerz.js, and randomoneliner.js to your sbbs/mods/ directory.
  Call onelinerz.js from within another javascript with 'bbs.exec("?onelinerz");' or
  from within a Baja module with 'exec "?onelinerz"'.  These same instructions apply
  to randomonelinerz.js.

- Copy onelinerz.ans to your sbbs/text/menu/ directory.

- Copy wonelinerz.ssjs to somewhere in your sbbs/web/root/ directory, or wherever your
  web document root is.
  Call wonelinerz.ssjs from within another ssjs with 'load("wonelinerz.ssjs");'

Upgrading
---------

- Back up your shit before you follow any of the installation & configuration steps
  described in this file and before you run any of these scripts.

- Copy echttp.js, onelinerz.js, and randomoneliner.js to your sbbs/mods/ directory,
  overwriting any existing copies of these files.

- Copy wonelinerz.ssjs to wherever you put your copy of the previous version, if you're
  using it at all.  Overwrite the existing file if prompted.

- Don't overwrite your sbbs/ctrl/bbs-scene.ini configuration file, as it may contain
  settings required by other scripts.  Simply copy the [onelinerz] section out of the
  included bbs-scene.ini file and paste it over your existing [onelinerz] section, and
  then edit the key-value pairs to your liking.  Most people will only need to edit the
  BBSName value to reflect a short-form version of their BBS' name.

Configuration
-------------

Your configuration is stored in sbbs/ctrl/bbs-scene.ini, and the keys therein are as follows:

[Account]		- This section contains settings related to your user account and
			  your connection to bbs-scene.org.

username		- Your bbs-scene.org username.  Typically the email address that you
			  supplied when signing up.

password		- Your bbs-scene.org password.

server			- The IP or FQDN of the server hosting the BBS Scene API.  You probably
			  don't need to edit this, but if somebody decides to host a fully
			  compatible service somewhere else, or if Netsurge has to move the site
			  to another domain someday, all you'll need to do is edit this setting
			  to reflect the change.

port			- The default is port 80.  It's even less likely that you'll ever need
			  to change this setting.

timeout			- How many seconds to wait for a response from the server. 2 is usually
			  plenty, but increasing this can sometimes be a useful troubleshooting
			  step.

apiPath			- The path to the API resources on the server. You'll likely never need
			  to change this unless Netsurge moves the API.

[onelinerz]		- This section contains settings related to the style and formatting of
			  the onelinerz.

BBSName			- The shortest possible form of your BBS' name (this needs to fit on a
			  line with each user alias and oneliner that get printed to the screen.)

displayFile		- This is the name of a file within your sbbs/text/menu/ directory that is
			  displayed as a header graphic when onelinerz.js is run.  Change this if
			  you've drawn your own graphic to replace the stock header by phlash.

limit			- This is how many oneliners the console (onelinerz.js) script will print.
			  With the default header graphic and layout, 14 oneliners make the best
			  use of available screen area in an 80x24 console.

webLimit		- This is how many oneliners the web (wonelinerz.ssjs) script will print.


aliasLength		- In the console script, user aliases will be truncated to this length
			  before being printed to the screen.  The default setting is 8.

BBSNameLength		- In the console script, BBS names will be truncated to this length before
			  being printed to the screen.  The default setting is 10.
			  Note: oneLinerLength + aliasLength + BBSNameLength + 4 should not exceed
			  the width of your console.

ansiColour		- The ansiColour settings specify an ANSI escape sequence to apply to each
			  portion of the oneliner (alias, bbsname, oneliner) that the console script
			  (onelinerz.js) prints out. Example: [1;37;40m is bright white text on a
			  black background.  For more info, go do some Googling.

ansiColourRandom	- Same as above, but for the randomonelinerz.js rumors script.

bannedUsers		- A comma-delimited list of names of users who are banned from posting
			  oneliners.  These can be real names or aliases.  spidy is only listed as
			  an example; feel free to take his name off of the list.

colourCodes		- 1 or 0, whether or not to display the onelinerz with pipe colour codes
			  applied (if any are present.)