MAJOR UPDATE (v1.1): My School Holidays (inc lots of freebies)

Today we are pleased to announce the launch version 1.1 of our popular School Holiday Dates website, My School Holidays.

With over 1 million people every month using My School Holidays it is crucial your school holiday dates are up to date.

Mobile Phone App

We’ve just released a FREE Android school holiday countdown widget for My School Holidays users which can be found on the Android Market here. Or from your phone scan this QR code (or visit the Android Market on your phone and search for My School Holidays).

msh_widget_qr_code

Printable Calendar Cards

Don’t have an Android? But want a way to remember your school holiday dates on the go? How about printing them onto something that fit right in your pocket? Maybe a business card? You can now select your school on My School Holidays and print business card sized calendars with your school’s holidays on. You could even print a few pages, laminate them and give to parents? It’s super easy to do:
Simply find your school on My School Holidays and click the Printable Business Cards link. Print it out double sided and off you go.

Autocomplete on Search

We revamped the search box on the website so our autocomplete search will suggest school names to you as you type in the name of your school. Try it out now at My School Holidays

Going global

We have added more countries dates to My School Holidays. We now currently support: Germany, Canada,
The United Kingdom(includes Wales), Australia, The United States of America and New Zealand with more countries due over the next few months. Also useful if you’re planning to go on holiday in another country and want to find out when the local schools are on holiday.

iCal & GMail support

GMail, Outlook and Thunderbird users can now enjoy a simple iCal import of their school holiday calendar.

To do this visit your school on My School Holidays then click “More options” then select the format you wish your holiday dates.

Edit your own school holiday dates

We want your school to update your school holiday dates but we know how difficult it can be to encourage administrators to do this so we have given this functionality to the hardest working people in the education system, the teachers.

Teachers can now use a really simple interface to insert their own school holiday dates. They can also add casual/training/inset days. To insert your days simply find your school on My School Holidays and Click “Edit the dates”.

Behind the scenes

We have developed a new way of predicting and validating school holiday dates that you will see come to life in Version 1.2. We are currently using this method to quickly collect school holiday dates and publish them live on the website.

We will be using this technique along side other techniques to gather Holiday Data from trusted sources and provide you with the most up to date information on school holidays from around the world.

MAJOR UPDATE (v1.1): My School Holidays (inc lots of freebies)

Today we are pleased to announce the launch version 1.1 of our popular School Holiday Dates website, My School Holidays.

With over 1 million people every month using My School Holidays it is crucial your school holiday dates are up to date.

Mobile Phone App

We’ve just released a FREE Android school holiday countdown widget for My School Holidays users which can be found on the Android Market here. Or from your phone scan this QR code (or visit the Android Market on your phone and search for My School Holidays).

msh_widget_qr_code

Printable Calendar Cards

Don’t have an Android? But want a way to remember your school holiday dates on the go? How about printing them onto something that fit right in your pocket? Maybe a business card? You can now select your school on My School Holidays and print business card sized calendars with your school’s holidays on. You could even print a few pages, laminate them and give to parents? It’s super easy to do:
Simply find your school on My School Holidays and click the Printable Business Cards link. Print it out double sided and off you go.

Autocomplete on Search

We revamped the search box on the website so our autocomplete search will suggest school names to you as you type in the name of your school. Try it out now at My School Holidays

Going global

We have added more countries dates to My School Holidays. We now currently support: Germany, Canada,
The United Kingdom(includes Wales), Australia, The United States of America and New Zealand with more countries due over the next few months. Also useful if you’re planning to go on holiday in another country and want to find out when the local schools are on holiday.

iCal & GMail support

GMail, Outlook and Thunderbird users can now enjoy a simple iCal import of their school holiday calendar.

To do this visit your school on My School Holidays then click “More options” then select the format you wish your holiday dates.

Edit your own school holiday dates

We want your school to update your school holiday dates but we know how difficult it can be to encourage administrators to do this so we have given this functionality to the hardest working people in the education system, the teachers.

