vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Open Local links in same window, External in new window (https://vborg.vbsupport.ru/showthread.php?t=256195)

SweCastel 11-06-2011 09:44 AM

Works In: 4.1.7 PL2

SweCastel 11-20-2011 11:21 PM

Works In: 4.1.8

spillage 12-18-2011 09:59 PM

Did not work on 4.1.8 for me.
Used code as provided... tried all permutations for "InsertYourDomainHere".
Any additional thoughts?

barakuda 12-25-2011 10:45 AM

work for 4.1.9 and 3.7.

SweCastel 02-29-2012 11:51 PM

Works in 4.11.1

SweCastel 05-23-2012 12:32 AM

Works in 4.2

Dragonsys 06-05-2012 04:31 PM

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 (Post 2141471)
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>";
        }


SweCastel 07-25-2013 07:02 PM

Works in 4.2.1

DemOnstar 07-26-2013 03:56 AM

Quote:

Originally Posted by SweCastel (Post 2435365)
Works in 4.2.1

Confirmed here too.

Heckwork 11-08-2013 02:01 PM

Great, thanks!

4.2.2 confirmed as well


All times are GMT. The time now is 04:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00996 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete