EDIT THIS + edit the files in /includes/ to change its look! * If you have questions visit http://www.bie.no/forum and post them in the phpODP support forum! * */ $show_thumbnails = true; // set this to true if you want to show thumbnails // English users set this to "en" to show amazon.com link // German users set it to "de" to show amazon.de link // If you do not want to show the amazon table just leave them blank ("") $show_search_sponsor = ""; $show_browse_sponsor = ""; // ODP root URL .. some people say they needed to change this to http://www.dmoz.org/ $rooturl = "http://www.dmoz.org"; // If you want so use a certain category at the root .. // eg. $rootcategory = "/World/Deutsch/"; to show German pages $rootcategory = "/World/Espa%c3%b1ol/Artes/Cine/"; /* * STOP --- > EDITING BELOW SHOULD NOT BE NECESSARY (but could be if externals are changed) */ //Header("Content-Type: text/plain; charset=\"utf-8\""); $sponsor_file_search = "search_sponsor_header.php"; // default if($show_search_sponsor == "de") $sponsor_file_search = "search_sponsor_header_de.php"; $sponsor_file_browse = "search_sponsor_header.php"; // default if($show_browse_sponsor == "de") $sponsor_file_browse = "search_sponsor_header_de.php"; // replacement variables $replace = $filename . "?browse="; $linkstr = 'phpODP 1.4"; $fp = fopen( $rooturl, "r" ); $html = join( "", file( $rooturl ) ); fclose ( $fp ); $startpos = strpos( $html, $startstr ); $html = substr( $html, $startpos, strlen($html)); $endpos = strpos( $html, $endstr ); $html = substr( $html, 0, $endpos ); $html = str_replace( $linkstr , $linkstr . $replace, $html ); $html = str_replace( '$curline"; } else { echo $curline; } } else { $curline = utf8_decode($curline); echo $curline; } } } else { $html = utf8_decode($html); echo $html; } } else { // open failed include("includes/404.php"); } include("includes/browse_footer.php"); } else if( $searchstring != "" ) { // the user is searching include("includes/search_header.php"); if($show_search_sponsor != "" ) include("includes/" . $sponsor_file_search); $searchurl = $searchurl . $searchstring . ($start == "" ? "" : "&start=" . $start ) . ($morecat == "" ? "" : "&morecat=" . $morecat); $fp = fopen( $searchurl, "r" ); $html = join( "", file( $searchurl ) ); fclose ( $fp ); if( strpos( $html, $noresult) != FALSE ) { // no results found include("includes/search_no_result.php"); } else { $startpos = strpos( $html, $startsrch ); $html = substr( $html, $startpos, strlen($html)); $endpos = strpos( $html, $endsrch ); $html = substr( $html, 0, $endpos ); $html = str_replace( $linkstr . "/", $linkstr . $replace . "/", $html ); $html = str_replace( "http://dmoz.org", "$filename?browse=", $html ); $html = str_replace( $search_next, $search_next_replace, $html ); $html = str_replace( $filename . '?browse=search?', $filename . '?', $html ); $html = str_replace( '$curline"; } else { echo $curline; } } else { $curline = utf8_decode($curline); echo $curline; } } } else { $html = utf8_decode($html); echo $html; } } include("includes/search_footer.php"); } echo ""; ?>