Play at mc.pigcraft.net! 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
#1
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:
Code:
<script type="text/javascript">
   $(document).ready(function() {
var backgrounds = new Array(
   'url(images/background.jpg)');

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

The code is not working, it comes up with the default square theme background.
 
Reply
#2
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.
_________________________________________________________________
Spoiler:
Medieval [Image: http://www.nodiatis.com/pub/21.jpg]
[Image: http://i.imgur.com/ZU9FjNz.png]
[Image: http://24.media.tumblr.com/tumblr_m5b3ntvcG21r8w6t4o1_500.jpg]
[Image: http://i.imgur.com/XsadW.gif]
[Image: http://24.media.tumblr.com/c0b5da7f61297a3acde1285ca41893e2/tumblr_mlaxl0NipR1rmkadgo1_400.gif]
Keep your head up.
TB was here
- GET OUT MY SIGNATURE!
 
Reply
#3
i want to use a header background on my forum, similar to pigcraft
 
Reply
#4
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.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)