The Arcive of vBulletin Modifications Site. |
|
Open Local links in same window, External in new window Details »»
|
|||||||||||||||||||||||||||
|
Open Local links in same window, External in new window
Developer Last Online: Dec 2016
I did search for a easy solution to simply open a local link in the same window, and external links in a new window.
Did not find it, so I did make this. My first PHP script. In the file: includes/class_bbcode.php Search for: standard URL hyperlink 3.1.5 (maybe 3.1.6?) And before: Replace: Code:
return "<a href=\"$rightlink\" target=\"_top\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>"; Replace: Code:
return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>"; Code:
if( is_int( strpos( strtolower( $rightlink ), "InsertYourDomainHere") ) )
{
return "<a href=\"$rightlink\" target=\"_top\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>";
} else {
return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>";
}
It didn?t work for me anyway. Maybe because of vbulletin cutting down long texts? I dont really now. And then update the CMS Cache. AdminCP - vBulletin CMS - Clean CMS-Cache However this works perfect for me. // Daniel Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
It didn´t work for me
|
|
#3
|
||||
|
||||
|
I have several parked domains. I would like this if I could use multiple domains.
Ex: utahraves.com and utrave.org = same site, I would need to be able to put both domains in that for my site to work. |
|
#4
|
||||
|
||||
|
ander test
thank you bro |
|
#5
|
|||
|
|||
|
work whit attachments? i have on my site Bug Whit attacment. i need open in new windows
|
|
#6
|
|||
|
|||
|
Some update is done. Maybe it works now.
|
|
#7
|
|||
|
|||
|
It doesn't work in 4.0.x...
|
|
#8
|
|||
|
|||
|
Sorry if it does not.
I works just fine in 4.1.1 so I guess thats what you need. If you don?t want to customize it. // D |
|
#9
|
||||
|
||||
|
Doesn't work for me, either
|
|
#10
|
|||
|
|||
|
Works out perfect with version 4.1.5. Thanx for having resolved this issue!
|
![]() |
|
|