Chapter 7. Wacs-PHP: The Skins

Table of Contents

Introduction To PHP Skins
Wacs-PHP: The Simple Skin
Styling Wacs-PHP Skins
WACS and Web 2.0

Introduction To PHP Skins

In previous chapters we've mentioned that the WACS Application Programming Interface (API) is available in both Perl and PHP5. We've also mentioned that many commercial web sites will choose to design their own web pages and will make use of the extensive WACS database infrastructure and utilities via the API from such pages. Other people may simply be interested in using it to tailor the presentation of their WACS site to their personal preferences.

With the Skins project, we go a step further by providing an alternative WACS-based web site written using the Wacs API for PHP5. This can serve one of two purposes - to provide a more complex set of example programs for web designers to study in order to familiarise themselves with how the APIs are used, or it can simply be restyled and personalised to provide a turn-key porn web site quickly and easily. In due course we hope people will contribute some sample pages of their own and there may be a choice of components to make the process easier. Initially we are providing just one skin known as simple. To aid both understanding and the ease of restyling, the Simple Skin is implemented using an external cascading style sheet separate from the HTML output generated by the php programs.

[Note]Note

The Wacs-PHP Simple Skin is still very much an under development project and only just became fully functional at 0.8.5. You can always dive in and help us make it even better!

Wacs-PHP: The Simple Skin

The provided simple skin consists of a number of small PHP5 programs and a single large style sheet shared by all the applications. The php programs are:

Table 7.1. Simple Skin: Components

NameDescription
index.phpThe main menu of the simple skins site - equivalent to wacsfp in WACS itself
latest.phpThe simple skins combined new models, new sets and new videos page - no direct WACS equivalent
girlie.phpThe model page of the simple skins site - very loosely equivalent to wacsmpthumbs in WACS itself
directory.phpThe Alphabetic directory of models - similiar to just one of the modes of wacsmodelthumbs in WACS itself
galleries.phpThe index of galleries - a rather different approach from wacsshow in WACS itself. Focuses on indexing all the entries in a given top level area (sarea); to index the toplevels themselves, use movies.php below.
gallery.phpAn individual gallery display - similiar to that produced by wacsimglist in WACS itself.
movies.phpA top level view of the galleries. Works for either images or videos despite the name.
photos.phpA photo set front page - similiar to wacsindex in info mode.
videos.phpThe video clip version of the above.
search.phpThe search system for the simple skin. This takes a very different approach from the search system in WACS core as it amalgamates both model and clip attributes into a single search engine.

Styling Wacs-PHP Skins

One of the design objectives of the Wacs-PHP skins project was to make it easy to restyle the pages to look very different without touching the code itself purely through use of Cascading Style Sheets. To this end each page has a large number of named <div> and <span> directives placed throughout the generated pages to provide a framework for this to happen.

The first of these is that every page has a standard core structure to it which consists of three div elements with the following ids: pagebanner for the top heading, navigation for the menu links and maincanvas for the content itself. They will also always be featured in this order. You can of course choose to make them invisible or use javascript to toggle their visibility to make pull down menus and the like.

In addition to the core layout detailed above, there are also a number of div classes (because they often repeat) that are set on each type of icon that may be displayed. For set-based content, these are normmovietile and normimagetile for regular standard sized icons and for the smaller ones (but which are used heavily in the simple skin) imagesettile and moviesettile. For generic styling of the small icons there is also a span class of miniicon around the icon itself.

Moving on to Models, here too there are standard div wrappers around all instances of model icons allowing them to be styled. For the normal model headshot icon, there is a div of class modeltile around the icon block itself, with spans of classes iconmodel and iconmodelname around the icon itself and the text of her name respectively. Around the large model headshot you will find a div with the id of headshot in the girlie.php program which is the only place that Wacs-PHP uses the large format headshot.