WACS: Configuration

Contents

Overview

For the configuration files, buzz-word compliance comes to the fore - it's all implemented in XML for your intense visual displeasure! Seriously, the perl module XML::Simple makes it very easy to read configuration files written in this way. It also provides an extensible frame work for future work and has proven itself during the addition of much needed generic interface to vendor web sites (source of material) links and information.

Sections

The XML configuration file is divided into a number of sections, each one associated with a different aspect of how Wacs works. The sub-sections below detail each of these and the currently defined keywords within those sections.

Sections: Database

Variable Description Typical Value
dbienvvar Commerical databases such as Oracle 10g usually require the presence of an environment variable to tell their libraries where to find configuration information, libraries, etc. This is the name of that variable; the companion attribute, dbienvvalue, is what value that variable should have. ORACLE_HOME
dbienvvalue The value that dbienvvar should be set to; typically the location of the installed database library and configuration files for the database. /usr/local/oracle/V10.1.0
dbiconnect This is the connect string that needs to be passed to the perl DBI routines to specify the database type and instance to be connected to. For Oracle it'll be something like dbi:Oracle:orasrv where orasrv is the SID of the database. For MySQL it'll be something like dbi:mysql:wacs:myserver where wacs is the database name and myserver is the name of you database host. dbi:Oracle:orasrv
phpdbconnect This is the connect string that needs to be passed to the PHP DB routines (php5) to specify the database type and instance to be connected to. For Oracle it'll be something like oci8://wacs:wacs@orahost/orasrv1 where orahost is the host name of the Oracle server and orasrv1 is it's instance name. For MySQL it'll be something like mysql://wacs:wacs@mysqlhost/wacs where the first wacs is the username, the second the password and the third the data area. mysql://wacs:wacs@mysqlhost/wacs
dateformat This is the format of date used by the underlying database - initially this will be either DD-MON-YYYY (the Oracle format) or YYYY-MM-DD (the MySQL format). YYYY-MM-DD
dbuser The username to log into the database with. wacs
dbpass The password to log into the database with. wacs

Sections: Tables

Variable Description Typical Value
models name of the models tables. This is indirected to allow for databases to be owned by a different user than the wacs system runs as or for porting considerations to other database platforms. In Oracle you might call it dbowner.models rather than the normal simple models. models
idmap name of the idmapping table - this is the one that links a local model to a model name/number for a specific site. idmap
assoc name of the associations table, ie the one that links a model to a given set. A single set can have many associations, if it has a lot of known models in it. assoc
sets name of the sets tables. Cornerstone of Wacs. sets
download name of the download tables. Used to identify the source information for a set. Depending on status can either be a task list, or a check list of what we already have. download
photographer name of the photographer table. Where the list of known photographers is. photographer
tag name of the tag table. This is the search results and bookmarking mechanism tag
vendor name of the vendor table. This contains information on various source web sites, how to parse them and download from them and how to link to them. vendor
conn name of the connections table. This is the new mechanism for arbitary connections between sets, models and photographers. conn

Sections: Server

The server section contains URLs for your web server. Note that EVERY URL stem given here is a directory and includes the final forward slash (/). The programs do make the assumption they only need to append the program/file name to these URL stems.
Variable Description Typical Value
baseurl The "base" URL of your web server, ie the top level page http://www.example.com/
cgiurl The URL of your cgi-bin directory on your web server. If you intend to use subdirectories for Wacs within the cgi-bin directory, include that here. http://www.example.com/cgi-bin/
iconurl This where the attribute and rating icons are to be found on your web server. These are the glyphs and artwork components. Not to be confused with the model "headshot" icons, which are expected to be in the icons sub-directory of the Wacs document tree. http://www.example.com/wacs/glyphs/
wacsurl This is the URL for the Wacs document tree itself, ie where the htmlbones index.php and other menu segments go. http://www.example.com/wacs/
directurl This is the URL for getting to the set icons *ONLY* if the usedirect option is to be supported. Usedirect causes the web pages generated by wacs applications to include an actual URL for the set icons rather than a reference to the wacsimg cgi program. Please read the section on usedirect in the security section before using this option. http://www.example.com/wacs/iconcache/
wacsmain This is the URL for the Wacs main menu which would typically be either the static page index.php in the wacsdirectory or the Wacs front page program wacsfp. NB: this is a complete URL and does not have to end in a slash for appending options. http://www.example.com/cgi-bin/wacsfp
wacsallm This is the URL that the All Models link should go to. On a site with a small number of models defined, this will probably be just wacsmodelthumbs on it's own; as more models are added, that may just take too long and you may want to set it to be an Alphabetic search like wacsmodelthumbs/A=A or some other criteria. http://www.example.com/cgi-bin/wacsmodelthumbs/A=A

