Change phpBB link behaviour

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
VeganFanatic
Registered User
Posts: 182
Joined: Mon Sep 08, 2008 8:27 pm
Location: Victoria, BC Canada
Contact:

Change phpBB link behaviour

Post by VeganFanatic »

I would like to know how to change phpBB or maybe have it added to the feature request so that links in forum posts and signatures open to a new window (_blank).

This would keep my site available on a tab while a user visits a referral.
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Change phpBB link behaviour

Post by ric323 »

The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
User avatar
VeganFanatic
Registered User
Posts: 182
Joined: Mon Sep 08, 2008 8:27 pm
Location: Victoria, BC Canada
Contact:

Re: Change phpBB link behaviour

Post by VeganFanatic »

I read that and it seems to be a lot of work, I was hoping it could be added as a feature to a future version of phpBB so that operators can have a choice.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70184
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Change phpBB link behaviour

Post by KevC »

VeganFanatic wrote:I read that and it seems to be a lot of work
You paste 3 bits of code. It takes a couple of minutes. If you back the files up before you start, you can't go wrong.
VeganFanatic wrote:I was hoping it could be added as a feature to a future version of phpBB so that operators can have a choice.
As the article says it's strict XHTML code. It will take less time to do 3 pastes than to wait for a version to have it built in.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51554
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Change phpBB link behaviour

Post by stevemaury »

That is the standard-compliant behavior. The right mouse button can change it,
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
VeganFanatic
Registered User
Posts: 182
Joined: Mon Sep 08, 2008 8:27 pm
Location: Victoria, BC Canada
Contact:

Re: Change phpBB link behaviour

Post by VeganFanatic »

Some competing forum software such as the one the NVIDIA uses open links in a new Window. The forum software that Microsoft uses gives the link maker the choice. The software that ATI/AMD uses does the same.

So I thought why can't phpBB have that as an option.

basically all that is needed is to add (target="_blank") to the code that deals with BBcode links.

Then a bool could check the config file for options as to whether its used or not.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51554
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Change phpBB link behaviour

Post by stevemaury »

The choice is as near as the right mouse button.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
AmigoJack
Registered User
Posts: 5775
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Change phpBB link behaviour

Post by AmigoJack »

The MOD Prime Links already incorporates dealing with a link target, so it is already somewhat available for phpBB3.

BTW: I hate link targets which always want to force me being opened in a new container (tab or window) - this is a choice made by the user - he should configure his browser to open links in a new container (tab or window). The target="_blank" syntax was never valid in strict mode. See http://www.w3.org/TR/WCAG-TECHS/H83.html
The objective of this technique is to avoid confusion that may be caused by the appearance of new windows that were not requested by the user. Suddenly opening new windows can disorientate or be missed completely by some users. In HTML 4.01 Transitional and XHTML 1.0 Transitional, the target attribute can be used to open a new window, instead of automatic pop-ups. (The target attribute is deleted from HTML 4.01 Strict and XHTML 1.0 Strict.) Note that not using the target allows the user to decide whether a new window should be opened or not. Use of the target attribute provides an unambiguously machine-readable indication that a new window will open. User agents can inform the user, and can also be configured not to open the new window. For those not using assistive technology, the indication would also be available from the link text.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.
Locked

Return to “[3.0.x] Support Forum”