You can do this with 1 single line of code as well:
Code:
return "<a href=\"$rightlink\" target=\"" . iif(strstr($rightlink,"yourdomain.com"),"_self","_blank") . "\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>";
Quote:
Originally Posted by utahraves
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.
|
add an elseif for each domain
Code:
if( is_int( strpos( strtolower( $rightlink ), "InsertYourDomainHere") ) ) {
return "<a href=\"$rightlink\" target=\"_top\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>";
} elseif( is_int( strpos( strtolower( $rightlink ), "DomainName2") ) ) {
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>";
}