Sections: File System Locations (fsloc)

These values direct Wacs as to where to find the files it should be serving out. Note that in a normal setup these would not be within the web server tree at all, thus making Wacs the gateway to web access of them. Accessing them directly rather than through Wacs could mean loss of all access and login control, and that the URLs would contain more obvious paths giving a better clue to their nature.
Variable Description Typical Value
images Location within the filesystem of the top of the images tree from which Wacs is to operate. /home/wacs/images
videos Location within the filesystem of the top of the videos tree. /home/wacs/videos
glyphs Location of the glyphs (icons and artwork) within the file system. /var/www/html/wacs/glyphs
seticons Where the small icons for each set generated by generate are to be placed, and thus where the wacs programs can fetch them from. /home/wacs/data/iconcache
officons Location where the official icons provided by the source site are stored; these are not necessarily even close to the thumbnails we generate from the image sets themselves and we may well not have them for all sets, depending upon where the sets came from. These will only be used if their location is specified in the sofficon fields in the sets table. /home/wacs/data/seticons
vidicons Where the icons for video files can be found. /home/wacs/data/vidicons
dvdicons Where the icons for DVD covers can be found (for a future project where Wacs knows about appearances by your favourite models on DVDs in your collection). /home/wacs/data/dvdicons
addicons Where the additional icons can be found - this is prepended to the value of saddicons from the sets table if it is set and the directory pointed to is assumed to contain only additional icons for this set. /var/www/html/wacs/addicons
modicons Where the normal-sized headshot icons for the models are to be found. These are usually around 120 x 156 pixel jpeg images. /var/www/html/wacs/icons
modbigicons Certain Wacs applications (like wacsmodelpage) will use a larger icon for the model if present, these are typically somewhere around 250 x 300 pixel jpeg images but can vary quite considerably. This is the location of these larger icons. /var/www/html/wacs/bigicons
thumbcache When wacsthumbs creates a set of thumbnail images for a set, these are cached to speed display on a future occasion. This is the location where this cache is stored. /home/wacs/cache
download Specifies the directory into which new downloads are to be placed. This will be used by the download tools in a future version. /home/wacs/download
leasedir This specifies the directory in which the leases file will be created. If this does not exist, the lease file (name as specified below in the security section) will be created in /tmp. /var/run/wacs
tooldir This is the location where the command line tools like refresh, chkmodel, etc can be found. /usr/local/bin
cgibindir This is the location of the cgi-bin directory, ie where all the wacs cgi programs should be installed. /var/www/cgi-bin
htmldir This the location of the wacs HTML documents tree, and is used for installing glyphs, etc. /var/www/html/wacs

Sections: Security

This contains the attributes used by the security mechanism to determine whether a given user should be allowed to log in and if so, how long their lease should last for.
Variable Description Typical Value
authmode How to attempt authentication: initially this is "host" which means use whatever the web server uses itself but there will be a future extension to allow use of other authentication sources such as a database table of users. host
barredusers A comma separated list of those valid users of the server system who are not allowed to log into WACS. Most likely this might be the kids or possibly spouses who would take exception to the material - the consequences of putting people in this list are on your head! wilma,barney
powerusers A list of people who should be granted power user status when they login through wacslogin. This enables manipulation of tag lists and in due course, ratings, etc. dino
adminusers The highest grade of access - administrators allowed to do anything in the Wacs system tools. fred,root
admingroup The Unix group owner of the wacs image tree - admin users as listed above, plus the web server owner (www or apache) need to all be members of this group. wacs
leasetime The period in hours (number with an h after it) or minutes (number with an m after it) that a lease should be granted for to a given IP address; this could be fairly long lived if it's mainly a friends ADSL line which may change periodically (say 24 or 48), or fairly short if you worry about a subsequent user on the same PC as you were surfing from (say 1 or 2). 24h
leasefile The name of the leases file. This will be in the location specified by the leasedir option in the fsloc (file system locations) section, unless that doesn't exist, in which case it'll be created in /tmp. This file is in the same format as the permanent access control list in the Wacs configuration directory. leases.acl

Sections: Download

