Documentação ComusThumbz
Login de Admin

Basic Concepts for Template Layout

This article discusses the basic ideas behind template layout and the key to getting the page builder to work.

See also Gallery Rotation
See also Custom macro and query basics variables and formulas
see also Talks about the default macros with no queries {{all-thumb-1}}

Comus provides a set of tools for managing a database full of links to galleries, and a set of tools for building web pages automatically.

Comus builds pages by reading HTML template files which it scans for {{macros}} and %variables% and replaces them with HTML for text links and thumb links to URLS. It gets the link and thumb information from a gallery database which is controlled via mysql.

Once the first pages are built, Comus will run on auto pilot, periodically rebuilding the site, as long as it gets traffic.

*Last updated Dec 18-2005*

MACROS.
There are several types of macros...
Singular Layout Macros.
Plural Layout Macros.
Control macros


Macros are divided into several parts...
Basic Layout Macro form
{{CATEGORY-TYPE-INDEX}}
Where CATEGORY is the category type and can be...
1. {{all-thumb-1}}
2. {{Latin-thumb-1}}
3. {{custom(hidden)-thumb-1}}
4. {{%templatename%-thumb-1}}

Example 1 is a basic singular macro which pulls new thumbs from all categories which are not hidden. Singular macros pull one thumb at a time, whereas plurals pull multiple thumbs at a time. Singular macros are identified by the type which in this case is 'thumb' and not 'thumbs', more explanation of plurals below.

Example 2 is a basic singular macro that pulls new thumbs from ONLY the Latin category, you need enough thumbed and approved galleries within your Latin category to do this, or you will trigger errors and the replacement rules will kick in.

Example 3 is a basic singular macro which will pull from the category called 'custom(hidden)' and only that category, the galleries of this category will not be available to any other category or query so you can use this to manage odd sized thumbs, or to single out your own custom galleries, note also that (hidden) categories are also hidden from the submit form, but the category will still be visible to you if you are logged into comus as administrator.

Example 4, uses the first part of the template source filename to choose what category. IE if you have a source file called 'Latin.tmpl' and build to the Fred.shtml page, then this macro will pull galleries from the 'Latin' category. This enables you to build standard templates which can be re-used for other archives simply by changing the template source name.

TYPE is the type of link to create and can be any one of..

Singular macro types.
link
archivelink
thumb
archivethumb

Plural macro types.
links
archivelinks
thumbs or archivethumbs

Examples...
1. {{all-thumb-1}}
2. <table>{{all-thumbs-1-8}}</table>
3. {{Latin-archivethumb-1}}
4. {{Pornstar-link-1}}
5. <table>{{all-links-5-8}}</table>

Example 1, is a singular thumb macro and will place 1 new thumb on the page, it will pull randomly from all categories but will ignore any galleries with the keyword 'hidden' in their category name.

Example 2, is a plural thumb macro and will pull at random from all categories, it will create a 1 high x 8 wide table of thumbs. You must include your own table tags and this allows you to place style sheet info into the table tags.

Example 3, will only pull from the Latin category, the archivethumb type will ALWAYS be pulled from the database AFTER the thumb type, so it is a way of making sure that you dont pull the newest galleries.

Example 4, will create a textlink and not a thumb link, it will pull from the pornstar category and will pull a new gallery.

Example 5, will create a table of text links 5 rows high and 8 cells wide, note that plural macros ALWAYS have the letter 's' on the end.. so {{all-thumbs-1-8}} is valid.. but {{all-thumb-1-8}} would NOT be valid and would fail.

INDEX}}
When using singular macros, the index must ALWAYS start at 1 and increase 1 at a time.
IMPORTANT: If you change the category, type or query of a macro then you MUST start the index sequence again at 1. If you dont galleries will just come out in an unpredictable order.
Example this is valid.
Code:

 {{all-thumb-1}}
 {{all-thumb-2}}
 {{all-thumb-3}}
 
 {{Latin-thumb-1}}
 {{Latin-thumb-2}}
 {{Latin-thumb-3}}

 {{Latin-link-1}}
 {{Latin-link-2}}
 {{Latin-link-3}}

 {{Pornstar-link-1}}
 {{Pornstar-link-2}}
 {{Pornstar-link-3}}


But this is NOT valid, because the latin index needs to start at 1 when the category changes.
Code:

 {{all-thumb-1}}
 {{all-thumb-2}}
 {{all-thumb-3}}
 
 {{Latin-thumb-4}}
 {{Latin-thumb-5}}
 {{Latin-thumb-6}}


And this is NOT valid because the type has changed and the thumbs and links need to have their own indexes.
Code:

 {{Latin-thumb-1}}
 {{Latin-thumb-2}}
 {{Latin-thumb-3}}
 
 {{Latin-link-4}}
 {{Latin-link-5}}
 {{Latin-link-6}}


