You are not logged in.
- Topics: Active | Unanswered
#1 2008-05-10 12:11:22
- Ophie
- Member
- From: /bin/laden
- Registered: 2008-05-09
- Posts: 22
Open link in new tab
Greetings,
One thing that annoys me is that Flux opens links in the same windows, rather than in a new tab. Sure I know i can just hit the scroll, but it's more convenient that way.
[img]http://i28.tinypic.com/5c0sxi.jpg[/img]
[img]http://i25.tinypic.com/2yv2fyq.jpg[/img]
Offline
#2 2008-05-10 12:17:38
- jmp
- Member
- Registered: 2008-05-03
- Posts: 85
Re: Open link in new tab
The thing that annoys me the most with some other boards is that they force links to open in new tabs or windows. I think it's much more convenient to let me decide whether I want to open it in new tab or not.
Offline
#3 2008-05-10 12:18:53
- StevenBullen
- Member
- Registered: 2008-05-03
- Posts: 256
- Website
Re: Open link in new tab
The thing that annoys me the most with some other boards is that they force links to open in new tabs or windows. I think it's much more convenient to let me decide whether I want to open it in new tab or not.
Agree
Im sure an extension will be made to change it new window/tab instead. ![]()
Last edited by StevenBullen (2008-05-10 12:19:09)
Offline
#4 2008-05-10 12:24:01
- elbekko
- Former Developer

- From: Leuven, Belgium
- Registered: 2008-04-30
- Posts: 1,131
- Website
Re: Open link in new tab
Yeah, I wanted to make the extension, but a hook is missing to do it.
Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks
Offline
#5 2008-05-10 12:28:06
- StevenBullen
- Member
- Registered: 2008-05-03
- Posts: 256
- Website
Re: Open link in new tab
Yeah, I wanted to make the extension, but a hook is missing to do it.
You added it to hooks topic now though... so all good. ![]()
Offline
#6 2008-05-10 12:36:32
- Jérémie
- Member

- From: Paris, France
- Registered: 2008-04-30
- Posts: 627
- Website
Re: Open link in new tab
Greetings,
One thing that annoys me is that Flux opens links in the same windows, rather than in a new tab. Sure I know i can just hit the scroll, but it's more convenient that way.
That's not the board jurisdiction, it's yours.
Just middle-mouse click instead of left-mouse click to open in a new tab.
Offline
#7 2008-05-10 12:57:37
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,626
Re: Open link in new tab
We are using an external javascript file to open the help links in a new window. The script identifies the links because they have a class exthelp. All we have to do is make sure that all external links are identifiable by a unique class, say extlink and then the js could be modified appropriately by anybody who wanted to.
The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#8 2008-05-10 13:59:42
- Ophie
- Member
- From: /bin/laden
- Registered: 2008-05-09
- Posts: 22
Re: Open link in new tab
It would still be a nice feature though.
[img]http://i28.tinypic.com/5c0sxi.jpg[/img]
[img]http://i25.tinypic.com/2yv2fyq.jpg[/img]
Offline
#9 2008-05-10 15:06:21
- jmp
- Member
- Registered: 2008-05-03
- Posts: 85
Re: Open link in new tab
I believe the original reasoning against it was because XHTML 1.0 strict (or any version of HTML strict) does not have the "target" attribute for hyperlinks. You need JavaScript hacks like the one described by Paul to achieve this.
Offline
#10 2008-05-10 16:00:19
- elbekko
- Former Developer

- From: Leuven, Belgium
- Registered: 2008-04-30
- Posts: 1,131
- Website
Re: Open link in new tab
Which is already in the source (check common.js).
Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks
Offline
#11 2008-05-10 16:08:38
- SuperMAG
- Member
- Registered: 2008-05-10
- Posts: 707
Re: Open link in new tab
i thought that was configured in admin panel ...
1.2 has this feature ...
Offline
#12 2008-05-10 16:09:22
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,135
- Website
Re: Open link in new tab
No, it didn't
Offline
#13 2008-05-10 16:10:48
- SuperMAG
- Member
- Registered: 2008-05-10
- Posts: 707
Re: Open link in new tab
Open links in New window will automathecally open links in new tabs
Offline
#14 2008-05-10 16:13:25
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,135
- Website
Re: Open link in new tab
That's not a default feature.
Offline
#15 2008-05-10 16:29:08
- jmp
- Member
- Registered: 2008-05-03
- Posts: 85
Re: Open link in new tab
Which is already in the source (check common.js).
I know, that's what I referred to as a hack. ![]()
Offline
#16 2008-05-10 16:33:09
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,626
Re: Open link in new tab
Hack is the wrong word. Browser behaviour is supposed to be taken care of by scripting. It was the target attribute that was the hack.
The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#17 2008-05-11 04:43:13
- Jérémie
- Member

