Advertisement:

Author Topic: Internal Links Use Same Window  (Read 11968 times)

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Internal Links Use Same Window
« on: June 10, 2008, 06:49:10 PM »
Link to Mod


INTERNAL LINKS USE SAME WINDOW v1.2
By wdm2005

Link to Mod | Support Topic | Demo

Compatibility
For SMF 1.1.x and SMF 2.0 Beta x

Introduction
This simple mod fixes all internal SMF urls in posts/pms etc to open in the same window rather than a new window.

Alot of people either just post straight links (which get autoconverted to bbcode), don't know about [iurl][/iurl], can't be bothered or forget to use it when posting links to other smf pages on your site.
So that sometimes results in having many new tabs/windows opening for internal links when really opening in the same window is preferrable.

Features
o Makes local links (to local smf pages) open in same window
(It detects $scripturl at the beginning of the link)
o Makes adjustment if using queryless urls.
o Works for both www. and non www. links

Installation
Any previous versions of this mod need to be uninstalled prior to installing this version.

Install the mod via the SMF Package Manager, and your done. It installs on ALL themes automatically as it only affects Source files.

There are NO theme edits required and there are NO language strings to translate.

Useful Links
SMF Package Parser
Manual Installation Of Mods
How Do I Modify Files?


Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 9th October 2007
o Initial release per request
1.1 - 16th October 2007
o Fixed bug with dots (.) not escaped
o Added /u modifier for when using UTF-8
1.2 - 13th February 2008
o Checked 2.0 compatible (no changes necessary)
o Improved/optimized regex pattern
o Added adjustment to use boardurl instead of scripturl if using queryless urls
o Fixed to work for www. and non www. versions
o Updated readme
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Internal Links Use Same Window
« Reply #1 on: June 10, 2008, 06:56:07 PM »
Nice but simple mod, I always get really annouyed at millions of links opening up for the one website.

One suggestion, you could also possibly get the mod to change the text displayed for the url, to the title of the thread or board that is being linked to, but keep the link the same. This functionality is very nice and its a part of other forums such as vBulletin.

Good mod anyway! :)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,630
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Internal Links Use Same Window
« Reply #2 on: June 12, 2008, 12:58:42 AM »
An Error Has Occurred!
Sorry but no mod was found



Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: Internal Links Use Same Window
« Reply #3 on: June 12, 2008, 01:20:30 AM »
strang it there for me try this link

click
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,630
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Internal Links Use Same Window
« Reply #4 on: June 12, 2008, 01:25:57 AM »
Thank you



Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: Internal Links Use Same Window
« Reply #5 on: June 12, 2008, 09:37:36 AM »
I did not install this MOD but learn about [iurl] !  ;)

Offline Tekkla

  • Jr. Member
  • **
  • Posts: 228
  • Gender: Male
  • Jupp!
    • Tekkla.de on Facebook
    • Tekkla on GitHub
    • @TheTekkster on Twitter
Re: Internal Links Use Same Window
« Reply #6 on: June 15, 2008, 06:36:14 AM »
thanks for this mod :)

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: Internal Links Use Same Window
« Reply #7 on: July 24, 2008, 09:22:41 AM »
Hi!
I have installed your mod but i have a problem:
Url like this open in the same window:
Code: [Select]
http://www.darkwolf.it/forum/index.php?topic=211.0Instead this (pretty url) open in a new window  :(
-
You can see/test here:
http://www.darkwolf.it/forum/help-desk/richieste-novita-sul-sito/msg1350/#msg1350
-
How i can fix this issue???
Thanks in advance, DarkWolf  :)
« Last Edit: January 09, 2011, 10:55:09 AM by Dark-Wolf »

Offline Polymath

  • Jr. Member
  • **
  • Posts: 337
  • Gender: Male
  • NZ Made
    • GameSocket
Re: Internal Links Use Same Window
« Reply #8 on: November 01, 2008, 06:02:16 PM »
I know this is old, but I have refrained from adding more mods. I have not even looked in mods for a long time.
In my arcade game topics I have been trying to get them to open in same tab for a long time using things like editing the whole URL with tag target="top"..

Thanks for this. It is brilliant and now all my games open in the same window from the forum link.

Cheers.
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Offline laetabi

  • Full Member
  • ***
  • Posts: 428
  • Gender: Male
Re: Internal Links Use Same Window
« Reply #9 on: January 27, 2009, 12:10:13 PM »
Simple and clever mod - works great in 2.0b4 and RC1

Thanks.
What type of washing machine is September?

An autumnatic. :)

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Internal Links Use Same Window
« Reply #10 on: September 16, 2009, 09:16:15 PM »
I was wondering - if I install this mod will target="_blank" still be respected for the times I want something to open in a new window?

Thx

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: Internal Links Use Same Window
« Reply #11 on: September 16, 2009, 09:22:59 PM »
i dont understand

all this does is make all interanl links open in same window ie all the forum links open in same window
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Internal Links Use Same Window
« Reply #12 on: September 17, 2009, 12:13:56 AM »
Once installed all internal links will open in the same window - that is great and what I want. BUT, There are times when I want a page to open in a new window - will I be able to use a target="_blank" html to make a page open in a new window even though the mod is installed?

Thx

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,994
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Internal Links Use Same Window
« Reply #13 on: January 22, 2010, 10:47:07 AM »
It works for RC2 manually installed.  Thank you.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: Internal Links Use Same Window
« Reply #14 on: January 22, 2010, 03:21:48 PM »
i always fault that link allready iopen in same window for rc2 maybe im wrong tis the reason i never updated it
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-