Ok, so this is another work around, but this one works across the board. I doubt very much that it's supported but what the heck, neither is the INIT.JS hack I posted about a little while ago...
This method relies on the fact that whilst the control behind the scenes (MySiteLink.ascx) that handles the My Site link does have it's Text and NavigateUrl properties overwritten at runtime, it doesn't seem to do anything with the ImageUrl property, other than render it of course. This means that you can set this property in the ascx file and it will render the image you specify there in place of the text it would normally present. This is especially handy if you want to use a common graphic to identify a link to a user's My Site space across all of your SharePoint sites, rather than have them hunt for one bit of text in amongst a load of other bits of text.
Where do I find the MySiteLink.ascx file?
I found mine in: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES
I then just opened it in notepad (obviously I saved a backup first in case it all went very very badly) and edited the:
<asp:HyperLink id="hlMySite" ImageUrl="/PublishingImages/myhome.gif" runat="server"/>
element. The section highlighted above is the text I added.
Easy enough, but certainly not a final fix. For one thing you have no control over the alternate text attribute, so this remains as 'My Site', not so handy for users with accessibility problems if all your documentation says "click on the My Home link", it's generally bad practice to put text into images for exactly this reason in any case, especially if you can't set the alternate text to read the same as the text in the image!
And so the search for more hacks continues...
-moss[op]
No comments:
Post a Comment