I'm currently testing 2.1.3b2 for the first time.
Is there an option or a way force local site links to open in the current window, rather than opening a new window?
If possible, I would like external links to continue to open in new windows, while having all local links open within the current window.
I tried changing my link entry to a relative local path, but it still opened in a new window.
EDIT:
Well, I changed "_blank" to "_self" in a couple spots in local_links_include.php and that opens all links in the current window.
I am still interested in any tips to distinguish local links from external links to make the window target a conditional.
EDIT 2:
Well, I set up the following conditional, to check whether my site URL is contained within the link and change the target based on that. My settings are:
force_redirect: 0
protected_link: 0
find:
Code:
$atag = "<a href='".$vbulletin->options['bburl']."/".$LINKS_SCRIPT.
iif($links_defaults['seo_friendly'],"/jump/$linkid/$catid",".php?action=jump&id=$linkid&catid=$catid").
"' title='". $vbphrase['ll_visitdownload'] ."' target='_blank'>".
$linkname."</a>";
replace with:
Code:
if (substr_count($linkurl, 'localdomain.com') == 1) {
$atag = "<a href='".$vbulletin->options['bburl']."/".$LINKS_SCRIPT.
iif($links_defaults['seo_friendly'],"/jump/$linkid/$catid",".php?action=jump&id=$linkid&catid=$catid").
"' title='". $vbphrase['ll_visitdownload'] ."' target='_self'>".
$linkname."</a>";
} else {
$atag = "<a href='".$vbulletin->options['bburl']."/".$LINKS_SCRIPT.
iif($links_defaults['seo_friendly'],"/jump/$linkid/$catid",".php?action=jump&id=$linkid&catid=$catid").
"' title='". $vbphrase['ll_visitdownload'] ."' target='_blank'>".
$linkname."</a>";
}
I would still like to know if this option is already built into to Links and Downloads Manager, so I can achive the same result without editing the local_links_include.php file.
Thanks for you help.