Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Make forum background change according to season

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #149399
    DSBM
    Participant

    Hi everyone!

    I am making a phpBB theme (well, modifying prosilver for my liking) for a forum, and since the forum in question changes its theme background according to which season it is (winter, spring, etc…), I was thinking that maybe I could make it change automatically, instead of the admin changing it manually.

    I’m still not sure if I should choose JavaScript or PHP to do this. I was thinking of also making the background change depending on both date and country (the countries on the southern and northern hemisphere have inverted seasons), and if that is possible/not over complicated, I guessed that JavaScript would be better, since it’s client side… If the idea is not possible, then I guess PHP would be the best.

    I’m still a beginner when it comes to PHP or Javascript (though I guess an if/else formula would be a start), but I know both languages have a similar syntax. Could someone point me in the right direction?

    Thank you!

    #149486
    zero_plus_plus
    Participant

    Check this out: http://pastebin.com/sGQYu13r

    It is a complete function, so it’s perhaps a bit more than just pointing you in the right direction :)

    JavaScript would work, but not at all times (if the client has JS turned off, for example). I like to stick to PHP for such things.

    #159411
    DSBM
    Participant

    God, I don’t know how to thank you! :D
    I forgot that it was also possible to call the user’s own date with PHP, but again, I’m still not that well versed with PHP. I think I’ll manage with this, though.

    Thanks again. :)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.