Seems ok.
Remember to make Teseo's mod in the core if you are using 3.7.x.
Now, for modern:
Edit
search.php
find
<div id="main">
replace with
<div id="main">
<?php if(strpos($_SERVER['REQUEST_URI'], 'user,') !== false)
{
$rest = substr($_SERVER['REQUEST_URI'], (strpos($_SERVER['REQUEST_URI'], 'user,')+5) );
preg_match('/\d+/', $rest, $matches);
$usr = User::newInstance()->findByPrimaryKey($matches[0]);
echo 'Results from <a href="'.osc_user_public_profile_url($matches[0]).'">' . $usr['s_name'] . '</a> items:'; //replace the english words if needed.
}
?>
edit user-public-profile.php
find
<div id="description" class="latest_ads">
replace it with
<div class="main" style="display:block;position:relative;width:100% !important;">
<input placeholder="Search in user's items" id="inputuisearch" type='text' />
<div>
<button onclick="fus();" class="button"><?php _e("Search", 'bender');?></button>
</div>
</div>
<script>
document.getElementById("inputuisearch").addEventListener("keydown", function (e) {
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
fus();
}
});
function fus() {
var uisearch = $("#inputuisearch").val();
if(uisearch.indexOf(" ") > 0){
var arrsearch = uisearch.split(" ");
uisearch = arrsearch.join("+");
}
var uriuisearch="/search/pattern," + uisearch + "/user," + <?php echo osc_user_id();?> ;
window.location.pathname=uriuisearch;
}
</script>
<div id="description" class="latest_ads">
PS.
I did not test to see how it looks in modern.