3
If you want to place your banner in a Custom PHP block, and only display it on your homepage, use the following...
if ($_SERVER['PHP_SELF'] == "/index.php") {
echo ('');
global $xoopsConfig;
if ($xoopsConfig['banners'] == 1) {
//Display Banner
echo (xoops_getbanner());
} else {
return false;
}
echo ('');
}
If you want to hard code the banner code into your theme and only display the banner on your homepage, use the following...
<{php}>if ($_SERVER['PHP_SELF'] == "/index.php") {echo ('<{$xoops_banner}>');}<{/php}>
The above assumes you are using the XOOPS built-in banner manager. If you want to use your own banner code, the important part of the above code is the following...
if ($_SERVER['PHP_SELF'] == "/index.php") {echo ('[b]YOUR CODE HERE[/b]');}
Hope this helps.
James
Insanity can be defined as "doing the same thing over and over and expecting different results."
Stupidity is not a crime. Therefore, you are free to go.