Log in

View Full Version : How do you autoresize banner?


funinthesun
10-20-2005, 04:54 PM
How do you auto resize your forum home banner for different browsers?

Thanks :)

funinthesun
12-04-2005, 11:27 AM
Doesn't anyone know? :(

calorie
12-04-2005, 11:40 AM
You could try the is_browser function and set width / height based on that.

// small example
if (is_browser('ie') OR is_browser('mozilla'))
{
$banner_width = 468;
$banner_height = 60;
}
else
{
$banner_width = 234;
$banner_height = 30;
}
$banner_advert = "<img src=\"http://www.domain.com/wherever/advert.gif\" width=\"".$banner_width."\" height=\"".$banner_height."\" border=\"0\">";

funinthesun
12-04-2005, 12:24 PM
Where do I put that code?

calorie
12-04-2005, 11:35 PM
Try a new plugin hooked to global_start and use $banner_advert in the template.

funinthesun
04-20-2006, 10:03 PM
I don't know how to do that, is there an easier way?