Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A big software update is on its way!

Status
Not open for further replies.
They are now gone. What happened?

John

I've always thought those were pretty cool, maybe he didn't intend on it continuing. Maybe it's to much on the religious side of things?
 
Christmas was cancelled :D

It was a coding error that triggered the xmas decorations for only one day! All sorted now :D

Spot the mistake:

PHP:
       $time = XenForo_Application::$time;
     
        // CHRISTMAS (1ST DEC - 7TH JAN)
        $christmasStart = mktime(0, 0, 0, 12, 1, date('Y'));
        $christmasEnd = mktime(23, 59, 59, 12, 1, date('Y'));
        $christmas1Start = mktime(0, 0, 0, 1, 1, date('Y'));
        $christmas1End = mktime(23, 59, 59, 1, 7, date('Y'));
     
        if ($christmasStart <= $time && $christmasEnd >= $time) {
            return "showChristmasHeader";
        } else if ($christmas1Start <= $time && $christmas1End >= $time) {
            return "showChristmasHeader";
        }
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top