Teachers can now use a really simple interface to insert their own school holiday dates. They can also add casual/training/inset days. To insert your days simply find your school on My School Holidays and Click “Edit the dates”.

Behind the scenes

We have developed a new way of predicting and validating school holiday dates that you will see come to life in Version 1.2. We are currently using this method to quickly collect school holiday dates and publish them live on the website.

We will be using this technique along side other techniques to gather Holiday Data from trusted sources and provide you with the most up to date information on school holidays from around the world.

NEW FEATURE: Printable holiday dates onto business cards

Ever wanted to print your school holiday dates onto something that fit right in your wallet? Maybe a business card? Maybe even print a load out, laminate them and sell them to parents? Well now you can and it’s super easy!

Simply find your school on My School Holidays and click the Printable Business Cards link. Print it out and off you go!

Report Post As Inappropriate

Updated School Holidays dates widget

We recently updated the school holiday widget on My School Holidays. To get yours simply visit My School Holidays, find your school and copy/paste the embed code into your blog, learning platform or website.

On top of the visual updates we have put in we are in the process of adding holiday dates for 5 more countries and we have an app in the works!

Add to my calendar script

I needed a simple one click method to create a calendar event that people could put straight into google calendars and outlook, this function supports outlook, google calendars is done w/ a simple google api function/call that should be treated separately.
I need to create these calendar events dynamically when a page is requested, I was looking for a free downloadable javascript or something that would have this bundled in but I couldn’t find anything for free that did what I wanted so here it is..
You have to pass it startdate, enddate & name in the right format, it’s not that complex to figure out..
In this example I’m getting the values from mysql and creating the code from that, a loto f this code is borrowed from http://sgowtham.net/blog/2008/05/26/php-mysql-ical-ics/ – he is mostly to thank.
You will need to modify the 1203 part too to create a unique file name but that should be easy with a little bit of php knowledge. Writing to the file system then reading it back was the only way I knew to do this, feel free to enlighten me of another way.
Here goes:

<?php
$id=$_GET[‘id’];
// MODIFY THIS LINE — I get $id as a param

include ‘mysql_connect.php’;
// MODIFY THIS LINE — include any files you need for mysql to query
?>

<?php
$ics_contents = “BEGIN:VCALENDAR\n”;
$ics_contents .= “VERSION:2.0\n”;
$ics_contents .= “PRODID:PHP\n”;
$ics_contents .= “METHOD:PUBLISH\n”;
$name = “Awesome”;
$ics_contents .= “X-WR-CALNAME:$name Holiday Dates\n”;

# Change the timezone as well daylight settings if need be
$ics_contents .= “X-WR-TIMEZONE:America/New_York\n”;
$ics_contents .= “BEGIN:VTIMEZONE\n”;
$ics_contents .= “TZID:America/New_York\n”;
$ics_contents .= “BEGIN:DAYLIGHT\n”;
$ics_contents .= “TZOFFSETFROM:-0500\n”;
$ics_contents .= “TZOFFSETTO:-0400\n”;
$ics_contents .= “DTSTART:20070311T020000\n”;
$ics_contents .= “RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\n”;
$ics_contents .= “TZNAME:EDT\n”;
$ics_contents .= “END:DAYLIGHT\n”;
$ics_contents .= “BEGIN:STANDARD\n”;
$ics_contents .= “TZOFFSETFROM:-0400\n”;
$ics_contents .= “TZOFFSETTO:-0500\n”;
$ics_contents .= “DTSTART:20071104T020000\n”;
$ics_contents .= “RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\n”;
$ics_contents .= “TZNAME:EST\n”;
$ics_contents .= “END:STANDARD\n”;
$ics_contents .= “END:VTIMEZONE\n”;

$sql=”select * from sh_dates where id = ‘$id'”;
// MODIFY THIS LINE — obvious.

