Ok i think i've done it at least for the my page button in the user block, the following changes will rewrite the url to read
www.example.com/username ( what ever the user name may be ) and the url shows in the bottom left cornor of the browser, when you put the mouse over the link text
I have hit a snag though when the user logs in and clicks the " My Page " button from the user block, you will get the following error
"JUser::_load: Unable to load user with id: 65"
65 being what ever the user id is in the database. the changes i have made are below. take a look. I think the problem is i have removed the user id from the url query.
But at the very least the url is writing what we want to see. will play with this some more, and see what happens when i put the user id query back in the url.
see my changes below.
open k2_com folder, open the helpers, then open route.php and change the following, sorry i dont have line numbers.
change:
'name'=>(int)$userID
to
'username'=>(int)$userID
change.
$alias = trim(mb_strtolower($user->name));
to
$alias = trim(mb_strtolower($user->username));
and this
$link = 'index.php?option=com_k2&view=itemlist&task=user&id='.$userID.':'.$alias;
to
$link = 'index.php?option=com_k2&view=itemlist&task='.$alias;