The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I make link open in same window?
Is there a way to make Links or URLs posted by registered members of my forum that are in my forum or domain open in the current window rather than opening a new one?
|
#2
|
|||
|
|||
You have to edit a PHP file: includes/class_bbcode.php
In this file, change Code:
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>"; Code:
return "<a href=\"$rightlink\">$text</a>"; |
#3
|
|||
|
|||
thank you
|
#4
|
|||
|
|||
Actually that patch doesn't do what was asked and I have seen a number of people asking for a way to make links within the forum open in the same window but other (external) links open a new window.
I have done this successfully for my forum by making the patch conditional - eg, prefix the existing return statement with this where YOURURL is replaced by the URL prefix you require to match and XX is the length of the string to be matched (including the http://): Code:
if ( vbstrlen($rightlink) > XX AND substr($rightlink, 0, XX) == "http://YOURURL") { return "<a href=\"$rightlink\">$text</a>"; }else |
#5
|
|||
|
|||
This thread is 2 months old, but in case anybody else is looking for an alternate solution....
Edit the PHP file includes/class_bbcode.php, and in this file change: PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|