This is not valid because each category needs to have it's own index starting at 1.
Code:

 {{Latin-thumb-1}}
 {{Latin-thumb-2}}
 {{Latin-thumb-3}}
 
 {{Pornstar-thumb-4}}
 {{Pornstar-thumb-5}}
 {{Pornstar-thumb-6}}


So this is valid...
Code:

 {{Latin-thumb-1}}
 {{Latin-thumb-2}}
 {{Latin-thumb-3}}
 
 {{Pornstar-thumb-1}}
 {{Pornstar-thumb-2}}
 {{Pornstar-thumb-3}}


You can mix plurals and singulars, this is valid..
Code:

 <table>
  {{all-thumbs-1-4}}
  <tr>
   <td>{{all-thumb-1}}</td>
   <td>{{all-thumb-2}}</td>
   <td>{{all-thumb-3}}</td>
   <td>{{all-thumb-4}}</td>
  </tr>
</table>


But this is NOT.. because the TYPE has changed and plural and singular macros need to have their own indexes.
Code:

 <table>
  {{all-thumbs-1-4}}
  <tr>
   <td>{{all-thumb-5}}</td>
   <td>{{all-thumb-6}}</td>
   <td>{{all-thumb-7}}</td>
   <td>{{all-thumb-8}}</td>
  </tr>
</table>


Thumb and link rendering order..
You might notice that plurals do not have indexes, they have dimensions, and therefore wonder in what order will the thumbs be drawn to the page?

The general rule is that singular thumbs are always pulled before plural thumbs. So this might create undersirable results in the valid example above of mixed plurals and singulars. If you think about it, the newest thumbs there would come out in the singular spots and the very top row would have the left over older thumbs. In this case we can use the archivethumb type to control the build order.

For example in this case the plural thumbs would be pulled before the singular archivethumb macros
Code:

 <table>
  {{all-thumbs-1-4}}
  <tr>
   <td>{{all-archivethumb-1}}</td>
   <td>{{all-archivethumb-2}}</td>
   <td>{{all-archivethumb-3}}</td>
   <td>{{all-archivethumb-4}}</td>
  </tr>
</table>


But what if all macro types are the same, and there are no archive types, perhaps we have used nothing but plurals. Then the render order of thumbs is determined by the alphabetical order of their query names, and then their indexes. Therefore age0 gets processed before age1 and age2, etc. Note that this means the thumbs are NOT neccesarily rendered in order of their appearance on a page. They could actually be rendered from bottom to top, if you wanted to.

In my standard prod booster templates I use 2 singular macros for the new thumbs, and then I use plurals for all the rest. This causes the new thumbs to be processed before any others, and then the age1,age2,ag3,age4 query names of the rest of the layout allows the thumbs to be pulled in the order that I want.

This example is NOT valid..each macro block MUST be unique.
Code:

 <table>
  {{all-thumbs-1-4}}
  {{all-thumbs-1-4}}
  {{all-thumbs-1-4}}
</table>


If you wanted to do something like the above you'd have to make the macros unique.. you can do this by incorporating the macro modifiers.

There are 2 types of modifiers...
prefixes and the query extensions, they are of the form...

