Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Open Internal Links in Same Tab - Ported by BOP5 (VB 4.x & VB 3.x) Details »
Open Internal Links in Same Tab - Ported by BOP5 (VB 4.x & VB 3.x)
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Oct 2018 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (3 votes - 5.00 average) Installs: 34
Released: 05 Aug 2012 Last Update: Never Downloads: 108
Supported Uses Plugins Re-usable Code  

Brought to you by BirdOPrey5.

NOTE: If you already use jquery on all pages see this mod instead: http://www.vbulletin.org/forum/showthread.php?t=286030

The purpose of this mod is to automatically turn any "internal" links into links that open in the same window (or tab) instead of always opening in a new window. By default all links added with the[URL] BBCode in vBulletin become links that open in new windows. This uses JavaScript to automatically fix this.

You can add multiple domains in the settings to be treated as "internal" domains. If you don't add any it will try to atuomatically detect the domain being used.

Note: If you add *any* domains then you must specify all local domains, it will not try to auto-detect.

Mod becomes active upon installation. Go to Admin CP -> Settings -> Options -> Open Internal Links in Same Window... to enable/disable mod and edit the domain(s) considered local.

If the user is browsing with JavaScript disabled then links will always open in a new window like is the usual behvior.

Live Demo: Demo Link

Should be compatible with all vBulletins between 3.6.0 and 5.0.0. (So all 3.8.x and 4.x.x for sure.)

Has been tested and found compatible with all current major browsers: IE9, FF 13 & 14, Chrome, Opera, and Safari.

I need to thank 2 others for this mod:

djbaxter on vBulletin.org and his similar mod.

His mod does something similar but is jquery based. This makes the JavaScript code simpler but requires the jquery library be loaded on every page load. vBulletin doesn't use jquery on most pages so that could add significantly to loading times.

And...

Alen Grakalic who posted an original JavaScript on Css Globe: Open External Links in New Window Automatically | Css Globe
I modified this publicly available code to have it work with vBulletin and allow for multiple local domains, however a lot of the code bign used remains his.

So thanks to djbaxter for the idea and Alen for a great jump-start on the code (I'm not a big fan of JavaScript )

------------------------------------------------------

Please "Mark as Installed" if you use this.
Nominate MOTM if you LOVE it!

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	open-internal-links-settings.jpg
Views:	245
Size:	64.1 KB
ID:	140336  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Miscellaneous Hacks AdminCP & ModCP open in new window/tab lordtopcat vBulletin 3.7 Template Modifications 19 14 Jul 2011 18:59

Comments
  #2  
Old 05 Aug 2012, 14:29
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Reserved.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #3  
Old 06 Aug 2012, 05:26
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Adding an option to force external links (all other domains you don't list) to open in a new tab would be convenient.
Reply With Quote
  #4  
Old 06 Aug 2012, 12:32
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by bzcomputers View Post
Adding an option to force external links (all other domains you don't list) to open in a new tab would be convenient.
How? The links already open in new tab if you don't use this?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #5  
Old 06 Aug 2012, 13:09
Justinphx Justinphx is offline
 
Join Date: Jan 2012
Very nice BOP5. I installed on 4.1.12p2 and works perfectly. This is very useful in the mod and admin forums where internal links are always being posted. Having them open in the same window was a great idea.
Reply With Quote
  #6  
Old 06 Aug 2012, 18:06
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Originally Posted by BirdOPrey5 View Post
How? The links already open in new tab if you don't use this?
This is not my experience. For me any external link (unless tagged with "_blank") will open in the same tab taking the user away from your website.
Reply With Quote
  #7  
Old 06 Aug 2012, 19:29
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Where are these external links? If they are custom links you created yourself then I would expect you use _blank f you wanted to?

I guess I wasn't figuring there wold be any external links not custom created or created by bbcode.

I will see what I can do but would like to see an example for sure.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #8  
Old 07 Aug 2012, 11:59
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Real name: Doug
Installed on vBulletin 4.1.3pl5 with thanks ...

Seems to work great ...

Regards,
Doug
Reply With Quote
  #9  
Old 08 Aug 2012, 07:55
kfyonur kfyonur is offline
 
Join Date: Apr 2008
how can i open audiclubtr.com/anasayfa links in new tab ?

http://www.audiclubtr.com/f26/audi-t...uyuruldu-2246/
Reply With Quote
  #10  
Old 08 Aug 2012, 11:52
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
If audiclubtr.com is your domain then you can't. If you need to open internal links in new tabs, don't use this mod.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #11  
Old 23 Aug 2012, 01:13
k6rikko's Avatar
k6rikko k6rikko is offline
 
Join Date: Jul 2011
Many thanks was looking days for an solution like this
Reply With Quote
  #12  
Old 23 Aug 2012, 04:34
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Originally Posted by BirdOPrey5 View Post
Where are these external links? If they are custom links you created yourself then I would expect you use _blank f you wanted to?

I guess I wasn't figuring there wold be any external links not custom created or created by bbcode.

I will see what I can do but would like to see an example for sure.
I am opening a specific forum up to advertising and wanted any external links posted within that forum to open in a new tab.
Reply With Quote
  #13  
Old 26 Aug 2012, 12:47
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
External links will always open in a new tab with or without this mod installed.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #14  
Old 04 Sep 2013, 13:33
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
From the the articles page https://www.mightymoiety.com/content.php?117-lifestyle, as an unregistered user I click the link https://www.mightymoiety.com/forum.php in the (If is your first visit) notice but it is still opening up in a new tab.. The mod is enabled..

Is there a setting somewhere?

Ta.
Reply With Quote
  #15  
Old 04 Sep 2013, 13:42
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
How have you added that banner where the links are at?

Last edited by ozzy47; 04 Sep 2013 at 13:49.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 04:01.

Layout Options | Width: Wide Color: