sIFR2 - Custom fonts for your website using php class

sIFR by default using JavaScript for customizing, but we have to write a long line for just customizing one element/tag (i.e <H1>).

As you can see in above image there are a couple line with very long line to write. We can make it shot using php because the other sIFR option nearly the same for each line (look at the sWmode, sLlinkColor and other option). So i write a php code for make a simple sIFR code placement.

Basically this php code just to write javascript codes in the pages where sIFR will be place.

Write this script and save it with sIFR.php (or whatever name you like). Next you must include this page in every php page where you want the sIFR font show up. But first the pages must included the sIFR javascript and css between the <head> and </head> tag (Code : Look at below image).


If you want to use the php class, simply write php code like this example.
<?php
$sIFR->element[] = ".gm| FiftiesHeavy.swf | #dedede";
$sIFR->element[] = ".judul1| Fancy Footwork.swf";
$sIFR->element[] = ".judul2| Papyrus.swf";
$sIFR->element[] = ".judul3| Bradley Hand ITC.swf | #ff3eee";
$sIFR->element[] = ".judul4| Fancy.swf";
$sIFR->element[] = ".leftquote| vandenkeere.swf";
$sIFR->element[] = ".rightquote| vandenkeere.swf";

$sIFR->newfont(); //Always End with this code
?>

There are 3 option split by "|".
The first option are refer to element that will be replace with sIFR font (tag name, id or class name).
The second option refer to name of Fonts we will use.
The third option refer to font color, if font are not set the default color will be used (default color can be configure in sIFR.php)

Put this code the above closed body tag (</body>) and you're done.