Wacs Programming Guide

Seventh Edition

for WACS 0.8.6

B "Beaky" King

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

12th August 2011

Abstract

WACS is a tool for building Adult Web Sites; it is equally suitable for managing a private collection or building a commercial web site. It has many best of breed features including dynamic filtering, model catalogs, automatic download and powerful search engine. It comes with a powerful API (application programming interface) implemented in both Perl and PHP5 languages to allow web developers to leverage it's facilities from their own programs.

This book describes the application programming interface provided by WACS, and how to utilise it from perl and Php languages. It provides an extensive introductory tutorial with a large number of worked example programs as well as a complete API reference manual. Additionally it provides a schema reference for the WACS database tables as understanding the fields available to you is central to writing programs that utilitise it. The intended audience is web developers and WACS site managers who wish to tailor an existing WACS installation to meet their precise requirements; people merely wishing to use or manage an existing WACS installation may well find the default configurations provided suffice.

The WACS source code and other documentation and support tools can all be found at the WACS website at Sourceforge and on the WACS page at Launchpad.net. The WACS demonstration site can be found at PinkMetallic.com - the site will initially be free but a charge maybe applied later to help fund additional content. Commercial add-ons and support options can be purchased from Bevtec Communications Ltd, see their website at Bevtec Communications.


Table of Contents

I. WACS API Programming Tutorial
1. Introduction
Overview
About This Book
About The Examples
2. Basics: Getting Started
Outline
A First WACS Program
Modules: Importing
Configuration And Security
Initialising Database Connection
Fetching Some Records
Showing The Results
Finishing Off
Putting It All Together
Running MySimple
Reviewing The First Program
3. Using More Database Fields
Adding Model Icons
More Model Information
Using HTML tables
Adding The Model Details
Adding Other Icons
Improving Error Reporting
4. Set Display Routines
About Set Display
Sets: The Basic Bones
Adding Icons
Making The Text More Readable
Connecting Sets And Models
Understanding The Data Architecture
Using Relationships With Assoc
An Example Using Assoc
5. The User Interface Toolkit
Introducing WacsUI
Including WacsUI support
WacsUI: DescribeHer
The whatshedoes function
The addkeyicons function
iconlink: WacsUI's Most Important Function
WacsUI: Other Functions
Conclusions
6. Wacs-PHP: The Skins
Introduction To PHP Skins
Wacs-PHP: The Simple Skin
Styling Wacs-PHP Skins
WACS and Web 2.0
II. WACS API Programming Reference
7. WACS API: Core Module
Core Module: Summary
Core Module: Reference
8. WACS API: User Interface Module
User Interface Module: Summary
User Interface Module: Reference
9. WACS API: Standard Components Module
Standard Components Module: Summary
Standard Components Module: Reference
10. WACS API: Identification Module
Identification Module: Summary
III. WACS Database Schema
11. Schema Reference: Sets
Sets: Schema SQL
Sets: Defined Values
12. Schema Reference: Assoc
Assoc: Schema SQL
Assoc: Defined Values
13. Schema Reference: Idmap
Idmap: Schema SQL
Idmap: Defined Values
14. Schema Reference: Models
Models: Schema SQL
Models: Defined Values
15. Schema Reference: Download
Download: Schema SQL
Download: Defined Values
16. Schema Reference: Photographer
Photographer: Schema SQL
Photographer: Defined Values
17. Schema Reference: Tag
Tag: Schema SQL
Tag: Defined Values
18. Schema Reference: Vendor
Vendor: Schema SQL
Vendor: Defined Values
19. Schema Reference: Conn
Conn: Schema SQL
Conn: Defined Values
20. Schema Reference: Keyword
Keyword: Schema SQL
Keyword: Defined Values
21. Schema Reference: User
User: Schema SQL
User: Defined Values
22. Schema Reference: Attrib
Attrib: Schema SQL
Attrib: Defined Values
23. Schema Reference: Notes
Notes: Schema SQL
Notes: Defined Values
Index

List of Tables

6.1. Simple Skin: Components
2. The Key WACS Modules
7.1. Function Summary: Core Module
8.1. Function Summary: User Interface Module
9.1. Function Summary: Standard Components Module
10.1. Function Summary: Identification Module
11.1. stype: Type of Set: defined values
11.2. sstatus: Status of Set: defined values
11.3. sauto: Automatic Update of Set Allowed?: defined values
11.4. srating: Overall Rating For The Set: defined values
11.5. stechqual: Technical Quality Rating For The Set: defined values
11.6. svariety: Unusualness Rating For The Set: defined values
11.7. sformat: Format of the File(s) In The Set: defined values
11.8. sidlogo: Presence of Burnt-in Logo: defined values
11.9. sinter: Progressive or Interlaced Video Structure
11.10. serrors: Presence of Known Errors: defined values
11.11. scatflag: Generalised type of the set: defined values
11.12. slocation: generalised description of locations: recommended values
11.13. sattire: generalised description of model's clothing: recommended values
11.14. suscattr: how to generate the 18 USC 2257 declaration: defined values
12.1. astatus: association status: defined values
13.1. istatus: idmap status: defined values
13.2. iactive: model activity status as this identity: defined values
13.3. isite: Some recommended site abbrievations: recommended values
14.1. mstatus: model record status: defined values
14.2. mrating: model rating: defined values
14.3. mpussy: model's normal pubic hair style: defined values
14.4. mflag: special marking flag for models: defined values
14.5. model activites flags: defined values
14.6. mcstatus: accuracy of home country field: defined values
14.7. mrace: race of the model: defined values
14.8. mbuild: body type of the model: defined values
14.9. vital statistics: meanings
15.1. dstatus: download status: defined values
15.2. dtype: download set type: defined values
15.3. dsetflag: Suggested value for scatflag based on parsing result
16.1. pgender: gender of the photographer: defined values
16.2. pregion: geographical location of the photographer: defined values
16.3. prating: overall rating of photographer: defined values
16.4. phardness: rating of how explicit this photographer can be: defined values
16.5. photographer activites covered flags: defined values
16.6. photographer technologies used flags: defined values
17.1. tstatus: tag entry status: defined values
17.2. tflag: tag content type status: defined values
18.1. vcurrent: vendor existance status: defined values
18.2. vshow: vendor index inclusion status: defined values
18.3. vmdiruse et al: vendor URL auto-usuability status: defined values
19.1. cflag: connection type: defined values
19.2. cstatus: connection entry status: defined values
20.1. kflag: active entry status: defined values
21.1. ustatus: User Account Status: defined values
21.2. utype: User Type: defined values
21.3. uclass: User Class: defined values
23.1. ntype: notes type: defined values

List of Examples

2.1. WACS Module Import
2.2. Config and Security
2.3. Database Connection Initialisation
2.4. Database Query
2.5. Outputing The List
2.6. Php: Complete Simple Program
2.7. Perl: Complete Simple Program
3.1. Modified Output Loop with Icon Code
3.2. Modified SQL command for more Model Info
3.3. New version of the loop using tables
3.4. Adding Model Information
3.5. Adding A Rating Icon
3.6. Calling dberror for better error reporting
4.1. The Basic SetDisp Program
4.2. Adding A Set Icon
4.3. Making Camel-Style Text Readable
4.4. Modified Icon Cell
4.5. getmodel Subroutine
4.6. Calling The getmodel Function
5.1. WacsUI initialisation
5.2. Using WacsUI: describeher
5.3. Using WacsUI: whatshedoes
5.4. Using AddKeyIcons
5.5. Using the iconlink function