{{GROUP#SKIMRATIO#CATEGORY-TYPE-INDEX-COMMAND-QUERYNAME}}

GROUP is one of the prefixes and can be added to a macro to force a group code from the macro on the page to be fed through to the trade script. GROUPS do not expect you to change the indexes. We can use GROUP to send tracking codes through to our trade scripts for example..
Code:

{{T1##all-thumb-1}}
{{T2##all-thumb-2}}
{{T3##all-thumb-3}}
{{T4##all-thumb-4}}

Will send the code T1,T2,T3,T4 through to your links via the %group% variable. If a macro does not have a GROUP setting then %group% will default to the gallery category. For example this variable can be added to your comus trade script prefix..

/trade_out.cgi?group=%group%&u=

SKIMRATIO can be placed into macros to override the skim setting from your category section. By default the skim ratio from the category will be sent through to the trade script via the trade script prefix or suffix, unless it you specifically override it via this modifier. This allows you to skim at different rates for each thumb spot or row on your site..
for example.
Code:

<table>
 {{#80#all-thumbs-1-8}}
 {{#70#all-thumbs-1-8}}
 {{#65#all-thumbs-1-8}}
 {{#60#all-thumbs-1-8}}
</table>

The above code would skim at 80% on the top row, and 70% on the next row, and 65% on the next. You would incorporate this through the %tshave% variable, which is also found in the [Categories] page. This macro extension allows you to over-ride the [Categories] setting, but only when you have a trade script prefix that uses the %tshave% variable for example..

/trade_out.cgi?group=%group%&skim=%tshave%&u=

Note that without the optional skim ratio extensions the macros would be invalid...
Code:

 <table>
  {{all-thumbs-1-8}}
  {{all-thumbs-1-8}}
  {{all-thumbs-1-8}}
</table>

The reason is that there would be no way for the script to tell each row apart, whereas when we add the skim ratio each macro becomes unique.

COMMAND is always just 'query', assuming we are extending the macro, if you leave the command out then comus will default to the 'new' macro so these three system macros are identical in purpose..
Code:

 {{all-thumb-1}}
 {{all-thumb-1-query-new}}
 {{all-thumb-1-query-age0}}

They are all just aliases of each other and will all pull new galleries from ALL categories.

Note also that if you forget the -query- part, then the macro will error and probably render nothing but the macro itself.

These are NOT valid and will cause errors
Code:

 {{all-thumb-1-new}}
 {{all-thumb-1-age0}}



QUERYNAME is a reference to a set of rules, it follows the format of the mysql WHERE clause, you can go to mysql.org for more info on the WHERE syntax.
The system standard queries will suit most people and you dont even need to define most queries as you'll find them in the examples, you can also examine the system standard queries by placing {{showqueries}} on your template, make sure to remove it when you are done.
I do make the habit though of always defining my queries, it just makes it easier to read and debug.

Custom queries are defined using the format.
{{setquery-" blaaaa "}} where blaaaa is your query.
You can find more info on Custom Queries here

These are the standard queries that I use and you will find these the most trouble free..
Code:

{{setquery-new-" periodsshown > -1 ORDER BY periodsshown, rand() "}}
{{setquery-stage1-" periodsshown > 0 ORDER BY clickperiods "}}
{{setquery-age1-" periodsshown > 0 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age2-" periodsshown > 1 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age3-" periodsshown > 2 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age4-" periodsshown > 3 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age5-" periodsshown > 4 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age6-" periodsshown > 5 ORDER BY periodsshown,clicks/clickperiods DESC"}}


Once defined a query can be used as a set of rules and applied to any query.

Code:

{{all-thumb-1-query-new}}
{{all-thumb-1-query-stage1}}
{{all-thumb-1-query-age1}}
{{all-thumb-1-query-age2}}
{{all-thumb-1-query-age3}}


The queries I've definied above are the standard queries used by the prod booster system.

Gallery life cycles.

Whether daily or prod booster, the life cycle of a gallery is generally the same.

1. pull a new gallery or a set of new galleries in.
2. Move them through a first stage to collect clicks,
3. let the system age and advance galleries to the next stages.

Cycle 1. pull in as new.. The galleries are aged via the periodsshown variable, if periodsshown=0 then the gallery is new.
Periodsshown is a counter that increases by 1 for each day that passes once a gallery has been used as new. periodsshown will be 0 for galleries that are waiting to be listed.

A basic new query....
{{setquery-new-" periodsshown>-1 order by periodsshown, rand() "}}

and a basic new macro.
1. {{all-thumb-1-query-new}}
2. {{Latin-thumb-1-query-new}}

Example 1 will pull new galleries from all categories, falling back onto the replacement rules if it should fail.

Example 2 will pull new galleries but only from the Latin category, it will fall back onto the replacement rules if it should fail, and if it cant find replacements in the Latin category it will seek replacements from alternate categories, unless replacement rules are off and then it will just leave a blank spot.

With prod booster the ability to pull new thumbs on every build will only work if the {{allowdupes}} or {{prodbooster}} macro is present on the page, if these macros are not present then the prod booster system will freeze up because Comus will only honour the new macros once per day.
In the prodbooster templates we typically only have a single spot which requests new thumbs, and we control the total galleries used per day by the build frequency. IE a 10 minute refresh period, or build cycle would pull 144 thumbs per day or 6 thumbs per hour x 24 hours.

This means for daily templates you need to remove the {{allowdupes}} and {{prodbooster}} macros from the pages that request new thumbs. And you will need to request a lot more thumbs, enough to cover your daily sections at least. And this means that prod booster templates do not easily transfer over to daily systems. By default we provide the prod booster system.

Cycle 2. Move them through the first stage. In the case of prod booster, we lock galleries in with the stage1 query.
Code:

{{setquery-stage1-" periodsshown > 0 ORDER BY clickperiods "}}

and the actual macro...

{{all-thumbs-1-8-query-stage1}}

This sorts the galleries purely by their clickperiods, which is a count of how many builds have passed since the gallery was newly introduced.
This macro causes the new galleries to cycle across the stage1 area, 1 step at a time, each time the site is rebuilt throughout the day.

Once the galleries complete their march across the stage1 area, they are then released into the age1 area where they are sorted by click performance, usually we put age1 in a section called 'Todays Thumbs'.

Code:

{{setquery-age1-" periodsshown > 0 ORDER BY periodsshown,clicks/clickperiods DESC"}}


In a daily template, where we select a limited amount of galleries for each day, we usually skip the stage1 area, and have a whole section of new macros followed by age1..

Code:

{{setquery-age0-" periodsshown > -1 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age1-" periodsshown > 0 ORDER BY periodsshown,clicks/clickperiods DESC"}}
{{setquery-age2-" periodsshown > 1 ORDER BY periodsshown,clicks/clickperiods DESC"}}

With daily must make sure NOT to have the {{allowdupes}} or {{prodbooster}} macros on the page.. or it will pull new thumbs constantly throughout the day. Once these macros are removed, you can
build the page as many times as you like throughout the day, but the
template will only pull new thumbs once per day. You might still want to build periodically throughout the day if you are loading a toplist into the page throughout the day.

Rule#1: In order for a gallery to be able to appear in age1 it must first have been introduced as a new gallery via a 'new' query or via an age0 query. age0 is a sytem default query for new galleries.

Pages will be built automatically by Comus, and new galleries will be cycled in on their own through as long as the site is getting traffic to its pages. The auto build does not need a cron job set up, as the builder is wedged into the HTML automatically.

Warning: Because building is traffic driven, Prod booster needs at least 144 hits per day to function fully, if you dont have at least this much traffic the system will slow down and try to preserve the new gallery database until the traffic picks up again.
You can get around this by setting up Cron Jobs to auto build your pages.
There is an article on cron setup here

You MUST make sure that you have galleries with thumbs and descriptions in Approved status in order for the templates to work. We provide these via the starter galleries. If you dont have enough galleries then you'll get a range of problems but most notably missing thumbs. The ideal minimum for prod booster is 2500 galleries which allows for around 14 days worth of history before rotation.

Templates: When talking about templates here, I mean the code snippets that contain macros and HTML that we are feeding into the builder. These templates are actually found under the [Pages] icon. The templates contain standard HTML of your page and include special Comus {{macros}} which you put into the template and tell comus how to extract records from your database and how you want them to appear.
Pages: The resulting pages that are created after the builder processes the templates and converts the {{macros}} into html.
Builder: The main comus program that turns templates into pages, can be activated manually or automatically.
Elements: The basic lay out units and can be in any form such as
-a text link
-a single thumb
-a thumb with a link
-a text message like a blog post
-a combo of all the above
Element Style: A HTML definition of how a macro should render itself. You can configure your element styles in any way you like. There are 2 standard styles (thumb and link)and you can modify these or add your own custom styles with the {{setElementStyle- macro.
Record or Database Record: A single entry in the database. Records are constructed of fields which contain tracking variables like age, clicks, etc and also keep track of rendering information for the element such as thumb, description, and category data. Records can be edited in the gallery review section, where you can control the images and descriptions and approval status.
Macro: These are the main tools used to place elements on the pages, and there are also control macros, they start and end in {{ }} and you can find a full reference on the forums.
Plural Layout Macros: These lay elements out in blocks and tables, by using multiple records instead of rendering a single element at a time.
Singular Layout Macros: These lay a single element at a time.
Control Macros: These control various aspects of the script other than layout such as build rates and behaviours, many of these control macros have equivalent controls under the [Advanced] tab.
Customizing Comus Further:
You can get by from here, but if you plan to customize comus in wierd and unique ways you will also need to know the info below, I think it helps to have an vague awareness of the info below though because it will help to understand what is going on with the site.
Query Control Macros: These are a special set of optional macros that are usually found in the headers of the templates, they are used to define the RULES that are available to 'Query's used in layout macros. I say optional because you can usually do everything you need without ever redefininf the standard macros. There are a standard set of default Query Control Macros such as 'new - stage1 - age0 - age1 - age2 -age3, etc. They allow you to define a set of rules that will be used later within the layout macros. You are also able to create a layout macro without a set of query rules, in which case the macro defaults to always pulling new records. The rules follow the same guidelines as the MYSQL query language, and if you want to get really tricky you can look this up on the main mysql support sites. You shouldnt need to do that for a standard site though.
%variables%: These are custom comus variables which can be set into your pages by using the {{setVar- macro, they will always be surrounded by %'s I mention them here so they dont get confused with mysql variables.
Record or Database Fields: The records contain information in fields that we can use to tweak rules which we use in the Query Control Macros. For example the age of a record can be determined by checking the 'periodsshown' field, which would show in a setquery macro as {{setquery-new-" periodsshown>-1 ORDER BY periodsshown,rand() "}}. There are other fields as well
periodsshown: A record field used to track the age of a record. If periodsshown=0 then the gallery has never been used if periodsshown=2 then the gallery is on it's second day of use.

Layout Macros.
As mentioned above there are 2 types of layout macros, singular and plural, here is an example of plural macros, there are more detailed references on the forums for singular and plural.

{{all-thumbs-1-8-query-new}}

'all' tells us which categories to use, in this case we wish to use 'all' categories, but you can also place a specific category name such as {{teen-thumbs-1-8-query-new}}
'thumbs' tells us what element style to use, in this case we are using the standard 'thumb' style, and the 's' at the end of 'thumb' tells us that this is a plural layout macro that will use multiple records.
This style can be modified by using a {{setElementStyle- control macro, or by finding the thumb element style under the [Templates] icon.
'1-8' The 2 numbers here tell us the dimensions of the table which are 1 row of 8 thumbs. Inceidently I use 8 per row as an example, you can change this to whatever you like.
'query' this tells us to apply a query rule set to the layout.
'new this tells us which rule set to apply to the layout. New is a predefined rule set that tells the script how to find new records in the database. You can over-ride this rule by using a {{setQuery- macro, so you can change what Comus thinks of as a new thumb, the query generator has some examples of the standard rule sets.

Traffic: Means surfers hitting your site and clicking on the elements. The standard Comus set up requires traffic to trigger the builder, (because it uses a hidden image that is linked to a script) as traffic arrives it loads the image and sends an event message to comus which activates the builder and maintenance functions, so if you have no traffic then it wont trigger builds. There is an alternative which is to setup a cron job to trigger the events, but we usually dont do this as it is a little more complex, if you want to have builds triggered at exact times though, you can look up on the forum for 'cron job' and how to set it up.


Setting up a thumb template to rotate thumbs across your site.
Comus rotates records by default unless deactivated. (see spin rotation in docs and on the forums for how rotation works)

Once approved records are placed in a pool of galleries ready to be listed.
The default rules will pull one of these galleries at random, via any layout macros that are using the 'new' ruleset.

Here are some examples of layout macros that will extract new galleries.
Standard queries:
{{all-thumb-1}}
{{all-thumbs-2-8}}
{{all-thumbs-1-8-query-new}}
{{all-thumbs-2-8-query-age0}}
A Custom query:
{{setQuery-grabstuff-" periodsshown=0" }}
{{all-thumb-1-query-grabstuff}}

These macros though will NOT pull new galleries, and so unless you have something like the above macros to extract new galleries then the first stage will not be completed, and so the rotation process will never be able to start.
Standard queries:
{{all-thumb-1-query-age2}} ... this one tries to get a 2 day old gallery, but this can never happen without a new gallery on the site.
{{all-thumbs-2-8-query-age1}} ...... this one tries to get a 1 day old galleries, but again this can never happen without a new gallery on the site

There are 3 main techniques for introducing new records to your site.
1. The single daily build method
2. The prodbooster 10 minute method.
3. The prodbooster hourly method.

1. The single daily build method. This method puts the least strain on your server, and is recommended for virtual hosted sites or sites that have very little traffic.
With this method we create a section that pulls just enough records to fill your new section. Lets say you have a zone of 5 rows and 8 thumb elements, so you set your new section to pull a total of 40 records.
You can then set your build/refresh rate to activate once per day with a refresh rate of 1440, although this is not required if you remove all {{prodbooster}} and {{allowdupes}} macros from your templates, because if these
macros are not present then comus will just ignore any requests for new thumbs unless it detects a new day has occured. Single daily builds are good for sites that like to cherry pick their records and schedule them, (which is a lot of work by the way). The disadvantage is that unless you are cherry picking your content manually, it will never perform as well as the hourly or 10 minute prod booster configurations because it only introduces 40 new records and does
not have enough material to be able to throw away lesser performing content.
To create a new section for the single daily build method you could use a macro set like..
<table> {{all-thumbs-5-8-query-new}}</table>
or you could use singular layout macros with something like...
<table>
<tr>
<td>{{all-thumb-1-query-new}}</td>
<td>{{all-thumb-2-query-new}}</td>
<td>{{all-thumb-3-query-new}}</td>
<td>{{all-thumb-4-query-new}}</td>
<td>{{all-thumb-5-query-new}}</td>
<td>{{all-thumb-6-query-new}}</td>
<td>{{all-thumb-7-query-new}}</td>
<td>{{all-thumb-8-query-new}}</td>
</tr>
<tr>
<td>{{all-thumb-9-query-new}}</td>
<td>{{all-thumb-10-query-new}}</td>
<td>{{all-thumb-11-query-new}}</td>
<td>{{all-thumb-12-query-new}}</td>
<td>{{all-thumb-13-query-new}}</td>
<td>{{all-thumb-14-query-new}}</td>
<td>{{all-thumb-15-query-new}}</td>
<td>{{all-thumb-16-query-new}}</td>
</tr>
</table>

In your next sections you would use age1 ...age2 ... age3 , etc..
I've used plurals as an example buy you could use the equivalent singulars. I prefer plurals because they are much faster to execute, their downside is that they can look wierd to a WYSIWYG HTML editor.

Yesterdays best..
<table> {{all-thumbs-5-8-query-age1}}</table>

Day before best..
<table> {{all-thumbs-5-8-query-age2}}</table>

3 days ago
<table> {{all-thumbs-5-8-query-age3}}</table>

Note: That a site which only builds once per day usually has age1 for its elements of yesterday and this is going to be different to the prod booster techniques in which yesterdays thumbs are usually age2. The reason is that on a site which only processes it's pages once per day then todays section is usually comprised of completely new and never used before records. Records of age=0 or age0.
The prod booster systems however are rebuilding the pages constantly throughout the day, so the initial thumbs are age of 0, but then on the next build of the day they are aged to age=1 and they stay this way until the day passes over.

There is a technique which modifies this behaviour on the forum if you look up the daily template examples which involve building 2 pages, where the first template extracts the new records for the day, then when the next template is processed all those new records now have age=1 while yesterdays become age=2, and you can basically use the same techniques as the prod booster pages. This is a very handy technique for the daily templates, because it allows you to extract a set of images which are then ranked throughout the day to put the best records up to the top rows. It becomes similar to prod booster with a lot less record usage, and is favoured again by webmasters who like to schedule and control their content more directly.


2. The Prod Booster 10 Minute Method. This is the most CPU intensive method but produces excellent results with the least amount of webmaster work. In this method you set the site to a refreshperiod of 10 minutes and activate the {{prodbooster}} macro by adding it to the template, or by using the [Advanced] editing tab to activate the prodbooster system.
When prodbooster is enabled, comus honors the request for new records on every single build, unlike it's default where the requests for new are ignored unless it is a new day. This means that if you try to use a standard daily template while prodbooster is enabled and you have 10 minute refresh periods you are going to extract a LOT of records from your database, IE 40 x 144 builds per day = 5760 records per day, and that can deplete a database within hours.
So the idea of the 10 minute prodbooster system is to extract a single record per build and then rotate the new records through a staging area, where we can collect click and statical info which is then used to rank the record for future builds.

The best technique to handle the new record I've found is to do something like this..

First we extract the new image, but we actually hide it inside a comment. The reason for this, is that it actually makes your layout template much easier to deal with, I'll show you the alternative which is to use singulars.
<!-- {{all-thumb-1-query-new}} -->
Then we create a staging area with a single row of elements.
<table>{{all-thumbs-1-8-query-stage1}}</table>

Then we can place the rest of the best of the records for the day below them
<table>{{all-thumbs-4-8-query-age1}}</table>

This would create a top section on your site that has a single row of new thumb elements which are rotating across the top row and collecting clicks, on a 10 minute build cycle they would be released after 80 minutes of exposure to compete with the rest of your daily images in the 'age1' table below. In this example are using a total of 144 thumbs per day but we are only keeping the best 4x8=32 images. You can think of this as a 32:144 quality ratio, you are basically holding on to only the best 22% of your images. Here's the HTML condensed.

<!-- {{all-thumb-1-query-new}} -->
<table>{{all-thumbs-1-8-query-stage1}}</table>
<table>{{all-thumbs-4-8-query-age1}}</table>

The alternative to the hidden thumb is to use singulars with a 7 stage staging area.. some people prefer this method as they like to be able control exactly what happens on each image of their first row, for example they might place
a couple of custom thumbs that are always on the top row and lead to a personal page of some kind, and only use 5 thumbs for their staging area.
<table>
<tr>
<td>{{all-thumb-1-query-new}}</td>
<td>{{all-thumb-1-query-stage1}}</td>
<td>{{all-thumb-2-query-stage1}}</td>
<td>{{all-thumb-3-query-stage1}}</td>
<td>{{all-thumb-4-query-stage1}}</td>
<td>{{all-thumb-5-query-stage1}}</td>
<td>{{all-thumb-6-query-stage1}}</td>
<td>{{all-thumb-7-query-stage1}}</td>
</tr>
</table>


Now for the rest of your site you can use the standard macros.. Note that with prod booster, age1 means the records of today and age2 means yesterday.
Yesterdays best.
<table>{{all-thumbs-4-8-query-age2}}</table>

Best of 2 days ago
<table>{{all-thumbs-4-8-query-age3}}</table>

Best of 3 days ago
<table>{{all-thumbs-4-8-query-age4}}</table>

3. The Prod Booster Hourly Method. This is the least CPU intensive method and is my prefered method for all kinds of sites and servers. It produces excellent results on par with 10 minute prod booster as far as webmaster work requirements. In this method you set the site to a refreshperiod of 60 minutes and activate the {{prodbooster}} macro by adding it to the template, or by using the [Advanced] editing tab to activate the prodbooster system.
The idea is similar to prod booster 10 minute however we drop the stage1 area altogether and instead extract a single row of elements.

In this case your daily top section now looks like this..

<table>{{all-thumbs-1-8-query-new}}</table>
<table>{{all-thumbs-4-8-query-age1}}</table>

Which produces 4 rows of 8 records, with the new records on the top row and the best for today below it. For an hourly build this means your daily usage is
24x8=192 records per day. Your quality ratio is 192/32= 16.6% .. or in other words you are keeping the best 16% of your records and discarding the rest. Provided you have adequate traffic this should produce better results than the 10 minute method, however the 10 minute method seems to work better when you have less than 20,000 hits per day while this method works better when you get above 20k. The reason is that the higher traffic allows you to have an accelerated sample rate, so with 1000 samples per hour you can increase your thumb usage from 144 to 192. You can modify this more as you get even more traffic, say as you hit 50k then you can run 30 minute build cycles and sample 394 galleries per day.

Now for the rest of your site you can use the standard macros just like the 10 minute prod booster method.. Note that with prod booster, age1 means the records of today and age2 means yesterday.
Yesterdays best.
<table>{{all-thumbs-4-8-query-age2}}</table>

Best of 2 days ago
<table>{{all-thumbs-4-8-query-age3}}</table>

Best of 3 days ago
<table>{{all-thumbs-4-8-query-age4}}</table>

How to set up a Hall of fame

There are several methods for setting up a Hall of Fame. The hall of fame contains the best records you have to offer, so it serves as the best sales tool for your site that you can possibly have. For this reason, I highly recommend that you find ways to prominently display these records right at the top of your site as the first thing that your surfers will see, it is the best way to get your site to grow.

To create a hall of fame we need to first define a rule set to be used in the layout macros, however there are already a few standard preset queries that we can use, so I'll explore those first.

The methods I like to use are..
1. The all time best method.
2. The all time best method with 'no clicks'.
3. The best of each day method.


1. The all time best method.
This is the easiest method, you can just use the standard 'halloffame' query...It pulls the best clicked galleries based upon CTR of all thumbs ever used. The down side is that it has no provision to remove galleries that get old, and because it uses clicks to rank the galleries and is placed at the top of your site, it's going to collect more clicks than normal, so galleries run the risk of being locked into the hall of fame and the only way they get knocked out, is if traffic increases.
<table>{{all-thumbs-4-8-query-halloffame}}</table>
The query for this method looks like this.. {{setquery-halloffame-" periodsshown >0 order by (clicks/clickperiods) DESC"}}. I mention this here, because you dont really want anything like this as a hall of fame on a site with a sizable database.
This is a good method however for a site that uses a very small database and plans to just aggressively rotate all the galleries over and over again, some CJ (circle jerk) sites have used this method very successfully. For example one site used this method with a database of just 300 galleries, they then set the site to use about 288 galleries per day (5 minute build cycle), they hand picked all the galleries in the database so it only had very good looking content, and then they let it fly. The galleries jumbled about rapidly but pushed the best clicked ones to the top, and the productivity was very good. The important thing with a high rotation technique like this though, is that you start by working out what the best galleries are first, and then you place them into your database. Also with a high rotation system you daily archives become meaningless and will flat out not work properly. It's a system intended for a very small offering of content.

Another good usage of the all time best method is as the LAST thing people will see on your pages. You place a hall of fame at the bottom of your pages. This zone actually collects a lot of traffic as many people scroll to the bottom and then realize this is the last shot at content and click something. They also might scroll down with the center rollers or page down keys. It's a hot zone. Placing an all time best will get you lots of clicks, but it doesnt get so many clicks that it will mess up your stats.

2. The all time best method with no clicks.
When you place the keyword 'noclicks' into a query definition then any elements that are used with this ruleset will NOT track click information. This can be very handy for a hall of fame because it can let you place records there without letting them get locked into the top of the site, and thus they can be pushed out by newer and better performing records. Note though that the record will still be flagged as being used for a build but not clicked. The side effect of this is that it gets aged while its popularity gets penalized, and this provides a mechanism for allowing new content to get priority over the older stuff, even if the older stuff might have clicked better than the new stuff. This method therefore is very handy as it pushes old stuff off the pages to make way for new stuff regardless. It does have some down sides though, and that is that the click information becomes less accurate, so it becomes less useful when you wish to trim your database or rotate only the best thumbs, if you plan to keep your content forever though, then its a simple and very effective method and has been used to build some HUGE sites.
To activate this method use a layout macro with the 'best_noclicks' query.
{{all-thumbs-4-8-query-best_noclicks}}

This is another good technique for the bottom of your site.

3. The best of each day method.
This is my favorite method, because it allows you to place the best images on your site, while collecting very accurate click information, and also provides a method for aging the records and rotating them off your site. The idea works in combination with a daily cronological system such as a stage1 -> todays best -> yesterdays -> day before -> and then anything beyond this is collated into the hall of fame, using 1 day per row of the hall of fame table.
With this idea we take a single row of the best thumbs for each day and then rotate them down the site.

So for example if we had 4 sections..
1. The Hall of fame.
2. Day 1: todays latest and greatest
3. Day 2: yesterdays best
4. Day 3: The best of the day before

Then we set our hall of fame to use 1 row per day as follows...

1. hall of fame..
Row 1: Best 8 of day 4
Row 2: Best 8 of day 5
Row 3: Best 8 of day 6
Row 4: Best 8 of day 7
Row 5: Best 8 of day 8

We dont have to put titles up or tell the surfers what the magic is behind the creation of this table, so we just put it up like this with 1 plural macro for each row.

[Hall of Fame]
<table>{{all-thumbs-1-8-query-age4}}</table>
<table>{{all-thumbs-1-8-query-age5}}</table>
<table>{{all-thumbs-1-8-query-age6}}</table>
<table>{{all-thumbs-1-8-query-age7}}</table>
<table>{{all-thumbs-1-8-query-age8}}</table>

and then for the rest of the site..
2. Day 1: todays latest and greatest
**note you need some way to cycle new content into your site, so I'm putting 1 row of new thumbs here on the first row of day 1**
<table>{{all-thumbs-1-8-query-new}}</table>
<table>{{all-thumbs-4-8-query-age1}}</table>

3. Day 2: yesterdays best
<table>{{all-thumbs-5-8-query-age2}}</table>

4. Day 3: The best of the day before
<table>{{all-thumbs-5-8-query-age3}}</table>



I want more clicks, how can I improve results?
Prod booster works well at improving clicks no matter what kind of content you have, it will improve your results. But putting crappy content into a system and expecting it to get the best results is asking a bit much, sure you will get better results, but you'll still get crappy results. So the people who do best are cherry picking the content that goes into their database first, and generating the best possible thumbs, usually by hand picking them.

How can I improve sales conversions?
Sales conversions are also affected by the quality of what you offer, so finding out what is the best content and promoting it will pay off. You kind of have to be a surfer and a connoisseur of your products first, but to save yourself a lot of guessing and research money, you can hit the adult review sites, which will tell you who are the best sites and therefore who are the sites that are going to retain their customers and who wont. In other words, they'll tell you which sites are going to generate rebills for you, you can then go and join their affiliate programs and collect their content to promote in your sites.


What happens if Comus cant find galleries?
There are a default set of fall back options, and these can be found on the settings page. A correctly operating site, should never have to use these options, so I never turn them on for my sites, by leaving them off, you will be able to see clearly that your site is broken. If you turn them on, it will keep your site running when things are broken, and it might actually appear that everything is fine, because it will find replacements, but in actual fact these replacements are not the best records that could be used on your site. So replacements keep you alive at the expense of using less popular material in the event of a breakage.

How does the rotation system work?
Once a gallery has been extracted as new, it will become 1 day old and will be available for use throughout your site. Usually we place the galleries into a position where they can get the most exposure and where we can collect statistical information on them, in a staging area at the top of your site. Comus by default will collect click and usage info, and then use this info later to rank the images. The prod booster system performs this initial ranking in a zone we call 'stage1' it uses a layout macro that looks something like this.
{{all-thumbs-1-8-query-stage1}}
This layout macro creates 1 row of 8 thumb elements using the query rule set stage1 which is a system default ruleset to find the newest thumbs and rotate them across the row.

Eventually you either one of several things happen.
1. You use all the records in your database, and activate your SPIN rotation rules which automatically reset your records so that they can be used again in new elements.
2. You might have set your site to delete old galleries or archive them.
3. You might have spin rotation de-activated or set to 100% in which case new content will just stop coming into your site, until you add more content. Your site will freeze. The default is set to rotate at 75% usage so this should never happen.

Now about the 'controlled roll out'... The usual progression for records goes something like this.

pending->approved->new->stage1(optional)->age1->age2->age3->etc--->archived

Pending Stage, records start off first in a pending limbo state, while in this state they cant be listed on a page until you approve them within the gallery review system.
Some element styles wont even display unless they have all thier info ready to go, such as a 'thumb' style wont display if it doesnt have a thumb, and 'link' style wont display unless it has a description, custom styles dont have this error checking in them.

New stage, is where records are extracted and first placed on the page within an element style, usually the rules try to order all the records from least used to most used, and then grab one of the least used records at random.

Stage 1. This is an optional and recommended stage for accumulating statistical information. We recommend placing it near the top of your page, so it gets good exposure. On some configurations your stage 1 area can also double as the new stage, provided that you think it can get enough clicks to get a reasonable assessment of the gallery.

How much is enough clicks for quality assessment?
I believe the optimal exposure for a new record is 1000 eyeballs. On each site the amount of exposure you can generate is going to vary, but knowing this you might decide to tweak your layout a little to deal with your specific traffic situation. For example on a low traffic site doing say around 1000 hits per day you would want to first try to cherry pick the best possible looking images for yourself. And then reduce your database by throwing out the obviously subpar content. Now lets say over 3 days that gives you about 3000 eyeballs to assess your content, and you'll be assessing content over the stage1, day1, day2, day3 before moving to hall of fame. This should be more than enough for assessment. I would say anything more than 300 visitors per day should be good.


Thats a lot of info, What do you recommend?

1. Go with a prodbooster system on an hourly build, place your staging area near the top of your site, use plural macros where possible. Check the tips n tricks section in comus forums for prod booster examples.
2. Try to get the best content you can into the system, and dont leave it to the system to weed out the garbage, instead try to allow the system to find the best of the best and find the best converting stuff you can from the adult review sites, start by checking on the sites that we already have in the sponsor hosted database.

Remember you need some kind of 'new' layout macros in order to begin the rotation process.