* and * + Treats each

,

,

as the beginning of * of a
(leaves

and beyond alone) * + Adds class="show incremental" to all of the tags below if * they have no class. * + Wraps S5 slide show classes and javascript around everything */ $ref = $_SERVER['HTTP_REFERER']; $toppieces = split("/",$ref); $mysite = $toppieces[3]."/".$toppieces[4]."/"; //$pieces = split('physix/302/',$ref); $pieces = split($mysite,$ref); if ($pieces[1] == ''){ die ("called from bad URL!"); } $morepieces = split('/',$pieces[1]); $thedir = $morepieces[0] ."/"; // Works on local machine //$fcontents = join('',file('http://localhost/'.$mysite.$pieces[1])); // Works at GC //$fcontents = join('',file('http://www-old.goshen.edu/'.$mysite.$pieces[1])); $fcontents = join('',file('../../'.$mysite.$pieces[1])); preg_match('/2.h" \?>(.*)<\? inc/si',$fcontents, $matches); $slidishstuff = $matches[1]; //print $fcontents; //print $slidishstuff; //exit(); //Massage relative image links to absolute links $pattern = "/src=\'([^\/h])/i"; $replacement = "src=\'/". $mysite . $thedir ."$1"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); $pattern = "/src=\"([^\/h])/i"; $replacement = "src=\"/". $mysite . $thedir ."$1"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); //Massage relative urls to absolute urls $pattern = "/href=\'([^\/h])/i"; $replacement = "href=\'/". $mysite . $thedir ."$1"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); // The 'h' below avoids re-writing absolute URLs that begin 'http...' //... yeah, it's a kludge. $pattern = "/href=\"([^\/h])/i"; $replacement = "href=\"/". $mysite . $thedir ."$1"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); //Set default

class to 'show incremental' $pattern = "//i"; $replacement = "

"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); //Set default

class to 'show incremental' $pattern = "//i"; $replacement = "

"; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); //Set default
    class to 'incremental' $pattern = "//i"; $replacement = "
      "; $slidishstuff = preg_replace($pattern, $replacement, $slidishstuff); //Make h1, h2, h3 into slide boundaries $pattern = '/

      which is unnecessary and we need a final, closing

Here's the lazy way.... $slidishstuff = "
". $slidishstuff ."
"; ?> SLIDE