News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Internal Links Use Same Window

Started by SA™, June 10, 2008, 06:49:10 PM

Previous topic - Next topic

SA™

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
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Nathaniel

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.

Apllicmz

An Error Has Occurred!
Sorry but no mod was found



SA™

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

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

Apllicmz




jossanaijr

I did not install this MOD but learn about [iurl] !  ;)

Tekkla


L'AltroWeb

#7
Hi!
I have installed your mod but i have a problem:
Url like this open in the same window:
http://www.darkwolf.it/forum/index.php?topic=211.0
Instead 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  :)

Polymath

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

willerby

Simple and clever mod - works great in 2.0b4 and RC1

Thanks.
What type of washing machine is September?

An autumnatic. :)

plusev

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

SA™

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
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

plusev

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

Mick.

It works for RC2 manually installed.  Thank you.

SA™

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
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Advertisement: