That works, but what code can I add so that it only redirects the user to their own page if they've clicked on the link in the navbar (i.e. when that nav tab has been selected)?
Does it affect something else the way it is (not that it matters, I'm just curious). Anyway, I suppose you could make the url member.php?self=1, then check for that, like:
If I manually enter the url into a browser I get the expected result of 4.0.5.
I was trying a few of my own mods, and most work but one did the same thing you described. I finally figured out that it was just because the productid I have when I edit the product in the admincp (the one in the [S]<version>..</version> tags[/S] <product productid="..."> tag in the xml) doesn't match the id I put on the url (and in the mod post), because at some point I changed it (but not everywhere, apparently). So I guess make sure that yours matches everywhere.