What's New
Off Topix: Embrace the Unexpected in Every Discussion

Off Topix is a well established general discussion forum that originally opened to the public way back in 2009! We provide a laid back atmosphere and our members are down to earth. We have a ton of content and fresh stuff is constantly being added. We cover all sorts of topics, so there's bound to be something inside to pique your interest. We welcome anyone and everyone to register & become a member of our awesome community.

MYBB - Background header in each forum

Mastersly

Off Topix Regular
Member
Joined
May 31, 2020
Posts
51
OT Bucks
0
Hello everyone.
In this tutorial I will show you how to add an image in each forum
Like this


KhEQIx3.png
CUGBimz.png


[hide]
STEP 1:GO ACP>>Templates and style>> Themes>>YOUR THEME >> global.css and add this
.forumnameonavatarcs {
text-align: center;
color: #fff;
font-size: 30px;
height: 115px;
margin-top: -151px;
}


STEP 2:GO ACP >> Templates and style>>Templates>>YOUR THEME>>Forum Display Templates>>forumdisplay
Bellow {$header} add this and save
<style>.forumsimagesbg1{opacity: 0.3;height: 230px;background: url("images/forums/{$foruminfo['fid']}.jpg") center center no-repeat #292929;background-size: cover !important;background-repeat: no-repeat;overflow: hidden;}</style>



<table width="100%" height="200" cellspacing="0" cellpadding="25" border="0" class='forumsimagesbg1' ></table>
<div class="forumnameonavatarcs">
{$foruminfo['name']}
</div>

Login in on your ftp and go at images/forums/
If you havent folder "forum" in images just create one and upload banners to that folder

the image files should be named
1.jpg
2.jpg
3.jpg

were 1, 2 and 3 are the forum's id or number.

if images doesn't appear correctly just play with css[/hide]
 
This is awesome! Thanks for sharing :)
 
Back
Top Bottom