#20 ability to turn off target="_blank"

XOOPS_2.0.x
closed
Core (214)
5
2012-09-25
2003-04-11
Matthew Bogosian
No

I appreciate the desire to keep people on one's site,
but one might wish to be able to turn off the addition
of ' target="_blank"' for every link not otherwise
directly produced by the core or a module. It might get
annoying sometimes that every user-provided link opens
a new window. At the very least one might give the
option to admins to turn it off.

Alternatively one could have sort of an Apache-like
RegEx-based ACL for links for this behavior:

Link match order: [ ] Blank,Same [X] Same,Blank
Blank Match: 'theirsite.com/downloads'
Same Match: '(mysite|theirsite).com'

This would indicate that any URLs containing either
'mysite.com' or 'theirsite.com' would not be opened in
a new window EXCEPT those URLs containing
'theirsite.com/downloads'. All other URLs would be
opened in a new window. Here's another example:

Link match order: [X] Blank,Same [ ] Same,Blank
Blank Match: '.theonion.com|(sourceforge|sf).net'
Same Match:
'www.theonion.com|(sourceforge|sf).net/projects'

Anything containing 'www.theonion.com',
'sourceforget.net/projects' or 'sf.net/projects' would
open in the same window. A URL matching any other host
in the theonion.com domain or any other
sourceforget.net or sf.net address would be opened in a
new window. All other URLs would open in the same
window (including 'http://theonion.com/'). Here's one
that would just open amazon.com links in a new window:

Link match order: [ ] Blank,Same [X] Same,Blank
Blank Match: 'amazon.com'
Same Match: ''

Or, the equivalent:

Link match order: [ ] Blank,Same [X] Same,Blank
Blank Match: 'amazon.com'
Same Match: '.*'

Please let me know if this doesn't make sense. Just a
thought.

Discussion