Topic: Is it possible to make links on the board open in a new window?
and if so what do I change? Thanks in advance.
You are not logged in. Please login or register.
PunBB Forums → Feature requests → Is it possible to make links on the board open in a new window?
and if so what do I change? Thanks in advance.
If you're asking it as a feature request I hardly believe you'll get it because PunBB uses XHTML 1.0 Strict which forbids the target attribute in the <a> tag. If you want to change it yourself for your board check the functions.php and add target="_new" in every link (starting from line 243).
Yeah I guess I just wanted to know how to do it myself. Thanks a bunch!
there is a mod you can search for and install that puts a yes or no option to open links in a new window
There is? anybody know the name?
Strofanto already answered your question.
open include/functions.php
and look for the part that turns http://address into <a href="http://address">address</a>
Now, in the <a href="blah"> change it to <a target="_blank" href="blah">
Easy stuff
Strofanto already answered your question.
open include/functions.php
and look for the part that turns http://address into <a href="http://address">address</a>
Now, in the <a href="blah"> change it to <a target="_blank" href="blah">Easy stuff
where exactly is this? which line in code??? please help...
Don't you have a search function? =/
On my site http://adsbb.co.za/ I changed include/parser.php:
// Ok, not very pretty :-)
$link = ($link == '' || $link == $url) ? ((strlen($url) > 55) ? substr($url, 0 , 39).' … '.substr($url, -10) : $url) : stripslashes($link);return '<a target="_blank" href="'.$full_url.'">'.$link.'</a>';
}//
// Turns an URL from the [img] tag into an <img> tag or a <a href...> tag
//
function handle_img_tag($url, $is_signature = false)
{
global $lang_common, $pun_config, $pun_user;$img_tag = '<a target="_blank" href="'.$url.'"><'.$lang_common['Image link'].'></a>';
Doing it unconditionally, and doing it with the target HTML attribute, is a very, very bad idea.
Doing it unconditionally, and doing it with the target HTML attribute, is a very, very bad idea.
Meaning? Issuing a warning like that would be far better if a brief description of why, (or an alternative method to use), was provided.
It's only the 13th time I've explained why, on these forums alone
Google is your friend.
1. The target attribute is not valid xhtml
2. Browser behaviour is the job of the behaviour layer i.e. javascript and not markup.
3. It deprives users of the choice. Some people might want links opened in the same window.
4. It causes accessibility problems as it is not the standard behaviour and kills the functionality of the back button.
5. It causes confusion to people surfing with IE maximized as they might not even realise a new window has opened (since it completely covers the window underneath).
It's only the 13th time I've explained why, on these forums alone
Didn't mean it to sound blaise, so to speak. Just meant it's better to quantify the answer with a definition. Just makes it easier if this topic ever pops up in a future search by someone.
PunBB Forums → Feature requests → Is it possible to make links on the board open in a new window?
Powered by PunBB, supported by Informer Technologies, Inc.