Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Open local links in same window; external links in new window Details »
Open local links in same window; external links in new window
Mod Version: 1.00, by djbaxter (Coder/Designer) djbaxter is offline
Developer Last Online: May 2017 I like it Show Printable Version Email this Page

vB Version: 4.2.0 Rating: (1 vote - 5.00 average) Installs: 18
Released: 28 Jul 2012 Last Update: Never Downloads: 35
Supported Template Edits Re-usable Code  

By default, vBulletin opens all links in posts in a new window (target="_blank").

This mod opens local links (i.e., links from your domain) in the same window (target="_self"), and external links in a new window or tab (target="_blank").

INSTRUCTIONS:

AdminCP >> Style Manager >> Common Templates >> headinclude

FIND in headinclude (this is where I added the code but probably anywhere would work):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

ADD AFTER:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Save. Done.

Thanks to my son, Wilder Tweedale, for assistance with the code.

Update:

Originally Posted by BirdOPrey5 View Post
VB4 uses jquery on only a few pages. Yahoo YUI is the default library on all pages.
BOP5 has just published a javascript version of this as a product, which may be easier for many to implement and which avoids possible increases in page load times.

See http://www.qapla.com/mods/misc.php?d...extlinkingbop5

Download Now

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

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
Mini Mods Open Local links in same window, External in new window SweCastel vBulletin 4.x Add-ons 19 08 Nov 2013 14:01
Mini Mods Same Window For Local Links Viper007Bond vBulletin 3.6 Add-ons 54 02 Nov 2011 15:59

Comments
  #2  
Old 28 Jul 2012, 13:22
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Before someone asks the obvious question...

Q: How is this mod different from the mod by SweCastel http://www.vbulletin.org/forum/showthread.php?t=256195?

A: SweCastel's mod requires editing one of the core vBulletin files. I dislike doing that because it means re-editing the file with every update. The current mod requires template edits only.
Reply With Quote
  #3  
Old 28 Jul 2012, 21:23
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
This is a great idea, I use a custom BBCode for local links on my forum but it's annoying to have to worry about which are local and which aren't.

I would just give a heads up to people if they are already loading jquery on their pages they don't need to load it twice- actually 2 different jquery versions may conflict.
__________________
-Joe (@BirdOPrey5)
Qapla.com - Exclusive VB Mods! | Joe's Ultimate Off Topic | My Free VB "Mods"
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #4  
Old 28 Jul 2012, 23:58
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by BirdOPrey5 View Post
This is a great idea, I use a custom BBCode for local links on my forum but it's annoying to have to worry about which are local and which aren't.
Thanks.

Originally Posted by BirdOPrey5 View Post
I would just give a heads up to people if they are already loading jquery on their pages they don't need to load it twice- actually 2 different jquery versions may conflict.
To be honest, I thought it was loaded in native vBulletin installations but couldn't get the script to work without the load line added.
Reply With Quote
  #5  
Old 29 Jul 2012, 00:51
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
VB4 uses jquery on only a few pages. Yahoo YUI is the default library on all pages.
__________________
-Joe (@BirdOPrey5)
Qapla.com - Exclusive VB Mods! | Joe's Ultimate Off Topic | My Free VB "Mods"
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #6  
Old 04 Aug 2012, 13:07
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by BirdOPrey5 View Post
VB4 uses jquery on only a few pages. Yahoo YUI is the default library on all pages.
BOP5 has just published a javascript version of this as a product, which may be easier for many to implement and which avoids possible increases in page load times.

See http://www.qapla.com/mods/misc.php?d...extlinkingbop5
Reply With Quote
  #7  
Old 04 Aug 2012, 21:21
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I didn't want to release my own here since if it wasn't for yours I wouldn't have thought to do it.
__________________
-Joe (@BirdOPrey5)
Qapla.com - Exclusive VB Mods! | Joe's Ultimate Off Topic | My Free VB "Mods"
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #8  
Old 04 Aug 2012, 21:48
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Well, suffice it to say that I'm now using yours.

And I wouldn't be offended in the slightest if you re-released your mod here.
Reply With Quote
  #9  
Old 05 Aug 2012, 14:29
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Thanks. I put it up here: http://www.vbulletin.org/forum/showthread.php?t=286348
__________________
-Joe (@BirdOPrey5)
Qapla.com - Exclusive VB Mods! | Joe's Ultimate Off Topic | My Free VB "Mods"
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #10  
Old 05 Aug 2012, 14:39
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Excellent... To others, I'm now using the BOP5 mod on four vB4 forums... highly recommended.
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 01:08.

Layout Options | Width: Wide Color: