Gotta love output buffering..
If you've managed to do it in JavaScript (I don't think I can handle that) I'm sure you'll be able to understand this quite easily.
1- In the template that you're using, find the section that is delimited by and add this additional delimiter just before the second one.
2- In that same template, replace the color from the table by this marker 3- Where you'd normally have the code for the list to be shown (just after $LIST=1; ) surround the require with the output buffering code, like so:
PHP Code:
ob_start();
require("calendar.php");
$my_list = ob_get_clean();
4- Right after this, paste the juicy bits
PHP Code:
$color1="#FFFDF2";
$color2="#FFFFFF";
$epc_split = explode("=-+-=",$my_list);
for ($x=0; $x < count($epc_split); $x++) {
if($x % 2) {
$epc_split[$x] = str_replace("%color%", $color2, $epc_split[$x]);
} else {
$epc_split[$x] = str_replace("%color%", $color1, $epc_split[$x]);
}
}
$my_list = implode("", $epc_split);
echo $my_list;
Oh... don't forget to change $color1 and $color2 to your choice of color
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
|