Post by noman on Feb 25, 2007 9:33:59 GMT -5
<script type="text/javascript">
if (pb_skinid == 1)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
</script>
There are already codes that do this, but I thought I'd whip one up for ocgfx.
Basically, this enables different title/cat/menu/newstitle images for different skins/forum colours.
Each skin has a number id. If you view the source code (right click > view source) you can find the skin id number at the top.
The default skin is var pb_skinid = 1; (as in the code above). If a second skin is created the id number will be 2, and so on.
To add different gradients keep repeating the code, between the <script></script> tags, with the corresponding skin id.
For example:
<script type="text/javascript">
if (pb_skinid == 1)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
if (pb_skinid == 2)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
</script>
if (pb_skinid == 1)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
</script>
There are already codes that do this, but I thought I'd whip one up for ocgfx.
Basically, this enables different title/cat/menu/newstitle images for different skins/forum colours.
Each skin has a number id. If you view the source code (right click > view source) you can find the skin id number at the top.
The default skin is var pb_skinid = 1; (as in the code above). If a second skin is created the id number will be 2, and so on.
To add different gradients keep repeating the code, between the <script></script> tags, with the corresponding skin id.
For example:
<script type="text/javascript">
if (pb_skinid == 1)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
if (pb_skinid == 2)
{
document.write("<style type='text/css'>"
+ ".titlebg {background-image: url(IMAGE GOES HERE);}"
+ ".catbg {background-image: url(IMAGE GOES HERE);}"
+ ".menubg {background-image: url(IMAGE GOES HERE);}"
+ ".newstitlebg{background-image: url(IMAGE GOES HERE);}" + "</style>");
}
</script>