The download section covers parameters for the automatic download tools, such as refresh and chkmodel.
Variable Description Typical Value
actithresh Recheck threshold for models marked as active. This controls how long the refresh command will wait between checks, given in days. Even if set to zero, it will not recheck models already checked today. 2
dormthresh Recheck threshold for models marked as dormant. This controls how long the refresh command will wait between checks, given in days. Even if set to zero, it will not recheck models already checked today. 5
idlethresh The number of days of no new sets before a model will be marked as dormant by refresh. Obviously you want to keep checking for a while, but after say three months (90), it's unlikely that the website has more sets of this model that they're merely yet to release. Of course the model can return to active when she does a new photoshoot for a site, and a periodic check of the dormant models should pick up on that fact. The moment a new set appears, the model is marked back as active automatically. 90

Sections: Colours

The colours section gives Wacs some general hints on which colours to use when. Not all of the Wacs programs yet pay attention to these settings but it is a future direction that they should! And yes, I know it's not spelt the American way, but hey the language is called English, right? So you get to learn to spell it the correct English way for a change! After all, we have to spell it the American way in every web page we write.
Variable Description Typical Value
foreground The foreground colour of web pages in HTML standard six-octet notation. #000000
background The background colour of web pages in HTML standard six-octet notation. #FFE8FF
setbackground The background colour of an image set entry in various pages; note in particular that this colour hint can be the only visual differentiator between images and videos in the likes of wacsmpthumbs and wacsimglist - think about this before making it the same as the other two background settings below. #FFB0FF
vidbackground The background colour of a video set entry in various pages. See note above. #FFFFB0
dvdbackground The background colour of a DVD set entry in various pages. See note above. #B0FFB0
mastheadforeground The foreground colour of the masthead on model pages and the front page #F0D8F0
mastheadbackground The background colour of the masthead on model pages and the front page #000040
divider The colour of the section divider in various indexes. #FFA0A0
indexcolours This controls whether models names in wacsmodelthumbs should be colour coded by rating, status, etc or not. It should be set to either Y or N depending upon whether you want the colour coding active. Y

Sections: Layout

This controls the number of columns of set icons that Wacs will try to display and how big those icons will be. Other variables to control more aspects of layout, including model index layouts will no doubt follow. Many of these values are still hard coded in the scripts, but this should change over time.
Variable Description Typical Value
vendormode Whether to enable the vendor mode pull down menus on the various javascript menus. Should be "Y" or "N". Y
style What mode to use for layout - modelattr is for layout by hair and breast size. modelattr
thumbsize The maximum size of thumbnails for a set. Obviously since most images are not square, this will typically be the larger of whichever two dimensions the icon has. 220
thumbcount Number of set thumb nails to be displayed going across the web page. 4
minisize The size of minature icons for a set. These are typically dynamically resized by wacsimg on request. 110

Sections: Precedence

This is a more complex section since most of the precedences are determined by how you've set up "areas" (aka sarea) on your image collection. The default section should always be present, but the others are named for the areas you've chosen. The algorithm is: look for a precedence setting of either models or sets for the given sarea, and failing that, return the default value. So if you have sareas of "favourites", "amkingdom" and "usenet" and want indexes to show models thumbnails in "favourites" and "amkingdom" but set thumbnails in "usenet", you would make this section read:
 <precedence>
  <default>models</default>
  <usenet>sets</usenet>
 </precedence>
Variable Description Typical Value
default What the "normal" precedence should be, models or sets. models
sarea_name Override the precedence for the specified sarea_name to be the value specified (usually opposite of the default). sets

Sections: Debug

New in 0.7.3 This section controls the debugging message level for the various wacs modules and applications, making it possible to increase the amount of diagnostic output selectively to aid in debugging code or to provide information for putting in useful bug reports. At it's simplest, this section would read:
 <debug>
  <global>4</global>
 </debug>
and this will set the global debug level accordingly (once the read_conf routine has been executed by the application of course). For more fine-grained control, the debug level in modules can be specified with "module_wacs" or for an application with "app_wacsimport". That is "module_" and then it's name in lower case for modules, and "app_" followed by the application name (again in lower case) for applications. Thus if you were working on code for wacsimport, you might choose to make this section read:
 <debug>
  <global>0</global>
  <module_wacs>1</module_wacs>
  <app_wacsimport>5</app_wacsimport>
 </debug>
These settings would provide some basic extra debugging for the wacs module (key pathnames, etc) and then pretty extreme output for the wacsimport application.
Next Section: Web Applications
Back to WACS Documentation Index