Hi everybody,
I'm tempted to just PM Joomlawebber since he's been so nice but I know he's busy so I hope someone could help me.
One of my free templates uses image changer to change the banner header (or header banner...?)
Anyway the original code is
Code:
<?PHP
// Image Changer
// image and site ID`s
$image1 = array(1,2,3,8,9,10,15,18,19);
$image2 = array(4,5,6,7,11,12,13,14,20,21);
$image3 = array(17,22,23,24,25,26,27,28,29,30);
// $image4 = array(17,22,23,24,25,26,27,28,29,30);
// $image5 = array(17,22,23,24,25,26,27,28,29,30);
// $image6 = array(17,22,23,24,25,26,27,28,29,30);
// $image7 = array(17,22,23,24,25,26,27,28,29,30);
// etc.
// looking for images
$header="head.jpg";
if (in_array($Itemid, $image1)) $header="head.jpg";
if (in_array($Itemid, $image2)) $header="head01.jpg";
if (in_array($Itemid, $image3)) $header="head02.jpg";
// if (in_array($Itemid, $image3)) $header="head03.jpg";
// if (in_array($Itemid, $image3)) $header="head04.jpg";
// if (in_array($Itemid, $image3)) $header="head05.jpg";
// if (in_array($Itemid, $image3)) $header="head06.jpg";
// if (in_array($Itemid, $image3)) $header="head07.jpg";
// etc.
?>
I've tried to act smart and change the code (since I wanted more images to rotate) and change it to
Code:
<?PHP
// Image Changer
// image and site ID`s
$image1 = array(1,2,3,25,26,27,49,50,51);
$image2 = array(4,5,6,28,29,30,52,53,54,55);
$image3 = array(7,8,9,31,32,33,56,57,58,59);
$image4 = array(10,11,12,34,35,36,60,61,62,63);
$image5 = array(13,14,15,37,38,39,64,65,66,67);
$image6 = array(16,17,18,40,41,42,68,69,70,71);
$image7 = array(19,20,21,43,44,45,72,73,74,75);
$image8 = array(22,23,24,46,47,48,76,77,78,79);
// etc.
// looking for images
$header="head.jpg";
if (in_array($Itemid, $image1)) $header="head.jpg";
if (in_array($Itemid, $image2)) $header="head01.jpg";
if (in_array($Itemid, $image3)) $header="head02.jpg";
if (in_array($Itemid, $image4)) $header="head03.jpg";
if (in_array($Itemid, $image5)) $header="head04.jpg";
if (in_array($Itemid, $image6)) $header="head05.jpg";
if (in_array($Itemid, $image7)) $header="head06.jpg";
if (in_array($Itemid, $image8)) $header="head07.jpg";
// etc.
?>
But it doesn't work. Only three Images are rotated like the original. I'm guessing the site ID is wrong? I have no clue what site ID is and tried to read about PHP but it confuses me even more because I don't know what I'm looking at.
Please, could someone help me?
Thanks.