MyBB Community Forums

Full Version: Placing banners
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'd like to place banners at the top of specific forums, as part of a banner exchange. I've looked at the banner mod currently doing the rounds, but this does not offer what I'm after.

Basically, If I have a banner exchange with an internet security site, i would like to place his banner in the relevant forum on my site, so everytime someone enters that forum they see it. I don't want it to randomise, and I don't want it to show anywhere else.

What template bit do I need to edit to achieve this?

TIA

Kev
Hello

Open forumdisplay.php

Find

eval("\$forums = \"".$templates->get("forumdisplay")."\";");
Above it add
if($fid == X)
{
	$forum_banner = '<a href="link_here"><img src="banner_img_link" border="0" /></a>';
}

X should be replaced with the FID of specific forum this banner should appear in.
For now this is for 1 forum.. you may add more but manually through the use of elseif.

Now in Admin CP > Templates > Modify  / Delete > Expand > forum bit templates > forumdisplay
Find
{$header}
Below it add
<div align="center">{$forum_banner}</div>
thanks for the reply, that helps alot Smile

could you explain this bit to me please?

Quote:you may add more but manually through the use elseif.
for example

if($fid == 2)
{
	$forum_banner = '<a href="link_here"><img src="banner_img_link" border="0" /></a>';
}
elseif($fid == 3)
{
	$forum_banner = '<a href="link2_here"><img src="banner2_img_link" border="0" /></a>';
}
Ahh..I understand you..thanks Smile
How do I get the top menu items (search) to rest on the top of my logo instead of beneath with a black space dividing the two?

http://www.tristanrogers.com/forums/

Any solutions?

thanks!