1) phpBB does not use the username to query the profile infomation, it uses the member id.
You will need to write queries that accept a username.
2) Links to member profiles throughout phpbb use member ids. This is a problem that can't easily be solved with a closing find/replace function as each find/replace would need an additional query to match the replace (username) to the find (id).
So you need to modify this in various places in phpbb.
3) Lastly, you just need to use mod_rewrite to pass the /foo to your query that selects a user record based on username.
PM me your offer
P.S. You don't have to edit any files on my phpbb[2.0.16], just sell me the code.
Heh, I just realized that If I am correct about #1, then #2 is nothing more than some careful search and replace (search for "mode=viewprofile", then in the same line look for "_id" and replace that with "name"). Though, then you still have to take care of using /profile/foo instead of /profile.php?mode=viewprofile&u=foo
Just wondering, are you trying to accomplish this so that Google will spider your forum (which, as far as I know, it doesn't by default)? If so, I think this article might help.