$result=mysql_query($sql);
while ($row=mysql_fetch_array($result))
{
$id=$row[“id”];
// MODIFY THIS LINE —

$term=$row[“term”];
// MODIFY THIS LINE —

$start_date=$row[“startdate”];
// MODIFY THIS LINE —

$end_date=$row[“enddate”];
// MODIFY THIS LINE —

$name = “Event at Awesome”;
// MODIFY THIS LINE —

// $id = $schedule_details[‘ID’];
// $start_date = $schedule_details[‘StartDate’];
// $start_time = $schedule_details[‘StartTime’];
// $end_date = $schedule_details[‘EndDate’];
// $end_time = $schedule_details[‘EndTime’];
// $category = $schedule_details[‘Category’];

// $location = $schedule_details[‘Location’];
// $description = $schedule_details[‘Description’];

# Remove ‘-‘ in $start_date and $end_date
$estart_date = str_replace(“-“, “”, $start_date);
$eend_date = str_replace(“-“, “”, $end_date);

# Remove ‘:’ in $start_time and $end_time
$estart_time = str_replace(“:”, “”, $start_time);
$eend_time = str_replace(“:”, “”, $end_time);

# Replace some HTML tags
$name = str_replace(“<br>”, “\\n”, $name);
$name = str_replace(“&”, “&”, $name);
$name = str_replace(“→”, “–>”, $name);
$name = str_replace(“←”, “<–“, $name);
$name = str_replace(“,”, “\\,”, $name);
$name = str_replace(“;”, “\\;”, $name);

$location = str_replace(“<br>”, “\\n”, $location);
$location = str_replace(“&”, “&”, $location);
$location = str_replace(“→”, “–>”, $location);
$location = str_replace(“←”, “<–“, $location);
$location = str_replace(“,”, “\\,”, $location);
$location = str_replace(“;”, “\\;”, $location);

$description = str_replace(“<br>”, “\\n”, $description);
$description = str_replace(“&”, “&”, $description);
$description = str_replace(“→”, “–>”, $description);
$description = str_replace(“←”, “<–“, $description);
$description = str_replace(“<em>”, “”, $description);
$description = str_replace(“</em>”, “”, $description);

# Change TZID if need be
$ics_contents .= “BEGIN:VEVENT\n”;
$ics_contents .= “DTSTART;TZID=America/New_York” . $estart_date . “T”. $estart_time . “\n”;
$ics_contents .= “DTEND:” . $eend_date . “T”. $eend_time . “\n”;
$ics_contents .= “DTSTAMP:” . date(‘Ymd’) . “T”. date(‘His’) . “Z\n”;
$ics_contents .= “LOCATION:” . $location . “\n”;
$ics_contents .= “DESCRIPTION:” . $description . “\n”;
$ics_contents .= “SUMMARY:” . $name . “\n”;
$ics_contents .= “UID:” . $id . “\n”;
$ics_contents .= “SEQUENCE:0\n”;
$ics_contents .= “END:VEVENT\n”;
}

$ics_contents .= “END:VCALENDAR\n”;

# File to write the contents
$ics_file = ‘/var/www/ics/1203.ics’;
// MODIFY THIS LINE —

if (is_writable($ics_file)) {
if (!$handle = fopen($ics_file, ‘w’)) {
echo “Cannot open file ($ics_file)\n\n”;
exit;
}

# Write $ics_contents to opened file
if (fwrite($handle, $ics_contents) === FALSE) {
echo “Cannot write to file ($ics_file)\n\n”;
exit;
}

# echo “Success, wrote to <b>1203.ics</b><br>\n\n”;
// MODIFY THIS LINE —

fclose($handle);

} else {
echo “The file <b>$ics_file</b> is not writable\n\n”;
}
?>

<?php
//header( ‘Location: http://mywebsite.com/ics/1203.ics’ ) ;
// MODIFY THIS LINE —

echo $ics_contents;
?>

By clicking this php page a user will be presented with a downloable/clickable .ics file which can be imoprted into an outlook calendar.