0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

[free] Auto Themed backgrounds for season holidays

    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • Decided to be nice... and give some images/code ive used for seasonal holiday backgrounds.
      The code will set the neccessary background for the entire month of the holiday (i.e halloween bg for all of october)

      This image is hidden for guests.
      Please log in or register to see it.


      This image is hidden for guests.
      Please log in or register to see it.


      This image is hidden for guests.
      Please log in or register to see it.


      I used this on the SolarSentinal template

      the default in template.css is
       
      body.bg-grey #page-bg {background: #ccc url(../images/background/grey/page-bg.png) 0 0 repeat-x;}

      I added a custom php module (see www.fijiwebdesign.com/portfolio/joomla-php-module-mod_php.html )

      Create a new php module and add
      <?php
      $d=date("m");
      if ($d=="10") {
      ?>
      <style>
      body.bg-grey #page-bg {background: #000 url(./images/halloween.png) 0 0 repeat-x;}
      </style>
      <?php
      } else if ($d=="12") {
      ?>
      <style>
      body.bg-grey #page-bg {background: #fff url(./images/xmas.png) 0 0 repeat-x;}
      </style>
      <?php
      } else if ($d=="04") {
      ?>
      <style>
      body.bg-grey #page-bg {background: #a2cb4e url(./images/easter.png) 0 0 repeat-x;}
      </style>
      <?php
      }
      ?>

      Obviously edit the <style> to match the bg css on your template.

      I have attached the images needed, pop them into your root>images folder.

      Not world beating graphics or coding but its simple and works :)
      YOOholidays extension didnt work for me as i think the template has too much javascript in it already and it conflicted, also i HATE annoying flying javascript graphics lol

      Hope you enjoy, if you improve it in any way let me know!!
    • Kiss my RSS
    • Robert D. Wagers's Avatar
    • Robert D. Wagers
    • Elite Rocketeer
    • Posts: 1545
    • Thanks: 0
    • Full-Time Cancer Fighter!

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • Very Cool!
    • "Everyone has to get knocked-down every once-in-a-while, otherwise you'll never learn how to get-back-up! "
      A quote attributed to my Grandpa Wagers
    • Robert D. Wagers's Avatar
    • Robert D. Wagers
    • Elite Rocketeer
    • Posts: 1545
    • Thanks: 0
    • Full-Time Cancer Fighter!

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • I set the Halloweeen BG as my puters desktop. It's very stretched-out but love the festive feel it gives!
      Thanks!
      Wage
    • "Everyone has to get knocked-down every once-in-a-while, otherwise you'll never learn how to get-back-up! "
      A quote attributed to my Grandpa Wagers
    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • glad you like them, they bring a little fun to what is (for me) a boring work website lol.
    • Kiss my RSS
    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • Robert D. Wagers's Avatar
    • Robert D. Wagers
    • Elite Rocketeer
    • Posts: 1545
    • Thanks: 0
    • Full-Time Cancer Fighter!

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 14 years 7 months ago
    • Awesome!
      Thanks
    • "Everyone has to get knocked-down every once-in-a-while, otherwise you'll never learn how to get-back-up! "
      A quote attributed to my Grandpa Wagers
  • Re: [free] Auto Themed backgrounds for season holidays

    Posted 13 years 2 months ago
    • Looks great well done

      could you explain how you set the module, I've installed it but cant it ?
      also how did you add the style to the template please.

      karl
  • Re: [free] Auto Themed backgrounds for season holidays

    Posted 13 years 2 months ago
    • I like it.

      I found an old 1.5 template that changed the background based on time of day. I'd love to get one like that now!
    • Thank you,
      Jason

      Server #1: 4-Cores @ 2.3Ghz | 8GB RAM | Plesk Control Panel v11.0.9 | Apache/2.2.3-65.el5 | mySQL: 5.5.23 | PHP: 5.3.10
      Server #2: 8-Cores @ 2.5Ghz | 16GB RAM | Plesk Control Panel v11.0.9 | Apache/2.2.15-15.el6 | mySQL: 5.5.25 | PHP: 5.4.4
    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 13 years 2 months ago
    • You can do the same thing as above for times of the day.

      In fact you could be really clever and use opacity of generate a colour using time and math or something.

      You can get the server or local time using php and then you just setting a CSS rule.
      As your using PHP you could set a dynamic css rule that changes as the time does.

      rough non tested example:
      <?php
      // get current hour of day in 24H format (example 23)
      $hour = date("G");
      // see if its between 4am and 10pm 
      if ($hour >=4 && $hour <=10){
      ?>
      <style>
      body.bg-grey #page-bg {background: #0090ff;}
      </style>
      <?php 
      } else {
       ?>
      <style>
      body.bg-grey #page-bg {background: #00233e;}
      </style>
      <?php } ?>
    • Kiss my RSS
    • Lady R's Avatar
    • Lady R
    • Jr. Rocketeer
    • Posts: 26
    • Thanks: 0

    Re: [free] Auto Themed backgrounds for season holidays

    Posted 13 years 1 month ago
    • Yes nice but why you do all this caos for this?

      You can just set as background image the php file ( background: url(/background.php) )

      then in the php file write:
      <?php
      $d = date("m");
       
      switch($d) {
          case 10: $url = "./images/halloween.jpg"; break;
          case 12: $url = "./images/xmas.jpg"; break;
          case 04: $url = "./images/easter.jpg"; break;
          default: $url = "./images/default.jpg"; 
      }
       
      Header('Content-Type: image/jpeg'); 
      readfile($url); 
       
      ?>

      and all is done :oops:

Time to create page: 0.066 seconds