Play at! Click here for a free diamond. Also visit our Discord!
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pigcraft screenshots header
I like the screenshots on the pigcraft forum header, and I would like to use the code for my forum. Using a different background.

I modified some of the code from the forum source, and put it in the headerinclude template on my forum. I changed the background url, and removed the slideshow.

Here is the code:
<script type="text/javascript">
   $(document).ready(function() {
var backgrounds = new Array(

       function nextBackground() {
           current = current % backgrounds.length;
           $('#header').css('background-image', backgrounds[current]);
       setInterval(nextBackground, 6000);
       $('#header').css('background-image', backgrounds[0]);

The code is not working, it comes up with the default square theme background.
I do like the forum heading too, but I thinkwe should add way more screenies. I'd be able to take interesting ones.

Are you simply pointing out you wanna use it too or you're wondering how to fix this? If so it's very unclear since you're not asking for help.
Medieval [Image:]
Keep your head up.
TB was here
i want to use a header background on my forum, similar to pigcraft
This was best sent as a PM to a staffmember, due to it being for your own personal forum.
which is why I shall archive this thread in the next day or so.

Its not working due to your initialization of the backgrounds array, and/or likely the css layout of your forum which I do not have the ability to help you with. The element/object accesssible via #header is likely not the same.

The forum also uses 3rd party libraries I believe, hence the $ functions. I do not recall which library it is, but I assume AJAX.
Since you don't want the slideshow, you really just need to replace the default square theme header image with whatever image you want so this is extremely roundabout way of doing that.

Forum Jump:

Browsing: 1 Guest(s)