[wp-hackers] Moved from BlogWare to WordPress - Need Help

Chris Pirillo chris at lockergnome.com
Sat May 20 03:45:30 GMT 2006


Howdy Happy Hackers,

I've now become one of the WordPress faithful, and have been enjoying the
experience so far. Just found a killer edit-in-place plugin at
http://www.headzoo.com/downloads - with a little style tweaking, you'll be
flying.

I come to you this evening with a hacking help request. In my travels, I've
discovered this bit of code for the 404.php. The problem is: BlogWare URLs
do not contain keywords. :P BlogWare URLs do, however, contain date strings
similar to those found in WP URLs. So...

 http://chris.pirillo.com/blog/_archives/2006/2/23/1780165.html

is now at:

 http://chris.pirillo.com/2006/02/23/googlefasting-day-1/

Could this be rewritten (and shared, for other frustrated ex-BlogWarers) to
identify the date range from the old BlogWare URLs, then pop the visitor to
the date archive page for that day? Sure would save me a bit of transition
frustration.

<?
$search_term = substr($_SERVER['REQUEST_URI'],1);
$search_term = urldecode(stripslashes($search_term));
$search_url = 'http://chris.pirillo.com/index.php?s=';
$full_search_url = $search_url . $search_term;
$full_search_url = preg_replace('/ /', '%20', $full_search_url);
$full_page = implode("", file($full_search_url));
print_r($full_page); die();
?>

Any help is appreciated,

Chris
http://chris.pirillo.com/



More information about the wp-hackers mailing list