Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SA™ on June 10, 2008, 06:49:10 PM

Title: Internal Links Use Same Window
Post by: SA™ on June 10, 2008, 06:49:10 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1255)


INTERNAL LINKS USE SAME WINDOW v1.2
By wdm2005 (http://custom.simplemachines.org/mods/index.php?action=profile;u=84438)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=+++) | Support Topic (http://www.simplemachines.org/community/index.php?topic=++++) | Demo (http://www.adrevenueshare.com/index.php?topic=25.0)

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 (http://www.adrevenueshare.com/parser)
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)


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
Title: Re: Internal Links Use Same Window
Post by: Nathaniel 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! :)
Title: Re: Internal Links Use Same Window
Post by: Apllicmz on June 12, 2008, 12:58:42 AM
An Error Has Occurred!
Sorry but no mod was found
Title: Re: Internal Links Use Same Window
Post by: SA™ on June 12, 2008, 01:20:30 AM
strang it there for me try this link

click (http://custom.simplemachines.org/mods/index.php?action=download;mod=1255;id=58292)
Title: Re: Internal Links Use Same Window
Post by: Apllicmz on June 12, 2008, 01:25:57 AM
Thank you
Title: Re: Internal Links Use Same Window
Post by: jossanaijr on June 12, 2008, 09:37:36 AM
I did not install this MOD but learn about [iurl] !  ;)
Title: Re: Internal Links Use Same Window
Post by: Tekkla on June 15, 2008, 06:36:14 AM
thanks for this mod :)
Title: Re: Internal Links Use Same Window
Post by: L'AltroWeb 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:
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  :)
Title: Re: Internal Links Use Same Window
Post by: Polymath 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.
Title: Re: Internal Links Use Same Window
Post by: willerby on January 27, 2009, 12:10:13 PM
Simple and clever mod - works great in 2.0b4 and RC1

Thanks.
Title: Re: Internal Links Use Same Window
Post by: plusev 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
Title: Re: Internal Links Use Same Window
Post by: SA™ 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
Title: Re: Internal Links Use Same Window
Post by: plusev 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
Title: Re: Internal Links Use Same Window
Post by: Mick. on January 22, 2010, 10:47:07 AM
It works for RC2 manually installed.  Thank you.
Title: Re: Internal Links Use Same Window
Post by: SA™ 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