"Excel Today, Lead Tomorrow"
7412 W Slaughter Lane · Austin, Texas 78749 · (512) 841-8600
- How do you pronounce Gorzycki?
- Counselors' Corner
- AISD Lunch Menu
- Gradespeed - Parent Connection
- School Calendar
- AISD Calendar PDF
- Volunteer Information
- 2010-2011 Immunization Requirements
- 2012 Summer Reading List
- 2012-2013 Supply List
|
Join our Google Group Email: |
Front Office Hours:
Monday-Friday
7:45 am to 4:00 pm
NEWS
while(substr($strlist, $count, strlen('')) != '')
$count++;
$count += strlen('');
}
$output .= substr($strlist, $count, 1);
$count++;
}
return $output;
}
function CleanRSSTitle($strTitle)
{
// Clean invalid text from the RSS Titles
$output = $strTitle;
// Sometimes the 's come through as ?S
$output = str_replace("?S", "'S", $output);
$output = str_replace("GorzyckiWebsiteNews ", "", $output);
return $output;
}
function CleanRSSText($output)
{
// This function removes all the text we don't want from the RSS feed
// It needs some work to clean it up
// Remove the Divs
$count = 0;
$strlist = $output;
$output = "";
while($count < strlen($strlist))
{
if(substr($strlist, $count, strlen('
while(substr($strlist, $count, strlen('">')) != '">')
$count++;
$count += strlen('">');
}
$output .= substr($strlist, $count, 1);
$count++;
}
// Trim the unecessary stuff from the ends
$output = Trim($output);
$output = LTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); // Get rid of the extra line breaks and paragraph markers $output = ereg_replace('
"); $output = RTrim($output, "
"); $output = RTrim($output, ""); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); $output = RTrim($output, "
"); // Get rid of the extra line breaks and paragraph markers $output = ereg_replace('
', '
', $output);
$output = ereg_replace('
', ' ', $output);
$output = ereg_replace('
', '', $output);
$output = ereg_replace('
', '', $output);
$output = ereg_replace('', '', $output); // Sometimes when Jon posts a news, is added to the text.
// Strip it out $count = 0; $strlist = $output; $output = ""; while($count < strlen($strlist)) { if(substr($strlist, $count, strlen('a rel="nofollow" name="msg_')) == 'a rel="nofollow" name="msg_') { //do until found "> while(substr($strlist, $count, strlen('">')) != '">') $count++; $count += strlen('">'); } $output .= substr($strlist, $count, 1); $count++; } // Some error in the above code is leaving < - fix it $output = ereg_replace(' <', '', $output); // Add images if necessary $output = ereg_replace('See our website at gmstigers.org for two great pictures of our students in
action. ', '

', $output);
// Fix special chars
$output = ereg_replace("’", "\'", $output);
$output = ereg_replace("q=www", "q=http://www", $output);
// Chop the Google footer
if (strpos($output,"Subscription settings:")) {$output = substr($output,0,(strpos($output,"Subscription settings:")-13));}
// Every article should end with a after all the above trimming. If it doesn't, add it. $last = substr($output, strlen($output)-4); if (strcmp($last,"
") != 0) { // Last characters are not
, add an additional
$output = $output . "
"; } return $output; } function SureRemoveDir($dir, $DeleteMe) { // Remove the directory contents or the directory itself // SureRemoveDir('EmptyMe', false); // SureRemoveDir('RemoveMe', true); if(!$dh = @opendir($dir)) return; while (($obj = readdir($dh))) { if($obj=='.' || $obj=='..') continue; if (!@unlink($dir.'/'.$obj)) SureRemoveDir($dir.'/'.$obj, true); } if ($DeleteMe){ closedir($dh); @rmdir($dir); } } // Include the RSS library and set it's global vars include('/data/www/html/campus/gorzycki/magpierss/rss_fetch.inc'); define('MAGPIE_CACHE_DIR', '/data/www/html/campus/gorzycki/magpierss/cache'); define('MAGPIE_CACHE_ON', 1); // Set to 0 to turn off caching. By default the cache is 1 hour // Set error reporting for this error_reporting(E_ERROR); // Fetch RSS feed. // The Google Group's sole purpose is to generate this feed to include in the website // We did this(instead of either having the pages manually edited or using a 3rd party PHP news library) because they wanted the most // simple way possible to post news. Google Groups allow you to simply email an announcement. // This feed only supplies the last 5, so it's not a good option //$rss = fetch_rss('http://www.fulltextrss.com/makefulltextfeed.php?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fgorzyckiannouncements%2Ffeed%2Frss_v2_0_msgs.xml&format=rss&submit=Create+Feed'); // This feed sends all, but some of the articles error out and aren't included //$rss = fetch_rss('http://www.getfullrss.com/makefulltextfeed.php?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fgorzyckiannouncements%2Ffeed%2Frss_v2_0_msgs.xml&submit=Create+Feed&format=rss'); // so we went with a Yahoo pipe Jon Howard created //$rssfeed = "http://pipes.yahoo.com/pipes/pipe.run?ContextBegin=%3Cdiv+id%3D%22inbdy%22%3E&ContextEnd=%3C%2Fdiv%3E&RssUrl=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fgorzyckiannouncements%2Ffeed%2Fatom_v1_0_msgs.xml&_id=987cebbdd019b378b0d1cae9a2847f7f&_render=rss"; $rssfeed = "http://pipes.yahoo.com/pipes/pipe.run?ContextBegin=%3Cdiv+id%3D%22inbdy%22%3E&ContextEnd=%3C%2Fdiv%3E&_id=a1be9a6519e140c0e41ce63978c811e1&_render=rss&groupname=GorzyckiAnnouncements&numposts=15"; $rss = fetch_rss($rssfeed); // This code will give you the complete contents of the RSS feed. It's used for debugging //echo '
'; //echo '
'; //print_r($rss); //echo ''; //echo '
'; if ($rss) { // Split the array to show first 15 $items = array_slice($rss->items, 0, 15); $currentdate = time(); // If we didn't get any items back from the array, there is a problem, clear the cache if (count($items) == 0) { // echo 'Cache clearing'; // Nothing came back from the RSS feed. It's possible the cache has become corrupted. Delete the contents and try again. define('MAGPIE_CACHE_ON', 0); // Set to 0 to turn off caching. By default the cache is 1 hour SureRemoveDir('/data/www/html/campus/gorzycki/magpierss/cache', false); define('MAGPIE_CACHE_ON', 1); // Set to 0 to turn off caching. By default the cache is 1 hour // Try again $rss = fetch_rss($rssfeed); $items = array_slice($rss->items, 0, 15); } // Cycle through each item, format then echo the text foreach ($items as $item) { if (strpos($item['description'],"readability was unable to parse this page for content")) {continue;} // As of Aug 8, 2011, the Yahoo Pipe code stopped sending the pubdate in the RSS feed. I've reported it, but until // they get it fixed, I've set the author to the pubdate since that is still sent. // $pubdatetime = strtotime($item['pubdate']); $pubdatetime = strtotime($item['author']); $item_date = date('F j, g:i a', $pubdatetime) ; $item_date = ereg_replace('August 14, 8:11 am', 'August 13, 8:11 am', $item_date); $item_title = CleanRSSTitle($item['title']); $item_content = CleanRSSText(RemoveRSSLinks($item['description'])); // Add a new tag if the article is < 13 days old if((($currentdate-$pubdatetime)/86400)<7) { $newtag = "
'; echo ''.$newtag.$item_title.'
'; echo '
'; echo 'Posted: '.$item_date.'
'; echo '
'; echo ''; echo ''.$item_content.'
'; } } else { echo '
Error:
'.magpie_error().'
'; } // Restore original error reporting value @ini_restore('error_reporting'); // END NEWS FEED CODE //////////////////////////////////////////////////////////////////// ?> News ArchiveUPCOMING EVENTS
Click an event for more detailsor view the Complete Calendar
'; //echo '
'; //print_r($rss); //echo ''; //echo '
'; $prevdate = ""; $eventid = 0; foreach($rss->items as $item) { // Loop through the RSS feed, format the items, then display them // Populate additional fields $startdate = substr($item['summary'], strpos($item['summary'], 'When:')+5, strpos($item['summary'], ', ',0)+1); $item['eventdate'] = strtotime($startdate); $item['eventdatestr'] = substr($item['summary'], strpos($item['summary'], 'When:')+5, strpos($item['summary'], ', ',0)+1); // If we are beyond 31 days, exit if((($item['eventdate']-$currentdate)/86400)>31) { continue; } $eventid = $eventid + 1; // Set some temp variables $href = $item['link']; $title = $item['title']; // Clean the event content $content = $item['atom_content']; $content = ereg_replace('
Event Status: confirmed', '', $content); $content = ereg_replace('liz.stanis@austinisd.org', '', $content); $content = ereg_replace('elizabeth.stanis@austinisd.org', '', $content); $content = ereg_replace('swmschool@gmail.com', '', $content); $content = ereg_replace('jon.howard@austinisd.org', '', $content); $content = ereg_replace('gorzycki@austinisd.org', '', $content); $content = ereg_replace('Southwest Middle School Moderator', '', $content); $content = ereg_replace('
Who: , ,', '', $content); $content = ereg_replace('__________________', '', $content); $content = ereg_replace('
Who: ,', '', $content); $content = ereg_replace('
Who: ', '', $content); $content = ereg_replace('Event Description:', 'Details: ', $content); $content = ereg_replace('
Where:', 'Where: ', $content); // If the date is for a new date, echo a date header if ($prevdate != $item['eventdatestr']) { echo "
".$item['eventdatestr']."
";} $prevdate = $item['eventdatestr']; // Echo the event info. The facebox tag is a link to a hidden div used to do a popover details page // We need to add the style info into the CSS page echo "".$title."
"; echo ""; } // END CALENDAR FEED CODE //////////////////////////////////////////////////////////////////// ?>
Only events for the next 31 days are shown. You may also view the Complete Calendar
Do you use Google Calendar? Want to include GMS events in your Google calendar? If so, go here for complete instructions.
