OK, I know, this has been discussed earlier...
Searched for "new window", "external links" etc and found things like
(including my own post on the subject, new-window links in a standards-compliant world )
Open links in a new window ("hack")
New Window Links Option for Users (extension)
etc etc
However, what I want to do now is: Open links to other sites in a new window.
1) I know it is the function "handle_url_tag" in /include/parser.php I have to modify, but how?
I want to compare the url to $pun_config['o_base_url'] , and then add the attribute rel="external" if it is an external link. (NB! All urls outside the forum subdomain are considered to be "external", i.e. http://example.com is an external link too, if o_base_url is http://forum.example.com.)
2) To change rel="external" into target="_blank" I use a javascript function.
In what pages do I have to include the .js file containing the script? The js function is needed in viewtopic.php, that is quite obvious, and in edit.php too (preview). Any other places?
Why I use rel="external" + javascript: Because a) I think it is prettier than adding onclick="window.open(this.href); return false;" and b) I want to do more things than just force the link to open in a new tab/window, e.g. add some info to the title attribute etc.