vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Open Internal Links in Same Tab - Ported by BOP5 (VB 3.x & VB 4.x) (https://vborg.vbsupport.ru/showthread.php?t=286349)

BirdOPrey5 08-04-2012 10:00 PM

Open Internal Links in Same Tab - Ported by BOP5 (VB 3.x & VB 4.x)
 
1 Attachment(s)
Brought to you by BirdOPrey5.

NOTE: If you already use jquery on all pages see this mod instead: https://vborg.vbsupport.ru/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. :)

BirdOPrey5 08-05-2012 01:34 PM

Reserved.

Midohash 08-06-2012 02:29 AM

Thanks for the mod ... Will it improve page ranking by keeping members and visitors to stay in the forum rather than to leave it when they open an external link?

Midohash 08-06-2012 02:49 AM

Installed

BirdOPrey5 08-06-2012 11:21 AM

Quote:

Originally Posted by Midohash (Post 2354880)
Thanks for the mod ... Will it improve page ranking by keeping members and visitors to stay in the forum rather than to leave it when they open an external link?

Doubt it. In fact I am 100% sure it won't since this uses JavaScript to rewrite the links and search engine bots ignore javascript.

Also, I'm pretty sure the target of a URL doesn't affect SEO but never checked.

Midohash 08-06-2012 07:50 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2354940)
Doubt it. In fact I am 100% sure it won't since this uses JavaScript to rewrite the links and search engine bots ignore javascript.

Also, I'm pretty sure the target of a URL doesn't affect SEO but never checked.

Thank you. I thought initially it could improve the page rank, but now after your explanation, what are the expected benefits from it? ... also, does it cause db queries?

BirdOPrey5 08-06-2012 08:41 PM

There are no db queries.

The benefit is simply if people link from one thread to another in threads and posts on your forum it is more convenient usually to have those links open in the same tab, but by default they open in a new tab.

For example this link:

https://vborg.vbsupport.ru/forumdisplay.php?f=235

If you click on it, it will open in a new tab or browser window. But if you had this mod installed it would open in the same tab so users don't have to worry about having multiple tabs open to the same site.

Midohash 08-06-2012 09:58 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2355073)
There are no db queries.

The benefit is simply if people link from one thread to another in threads and posts on your forum it is more convenient usually to have those links open in the same tab, but by default they open in a new tab.

For example this link:

https://vborg.vbsupport.ru/forumdisplay.php?f=235

If you click on it, it will open in a new tab or browser window. But if you had this mod installed it would open in the same tab so users don't have to worry about having multiple tabs open to the same site.

Thanks a lot for the comprehensive reply.

tehPARADOX 08-13-2012 10:37 PM

Tagged.

Blueracer66 08-22-2012 08:18 AM

Works on vBulletin 3.8.7 PL3. Thanks!

tehPARADOX 09-29-2012 09:06 PM

Okay after further reading into this mod, I believe it might have the opposite effect in terms of seo and ranking.

Google loves internal linking, especially between articles and posts. It passes link juice. Though I haven't tested this mod, by your description it's using javascript. If google can't see it, it's not there.

BirdOPrey5 09-30-2012 04:44 PM

You can believe what you want but I am sure this mod doesn't hurt SEO. :)

ChiNa 09-30-2012 06:29 PM

Voted: Excellent Work of BirdoPrey! I am doing a cleanup on my forum, Hopefully when I am done I might come and Install this one for sure..... Thanks a lot for sharing this one with us!


All times are GMT. The time now is 03:28 AM.

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.01110 seconds
  • Memory Usage 1,743KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete