Wacs Programming Guide

Twelth Edition

for WACS 1.0.1

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.

10th July 2022

Revision History
Revision Twelth EditionJuly 2022
  • Added definitions for sfocus in sets schema
Revision Eleventh EditionNovember 2019
  • For release 1.0.0
  • Totally re-written tutorial chapters covering PDO instead of DB
  • New schema details for sets, models and download
Revision Tenth EditionMay 2016
  • Separated WacsId and WacsDnl descriptions into seperate chapters
  • Added documentation for new media_* APIs in WacsID
Revision Ninth EditionJanuary 2013
  • Updated API Core reference for new function cacheloc
  • Updated API UI reference for new functions contentlink, thumblink and revised iconlink
  • Major new section in UI introduction chapter discussing the three members of the link family
Revision Eighth EditionMarch 2012
  • Added new selections chapter detailing how to suppress unwanted records and how interlinks work
  • API Core reference updated for new functions in Wacs 0.9.x including conf_dosubs and loadattrvalues

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. Making The Right Selections
Why Discuss Selections?
Avoiding Placeholder Models
Avoiding Duplicate and Alternative Sets
Understanding Link Relations
Illustrating How Link Relations Work
Coding For Link Relations
About Preference Exclusions
Fetching The Preference Exclusions Information
Using The Preference Exclusions
6. The User Interface Toolkit
Introducing WacsUI
Including WacsUI support
WacsUI: DescribeHer
The whatshedoes function
The addkeyicons function
The Link Family
iconlink: WacsUI's Most Important Function
Using the thumblink function
Using the contentlink function
WacsUI: Other Functions
Conclusions
7. 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
8. WACS API: Core Module
Core Module: Summary
Core Module: Reference
9. WACS API: User Interface Module
User Interface Module: Summary
User Interface Module: Reference
10. WACS API: Standard Components Module
Standard Components Module: Summary
Standard Components Module: Reference
11. WACS API: Identification Module
Identification Module: Summary
Identification Module: Reference
12. WACS API: Downloading Module
Downloading Module: Summary
III. WACS Database Schema
13. Schema Reference: Sets
Sets: Schema SQL
Changes made in this release to be used later
Changes in recent previous releases
Sets: Defined Values
14. Schema Reference: Assoc
Assoc: Schema SQL
Assoc: Defined Values
15. Schema Reference: Idmap
Idmap: Schema SQL
Idmap: Defined Values
16. Schema Reference: Models
Models: Schema SQL
Introduction to the Models Schema
Changes made in this release to be used later
Model Schema Listing
Models: Defined Values
17. Schema Reference: Download
Download: Schema SQL
Download: Defined Values
18. Schema Reference: Photographer
Photographer: Schema SQL
Photographer: Defined Values
19. Schema Reference: Tag
Tag: Schema SQL
Tag: Defined Values
20. Schema Reference: Vendor
Vendor: Schema SQL
Vendor: Defined Values
21. Schema Reference: Conn
Conn: Schema SQL
Conn: Defined Values
22. Schema Reference: Keyword
Keyword: Schema SQL
Keyword: Defined Values
23. Schema Reference: Wacsuser
User: Schema SQL
User: Defined Values
24. Schema Reference: Attrib
Attrib: Schema SQL
Attrib: Defined Values
25. Schema Reference: Notes
Notes: Schema SQL
Introduction to how Notes is used
Notes: Defined Values
Index

List of Tables

7.1. Simple Skin: Components
2. The Key WACS Modules
8.1. Function Summary: Core Module
9.1. Function Summary: User Interface Module
10.1. Function Summary: Standard Components Module
11.1. Function Summary: Identification Module
12.1. Function Summary: Downloading Module
13.1. stype: Type of Set: defined values
13.2. sstatus: Status of Set: defined values
13.3. sauto: Automatic Update of Set Allowed?: defined values
13.4. srating: Overall Rating For The Set: defined values
13.5. stechqual: Technical Quality Rating For The Set: defined values
13.6. svariety: Unusualness Rating For The Set: defined values
13.7. sformat: Format of the File(s) In The Set: defined values
13.8. sidlogo: Presence of Burnt-in Logo: defined values
13.9. sinter: Progressive or Interlaced Video Structure
13.10. serrors: Presence of Known Errors: defined values
13.11. scatflag: Generalised type of the set: defined values
13.12. srank: role and position of set: defined values
13.13. sfocus: style of content focus: defined values
13.14. slocation: generalised description of locations: recommended values
13.15. sattire: generalised description of model's clothing: recommended values
13.16. suscattr: how to generate the 18 USC 2257 declaration: defined values
13.17. saspect: Descriptive Aspect Ratio and Resolution (Generalised)
14.1. astatus: association status: defined values
15.1. istatus: idmap status: defined values
15.2. iactive: model activity status as this identity: defined values
15.3. isite: Some recommended site abbrievations: recommended values
16.1. mstatus: model record status: defined values
16.2. mrating: model rating: defined values
16.3. mpussy: model's normal pubic hair style: defined values
16.4. mflag: special marking flag for models: defined values
16.5. model activites flags: defined values
16.6. mcstatus: accuracy of home country field: defined values
16.7. mrace: race of the model: defined values
16.8. mbuild: body type of the model: defined values
16.9. mlabia: about the model's labia: defined values
16.10. mstarsign: The models astrological star sign
16.11. vital statistics: meanings
17.1. dstatus: download status: defined values
17.2. dtype: download set type: defined values
17.3. dsetflag: Suggested value for scatflag based on parsing result
18.1. pgender: gender of the photographer: defined values
18.2. pregion: geographical location of the photographer: defined values
18.3. prating: overall rating of photographer: defined values
18.4. phardness: rating of how explicit this photographer can be: defined values
18.5. photographer activites covered flags: defined values
18.6. photographer technologies used flags: defined values
19.1. tstatus: tag entry status: defined values
19.2. tflag: tag content type status: defined values
20.1. vcurrent: vendor existance status: defined values
20.2. vshow: vendor index inclusion status: defined values
20.3. vmdiruse et al: vendor URL auto-usuability status: defined values
21.1. cflag: connection type: defined values
21.2. cstatus: connection entry status: defined values
22.1. kflag: active entry status: defined values
23.1. ustatus: User Account Status: defined values
23.2. utype: User Type: defined values
23.3. uclass: User Class: defined values
24.1. atsource: attribute source: defined values
25.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 Model Headshot 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
6.1. WacsUI initialisation
6.2. Using WacsUI: describeher
6.3. Using WacsUI: whatshedoes
6.4. Using AddKeyIcons
6.5. Using the iconlink function
6.6. Using the thumblink function
6.7. Using the contentlink function