Back to vBulletin 3.8 Add-ons

Open Internal Links in Same Tab - Ported by BOP5 (VB 3.x & VB 4.x)
Mod Version: 1.00, by BirdOPrey5

vB Version: 3.8.x Rating: (3 votes - 5.00 average) Installs: 16
Released: 05 Aug 2012 Last Update: 05 Aug 2012 Downloads: 49
Not Supported Uses Plugins Re-usable Code  

Brought to you by http://www.qapla.com/mods/.

NOTE: If you already use jquery on all pages see this mod instead: Open local links in same window; external links in new window

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: http://www.qapla.com/mods/showthread.php/616-Automatic-Internal-Linking

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: http://cssglobe.com/post/1281/open-external-links-in-new-window-automatically/
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.

Download

File Type: %1$s Open Internal Links In Same Page - Ported By BOP5 (v1.0).zip (4.4 KB, 58 downloads)

Supporters / CoAuthors

  • djbaxter

Screenshots

Click image for larger version
Name:	open-internal-links-settings.jpg
Views:	149
Size:	64.1 KB
ID:	140338  

Similar Mods

Miscellaneous Hacks Open Internal Links in Same Tab - Ported by BOP5 (VB 4.x & VB 3.x) vBulletin 4.x Add-ons
Miscellaneous Hacks AdminCP & ModCP open in new window/tab vBulletin 3.7 Template Modifications

vblts.ru supports vBulletin®, 2022-2024