WoodiE
10-24-2007, 02:55 PM
I have the following PHP code:
<?php
$image[0]['src'] = '/images/your-ad-here.gif';
$image[0]['link'] = 'http://www.domain.com';
$image[0]['title'] = 'Your Ad Here';
$image[0]['alt'] = 'Your Ad Here';
$image[1]['src'] = '/images/advertisement2.gif';
$image[1]['link'] = 'http://www.domain2.com';
$image[1]['title'] = 'Company';
$image[1]['alt'] = 'Company';
shuffle( $image );
$html = '';
foreach( $image as $arr )
{
$html .= '<a href="' . $arr['link'] . '" title="' . $arr['title'] . '" rel="nofollow"><img src="' . $arr['src'] . '" alt="' . $arr['alt'] . '"></a>';
}
echo $html;
?>
The code works exactly how I want it to in a PHP page or a wordpress page, however I can't get this to work in vBulletin or in a vbulletin side menu.
How would I go about doing this?
<?php
$image[0]['src'] = '/images/your-ad-here.gif';
$image[0]['link'] = 'http://www.domain.com';
$image[0]['title'] = 'Your Ad Here';
$image[0]['alt'] = 'Your Ad Here';
$image[1]['src'] = '/images/advertisement2.gif';
$image[1]['link'] = 'http://www.domain2.com';
$image[1]['title'] = 'Company';
$image[1]['alt'] = 'Company';
shuffle( $image );
$html = '';
foreach( $image as $arr )
{
$html .= '<a href="' . $arr['link'] . '" title="' . $arr['title'] . '" rel="nofollow"><img src="' . $arr['src'] . '" alt="' . $arr['alt'] . '"></a>';
}
echo $html;
?>
The code works exactly how I want it to in a PHP page or a wordpress page, however I can't get this to work in vBulletin or in a vbulletin side menu.
How would I go about doing this?