News:

Wondering if this will always be free?  See why free is better.

Main Menu

URLs opening in same window

Started by allkary, August 22, 2014, 02:05:26 PM

Previous topic - Next topic

allkary

Hello, I'm pretty new here and I'm having some issues in setting up the forum correctly. I'm working on it for about a week but I keep reading this forum to solve my problems. I have really no knowledge of coding, I'm a blogger and all I know is writing and keeping a community so, please, don't be mad at me for asking this very question  :-[
Well, I installed the Sunshine theme, I bought a premium SEO mod and I have few other mods installed like smilies, custom tabs, Global Headers Footers and Ad Management.
Well, I found out that all my posted links do open in the same window even if with firebug I see the Target=blank correctly working. I made a forum search and I've read of someone asking about iurls but I don't really know what that means and how to fix that. I also tried to delete all plugins (so much work!) and nothing changed.
Can anyone please help me in debugging my forum?
You can see a link example at this place http://www.latorredicotone.com/forum/schemi-amigurumi/1/lumachina/34/ [nofollow]

Thank you so much for helping!

Arantor

You have the url bbcode which forces links into a new tab/window. The iurl bbcode behaves exactly the same as the url bbcode except without pushing it to a new tab.

Ninja ZX-10RR

Wait... Actually it's the default behaviour. If you click on something it opens in the same page... It's like this everywhere :| and if you need to open something in a new tab just right click on it and ress open in a new tab? Or use the [nobbc][url][/nobb] tag;)
P.s. Italiano pure io :P

EDIT: ninja'd, gf's fault v.v
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

allkary

I thought that SMF behaviour was set to open links in new tabs. Well, this is what should happen looking at the source code of that link I posted in previous message
<a href="http://www.latorredicotone.com/forum/seored/u=aHR0cDovL3BlcmxhY3JvY2hldC5ibG9nc3BvdC5pdC8yMDEzLzA4L3R1dG9yaWFsLWx1bWFjaGluYS5odG1s" rel="nofollow" onclick="recordOutboundLink(this, 'Outbound Links', 'http://perlacrochet.blogspot.it/2013/08/tutorial-lumachina.html'); return false;" class="bbc_link new_win" target="_blank">Perlacrochet: Tutorial Lumachina</a>

The " class="bbc_link new_win" target="_blank"" is what should make it opening outside the forum, isn't it?

@Ninja: buono a sapersi ;)

Arantor

Yes, it is that. And it is done that way because the url bbcode is what makes it do that. If you don't want that, use iurl bbcode instead.

allkary

I do definitely want that, but it doesn't work.

Arantor

How are you putting links in, exactly?

Because this works:
https://www.google.com/

[iurl]https://www.google.com/[/iurl]

allkary

The one I posted above is a user link and is make using the [url] tag, I saw it editind her post.

allkary

Sorry for bothering, I know you have many things to do other than looking at my problem but I was wondering if there should be a way to overwrite the code using a "Important" tag or something like that?

supernova777

you can also do it like this:
[iurl="http://google.com"]click me[/iurl]

click me

Ninja ZX-10RR

Quote from: allkary on August 23, 2014, 09:06:07 AM
Sorry for bothering, I know you have many things to do other than looking at my problem but I was wondering if there should be a way to overwrite the code using a "Important" tag or something like that?
What do you mean with "important" tag? O.O
Btw there is a custom BBC mod if you need it... Even if I think that it's not really what you are looking for: http://custom.simplemachines.org/mods/index.php?mod=3864
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

Quote from: allkary on August 23, 2014, 09:06:07 AM
Sorry for bothering, I know you have many things to do other than looking at my problem but I was wondering if there should be a way to overwrite the code using a "Important" tag or something like that?

No, there isn't. The only option you have without redefining the url bbcode is the iurl bbcode as already outlined.

Ninja ZX-10RR

Quote from: supernova777 on August 23, 2014, 09:08:54 AM
you can also do it like this:
[iurl="http://google.com']click me[/iurl]

click me
Wrong.
[iurl=http://google.com]Whatever[/iurl] is correct ;)

EDIT: lol it was edited for good :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

allkary

Doesn't the IURL code open links in same window?

Arantor

Yes it does. That's the difference - url always opens to an external window, iurl always opens to the same window, like has been said already.

The i stands for internal - the idea being that you would use that for internal links within the site.

allkary

I'm sorry, I guess I did not explain my problem clearly.
Currently all the links people add to their posts do open in the same window, even if the code seems working fine (I inspected the link with firebug and everything is ok). I was wondering how this happened and if there is a way to make it working the correct way. My installation is brand new, I've just few mods installed and I never touched the code myself.

In this post you can see an example of link a user adeed, opening in same window http://www.latorredicotone.com/forum/index.php?topic=34.0 [nofollow]

Kindred

Well, their statements were partially incorrect.

By default, the URL tag opens a page without any argument on the link tag...

Which means that the link will default to the behavior of the BROWSER settings.  So, if they have set their browser settings to use the same window, that is what the URL tag will trigger.

The iurl tag specifically called out to use the same window.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

One of your mods has broken it. If you examine the link in your post, you will see there is an onclick event attached to that link, which is doing something to break the link's behaviour. Since that's not standard SMF code... it must be a mod you've installed.

QuoteBy default, the URL tag opens a page without any argument on the link tag...

The url bbcode explicitly declares target=_blank as per lines 1568 and 1578, vs iurl which does not pre-empt any browser behaviour as per lines 1289 and 1299.

allkary

Yes and my code do have the target=blank tag, but still it doesn't work. Of course I don't want my users to leave the forum when following links.

Arantor

Quote from: allkary on August 23, 2014, 09:37:29 AM
Yes and my code do have the target=blank tag, but still it doesn't work. Of course I don't want my users to leave the forum when following links.

Then you need to remove whatever mod it is that has been added, because all the additional code relating to outbound links is interfering so that it will work as it is supposed to.

Advertisement: