Site Swap System [SSS] (Freeware)

1-4a.com Freeware    SSS    Advanced configuration

if you haven't done so, please read the SSS introduction first)

No, you don't need to read this page.

Only read further if you are an advanced webmaster (with some knowledge of HTML programming)
AND want to adjust the default SSS layout.

The template system

If you are an advanced webmaster, you can adjust any of the .tpl files in the /template/ folder

overall_head.tpl
Whatever html code is in this file it will be used for EVERY page generated by the SSS script. You usually have the <html><head><body> tags here and code for your logo.

overall_foot.tpl
Whatever html code is here it will be used for EVERY page. You usually put </body></html> tags there

category_head.tpl
This template is used just before the category output.

category_foot.tpl
This template is used just after the category output.

cycle_head.tpl
This template is used just before the link list output.

cycle_foot.tpl
This template is used just after the link list output.

  

The template variables within cycle_body.tpl

These variables are only valid within the cycle_body.tpl.
The value of these variables changes with each referer.

{count} or {hitsin}
Displays the number of visitors since the last reset, e.g. 12

{totalcount} or {totalhitsin}
Displays the number of visitors since the counting began, e.g. 1285

{url}
Displays the URL (= starts with http://) of the referer.
If the referer is yahoo.com then {url} will be http://www.yahoo.com

The {url} recognizes subdomains, and does not prepend a www. if the referer is a subdomain:
yahoo.co.uk -> http://www.yahoo.co.uk
webmasters.yahoo.com -> http://webmasters.yahoo.com
webmasters.yahoo.co.uk-> http://webmasters.yahoo.co.uk

{domain}
Displays the domain name without http:// and without www., e.g. yahoo.co.uk

Usually you use both variables in the <a> tag:
<a href="{url}">{domain}</a>

{category}
Displays the category, e.g. Misc
{breakevery:XX::<htmlcode>}
{breakat:XX::<htmlcode>}
{breakdisplay:XX::<htmlcode>}

Inserts <htmlcode> if the condition applies

{breakevery:5::<br />} would insert a <br /> every 5 listed referers.
{breakevery:10::<br />} would insert a <br /> every 10 listed referers.

Usually this is used to insert your own banner or some text (e.g. "Click here to list your site") every 10 listed referers.

{breakat is the same as {breakdisplay, except that {breakat expects the absolute referer number, while {breakdisplay is the referer number of the current page. In other words: {breakat:1::} applies only 1 time (= after the first referer on the first page) while {breakdisplay:1::} applies to every first referer on every page.

If 0 is used like in {breakat:0::} it applies to the LAST referer. 
If 0 is used like in {breakdisplay:0::} it applies to the LAST referer on every page.

If a ! is used then <htmlcode> is inserted when the condition does NOT apply.
{breakat:!0::<br />} would display a <br /> after EVERY referer EXCEPT the last.

If 2 conditions apply then only the last one is used:

{breakevery:2::<br />}
{breakevery:4::<br /><br />}
{breakevery:8::<br /><br /><br />}
{breakat:0::end of file}

will cause the following output if you had 12 referers:
referer1
referer2
<br />
referer3
referer4
<br /><br />
referer5
referer6
<br />
referer7
referer8
<br /><br /><br />
referer9
referer10
<br />
referer11
referer12
end of file

As you see from the above example that if two conditions overlap ("every 10" is also "every 5") then only the last applying condition is kept. If you want to keep the condition (even if another one applies) then use "condition grouping" as shown here:
{breakevery:2:1:<br />}
{breakevery:4:2:<br /><br />}
{breakevery:8:2:<br /><br /><br /><br />}
will cause the following output if you had 9 referers:
referer1
referer2
<br />
referer3
referer4
<br /><br /><br />
referer5
referer6
<br />
referer7
referer8
<br /><br /><br /><br /><br />
referer9

The second number (after the second :) is used to put the condition into its own group. So now you actually have 2 groups of independent conditions.

Please note that :2: is not the same as :02: However you can use spaces thus :2: is the same as :    2:

{br}
Displays a <br /> except if it's the last displayed item. A shortcut for {isnotlastofblock:<br />} which itself is a shortcut for
{breakdisplay:!0::<br />}
{hasbanner:<htmlcode>}
{bannerimgsrc}
{bannerurl}

{bannerurl} displays the banner url starting with http:// and ending with .jpg or .gif
Ususally used as <img src="{bannerurl}">

{hasbanner:<htmlcode>} inserts <htmlcode> if a banner exists.

{bannerimgsrc} inserts a the banner url starting with <img src=" and ending with ">

The template variables within any .tpl

These variables are only valid within any .tpl

{pagination}
{pagination2}
{paginationcategoryindex}
{paginationhome}

{pagination} inserts the page numbering "Previous 1 2 3 5 Next"

{pagination2} inserts the pure page numbering "1 2 3 5"

{paginationcategoryindex} inserts the link "Category Index"

{paginationhome} inserts the link "Main"

Every <a> tag from these pagination links will have a class="ssspaginationlink" inserted so you can define your own css styles.

{generationseconds}

Displays the seconds (e.g. 0.13) that were needed to generate the output.

Variables in sss_config.php

These variables control the overall behaviour of the SSS script

The explanation for these variables is written in the sss_config.php file.