1) Create a PHP file called "sponsors.php" with the following code and upload it to domain.com/forums. You can add as many links/images to the array as you want, just keep the same format:
Code:
<?php
define('LINK_URL', 0);
define('IMAGE_URL', 1);
$images = array(
array(LINK_URL => 'http://www.example.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small.jpg'),
array(LINK_URL => 'http://www.example2.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small2.jpg'),
array(LINK_URL => 'http://www.example3.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small3.jpg'),
);
shuffle($images);
foreach($images as $image) {
echo '<a href="' . $image[LINK_URL] . '"><img src="' . $image[IMAGE_URL] . '" border="0" /></a><p>';
}
?>
Admin CP >
Plugins and Products >
Add New Plugin
2) Create a new plugin with this info:
- Product: vBulletin
- Hook Location: global_start
- Title: Small Sponsor Images
- Plugin PHP Code (edit the include path to yours and note this will not show the images on register.php):
Code:
if (THIS_SCRIPT != 'register') {
ob_start();
include('/home/username/domain.com/forums/sponsors.php');
$includedphp = ob_get_contents();
ob_end_clean();
}
- Plugin is active: Yes
3) Edit your "footer" template and add "$includedphp" where you want the list of images to show up.