- From: Paris, France
- Registered: 2008-04-30
- Posts: 627
- Website
Re: Open link in new tab
We are using an external javascript file to open the help links in a new window. The script identifies the links because they have a class exthelp. All we have to do is make sure that all external links are identifiable by a unique class, say extlink and then the js could be modified appropriately by anybody who wanted to.
Rel="external" could be a better one, or at least class="external" since it's widely used under that name.
Offline
#18 2008-05-11 11:18:35
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,626
Re: Open link in new tab
Actually now I refresh my memory, I have used class="external" for redirect forums. It just hasn't been applied to posts because the parser is still work in progress. I avoided rel becuase it seems to do nothing useful in the real world apart from providing a hook for javascript. At least with a class external links can be styled differently (for browsers that can't deal with attribute selectors).
The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#19 2008-05-11 11:29:20
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,135
- Website
Re: Open link in new tab
Paul wrote:We are using an external javascript file to open the help links in a new window. The script identifies the links because they have a class exthelp. All we have to do is make sure that all external links are identifiable by a unique class, say extlink and then the js could be modified appropriately by anybody who wanted to.
Rel="external" could be a better one, or at least class="external" since it's widely used under that name.
Huh? You were the one who objected to us targeting rel=external with our Javascript when it was first implemented. ![]()
Offline
#20 2008-05-11 12:13:38
- DavidONE
- Member

- From: Exeter, England
- Registered: 2008-05-10
- Posts: 38
Re: Open link in new tab
I'm not a fan of the current method.
I use Tab Mix Plus which allows me to force all links to open in current tab - it's then my choice to open links in new tabs. The FluxBB implementation means that when I CTRL+click 'BBCode', for example, I don't get a new tab and the link opens in current tab. Irritating.
I'd prefer:
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;Offline
#21 2008-05-11 12:23:13
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,135
- Website
Re: Open link in new tab
I think this is one of those issue that will never be addressed in a way that pleases everyone. There are just too many opinions, browser/popup blocker specific implementation issues, etc.
Just to give a TINY bit of history here:
http://punbb.informer.com/forums/viewtopic.php?id=17876
http://punbb.informer.com/forums/viewtopic.php?id=6355
http://punbb.informer.com/forums/viewtopic.php?id=8051
http://punbb.informer.com/forums/viewtopic.php?id=6379
http://punbb.informer.com/forums/viewtopic.php?id=13425
In other words, some people want links to open in a new window, some people don't. Some people want us to add the invalid target attribute, some people want us to use window.open. Some people want us to use rel=external, some people don't. Etc.
I challenge ANYONE to come up with a solution to this issue that pleases everyone involved ![]()
Offline
#22 2008-05-11 13:42:01
- Jérémie
- Member

- From: Paris, France
- Registered: 2008-04-30
- Posts: 627
- Website
Re: Open link in new tab
Huh? You were the one who objected to us targeting rel=external with our Javascript when it was first implemented.
Uh I remember now, something about interfering with pre-existing code on the site Flux will be integrated, isn't it? Or something like that.
I would have to think about every scenario plausible, but right now the first thing I can think of as the best possible case would be: rel="external" class="external flux", and have Flux's javascript target a.external flux. Or, if js can't do that, use class="external flux-exl" (or something) and target the second one.
Flux js wouldn't interfere with current web habits, and still Flux html would adhere to them.
Offline
#23 2008-05-11 13:50:03
- Jérémie
- Member

- From: Paris, France
- Registered: 2008-04-30
- Posts: 627
- Website
Re: Open link in new tab
I challenge ANYONE to come up with a solution to this issue that pleases everyone involved
First of all, I don't think that's the goal of any software, and it wasn't certainly the goal of Pun. PunBB was more a pleasing an evolved minority and actively displeasing the majority.
But, the answer seems quite simple: don't open new windows, ever. Have the appropriate smart tagging (rel, class, id) of resources so that extensions can deal with it for some very specific, narrow, cases. When you need to add non-permanent content on top of a page (like, a Smiley selection box), overlay it (with javascript, and degrade it as a new page).
And then, to prevent malpractice to spread on the web, have an official extension that will allow a per-user toggle of opening external links in a new window, both in user profile and possibly on each page; toggle being disabled by default, and don't give the board admin the possibility of toggling it by default. It's more restrictive, but that educational.
If you want to really do it right, add a silent stats function to that plugin, so when people come whining about their poor users forced to leave this marvelous, unforgettable website to read another page, you'll have hard numbers to prove to them it's their ego that want this function, not their users.
Offline
#24 2008-05-11 13:52:10
- Connor
- Former Developer
- Registered: 2008-04-27
- Posts: 1,127
Re: Open link in new tab
First of all, I don't think that's the goal of any software, and it wasn't certainly the goal of Pun. PunBB was more a pleasing an evolved minority and actively displeasing the majority.
PunBB was never about displeasing the majority.
Offline
#25 2008-05-11 14:05:05
- Jérémie
- Member

- From: Paris, France
- Registered: 2008-04-30
- Posts: 627
- Website
Re: Open link in new tab
Refusing to integrate private messaging and wysiwyg into core is actively displeasing the majority (at first glance of course, since it was the right move). I doubt very much you didn't knew that ![]()
Offline
