Hmm... it's been a long time since anyone has said anything, but I'll be hopeful that someone can answer this..
I looked in the plugin code and it SEEMS to exclude "attachment.php" so that attachments still open in a new window, but it's still stripping "target="_blank"" from attachment links.
I highlighted the attachment.php code in red:
Code:
if ( FALSE !== strstr($vbulletin->options['bburl'], '://www.') ) {
$locallinks_search = '#\<a href="' . str_replace('://www.', '(://www.|://)', $vbulletin->options['bburl']) . '/((?!attachment.php).*?)" target="_blank"\>#i';
$locallinks_replace = '<a href="' . $vbulletin->options['bburl'] . '/$2">';
$text = preg_replace($locallinks_search, $locallinks_replace, $text);
$this->cached['text'] = preg_replace($locallinks_search, $locallinks_replace, $this->cached['text']);
} else {
$locallinks_search = '#\<a href="' . $vbulletin->options['bburl'] . '/((?!attachment.php).*?)" target="_blank"\>#i';
$locallinks_replace = '<a href="' . $vbulletin->options['bburl'] . '/$1">';
$text = preg_replace($locallinks_search, $locallinks_replace, $text);
$this->cached['text'] = preg_replace($locallinks_search, $locallinks_replace, $this->cached['text']);
}
So is this code excluding or including attachment.php? I'm not exactly fluent in regex.