MyBB Community Forums

Full Version: Background Per Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello Guys I Have Created A Gaming Forum And I Want To Have A Sub Forum In One Of My Forums For A Clan I Have Got But I would Like The Background To Be Different And Insted Of Them Using A Different Theme I Wanted To Know If There Is A Varible I Can Use Like If FID=x then etc

Many Thanks
if you wanna change your forum back ground read this,on how to change the back ground

Go to:

acp>themes and templates>yourtheme>global.css>open in advanced mode

then find:


background: #xxxxxx;

replace the #xxxxxx with this code


url(images/your picture path);

replace your picture path with the image location.

thats it you are done.

if you want to add color along with back ground for a png image,fixed at botton then use this:

background:#xxxxxxxx url(images/yyyyyyyy) repeat-x fixed;

background-position: bottom left;

replace xxxxx with color and yyyyy with image path respectively

demo: click me but dont register

hope this help you

no variable option, at least not without a plugin.
Depending on how and where you wish to utilize the background, you could add a custom class to the container of which you want to customize. (such as fid_bg so that its dynamic)
Then simply add your custom css
<if condition="in_array($forum['forumid'], array(260,276,318,321))">
background="clone-style/forums/$forum[forumid].gif"
<else />background="clone-style/forums/index.gif"</if></if>
This works tho ??? But its only 2 backgrounds. one for index page and one for the rest of the forum.


<if condition="THIS_SCRIPT == 'index'">background="clone-style/forums/index.gif"<else />background="clone-style/forums/other.gif"</if>

Thats In Vb Is There Any Way I Can Do That With Our Without A Mod And If It Was A Mod Could SOme One Code It Cheap Or Tell Me How To Code It
MyBB doesn't allow the use of conditional statements as standard. You could try the template conditionals mod by zinga burga (sp?) though.
would u have a link to that mod for me
(2011-03-04, 02:34 PM)Smally1997 Wrote: [ -> ]would u have a link to that mod for me

http://mybbhacks.zingaburga.com/showthread.php?tid=260
I was thinking more along the lines of adding a body class to the forumdisplay like:
<body class="forum_body_{$foruminfo['fid']}">
The adding background images to my css according to my IDs like:
.forum_body_5{
  background: whatever.img
}
I havent tested this theory.

Thats why I asked for intentions to be more specific on layout options.
would i need a mod
(2011-03-05, 03:13 AM)Dudditz Wrote: [ -> ]I was thinking more along the lines of adding a body class to the forumdisplay like:
<body class="forum_body_{$foruminfo['fid']}">
The adding background images to my css according to my IDs like:
.forum_body_5{
  background: whatever.img
}
I havent tested this theory.

Thats why I asked for intentions to be more specific on layout options.

I Love You Dude

Pages: 1 2