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)
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.)
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?