|
Changing The Appearance - Method 1
By default, your data stream will take on the fonts, colours and appearance of the links
and text you already use. However, you can easily change the appearance of your data streams
by copying the following code into the <HEAD> section of any page where you display
an affCAFF data stream (or into your site's CSS file for site-wide adoption).
Feel free to change any of the attributes to suit you. Alternatively visit the
pre-defined style library, pick a style you like and
get the code to edit or use straight away.
Example CSS code that could be used to format the above:
<style>
.acItem { font-size: 12px; font-family: arial; color: #232323; width: 250px; text-align: justify; }
a.acLink { color: #000099; text-decoration: none; display: block; }
a.acLink:hover { color: #0000ff; text-decoration: underline; }
.acDesc { font-size: 12px; font-family: arial; }
</style>
In each template installed with affCAFF you will see references to
"class=" in various positions. This relates to CSS <style> references
that can be set and included within any element of any template to reformat the
appearance as you wish. When you create your own templates (see section below), you
can of course include any type of formatting you like: HTML or CSS. For CSS-newbies,
there is a CSS guide here.
Adding Colours and Fonts - Method 2
You can of course create your own templates and include
any font, colour or CSS information you want. But we have also created an
"Advanced Data Generator" which provides you with a number of pre-configured layouts
which you can grab the code for, change if you wish, and simply insert in your pages.
Goto the Advanced Data Generator...»
Adding Colours and Fonts - Method 3
You can define "user" parameters for any data stream which pass in information and
is replaced in the resulting data stream. For example, if you wanted to define the headline
font as "arial", you might pass through the following parameter:
$params[u_headlinefont] = "arial";
Note the "u" in "u_headlinefont" - this marks it as a "user" defined parameter. You can have
as many as you wish and call them what you like, as long as they start with "u". To show
the value in a template, add {u_headlinefont} somewhere in your template.
Here is an example passing through 3 user-defined parameters to configure the display:
<?php
$params[streamID] = "110000003";
$params[maxitems] = "10";
$params[template] = "your_template.inc";
$params[u_desccolor] = "#000099";
$params[u_descfontsize] = "-2";
$params[u_author] = "mysite.com";
displayItems($params);
?>
...and here is how "your_template.inc" might look to read them in...
<div class="acItem">
<a href="{link}" class="{class}" target="{target}">{title}</a>
<font color="{u_desccolor}" size="{u_descfontsize}">{desc}</font>
<br>Copyright {u_author}
</div>
More info on creating templates...»
|