The respective code snippet is inside b2template.functions.php, starting at line 975
Interesting is line 996:
echo ‘” rel=”external”>’ . $author . ‘‘;
change it to
echo ‘” target=”_blank” rel=”external”>’ . $author . ‘‘;
and it should work if I didn’t mess it up 😉
sorry didnt see yours, Guido 😛
Actually, HTML Strict 4.0 and XHTML 1.0 Strict no longer support the “target” attribute.
the new one is rel=”external”. But thats not working.
Things is – as far as I understand – that XHTML is thought of being just related to the browser window, and when you actually want to open a new window, thats beyond XHTML if you want, and you would invoke JavaScript for this task.
So the missing of the “target” attribute in the WP code is quite modern but you might still prefer to add it in – the Transitional Standards still have it it, but its on the “pase out”…
On this page you can read more about it and use the .js they provide at the end: http://www.sitepoint.com/print/1041
does XHTML transitional allow using the target attribute (for validation)? I find it easy and compatible.
Thanks to both Guido and Anunnaki I now have a new window opening when someone clicks on the authors link in the comments. 🙂
I tried adding target=”_blank” like Guido and Anunnaki said, and was thrilled to see the end product. BUT! While the links do open in a new window, I get parse errors (see below; my actual username replaced with “username”) when I tested and signed my own thread.
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 115
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 116
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 117
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 119
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 120
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 121
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 122
Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/blog/wp-includes/template-functions.php:1884) in /home/username/public_html/blog/wp-comments-post.php on line 127
I’m a total php newbie. Is there any way I could fix this? Help would be very much appreciated.
Ah wait. Now I understand. Whitespace… remove whitespace…