First find your INIT.JS file on your web server, mine was at:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033Next find the line:
var browseris=new Browseris();And paste the following code beneath it:
window.attachEvent("onload", new Function("MySiteLinkTextReplace();")); function MySiteLinkTextReplace(){Save the INIT.js file and the changes should be immediate, with no IISRESET required.
try{
//this code replaces "My Site" with "My Home"
//By default the mysite link item (just an asp:hyperlink control) does not
//have a consistent naming convention, and so could be called anything with
//hlMySite in its ID attribute so we get all 'a' tagged items and loop through
//them to find the right one
var allAtags = document.getElementsByTagName("a");
//Look for "My Site" in the innerText property - it will normally
//the first one found
for(var j=0;j<allAtags.length;j++){
var allAtags = allAtags(j);
//added the 'i' element to make sure on My Profile the My Site
//text is properly replaced in the two main locations
var i = 0;
//If match found replace the text
if(allAtags.innerText=="My Site")
{
//assign the new name for "My Site"
allAtags.innerText="My Home";
//break if we've replaced two 'My Site' instances (i == 1)
if(i == 1)
{
break;
}
else
{
i++;
}
}
}
catch(e){
//not much point doing anything here, either it works and the user
//sees 'My Home' instead of 'My Site', or it fails and they still
//see 'My Site'
}
}
This isn't quite the whole story though, the one place I've discovered it has no effect is on the person.aspx page (My Profile tab, if visited from your own My Site). There must be a way around this so I'm going to do some experimenting and will update here when I find the answer.
*UPDATE*
Right, so, if I'd been paying attention to my code, I would've noticed that the reason it wasn't working on the My Profile (person.aspx) page was due to the fact that there are two instances of 'My Site', one occurs where, on the standard personal view of My Site you see your name (top left of the page), and the other occurs in the top right as per usual. The latter instance was the one that wasn't being corrected as the code above breaks after it hits the first instance of 'My Site'. I've now added a count var into the loop above such that it checks for two instances by default and corrects them both, it now works on all pages, hurrah!
-moss[op]