Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: allkary on August 22, 2014, 02:05:26 PM

Title: URLs opening in same window
Post by: allkary on August 22, 2014, 02:05:26 PM
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/ (http://www.latorredicotone.com/forum/schemi-amigurumi/1/lumachina/34/)

Thank you so much for helping!
Title: Re: URLs opening in same window
Post by: Arantor on August 22, 2014, 02:07:11 PM
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.
Title: Re: URLs opening in same window
Post by: Ninja ZX-10RR on August 22, 2014, 02:14:13 PM
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
Title: Re: URLs opening in same window
Post by: allkary on August 22, 2014, 02:27:37 PM
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 ;)
Title: Re: URLs opening in same window
Post by: Arantor on August 22, 2014, 02:28:41 PM
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.
Title: Re: URLs opening in same window
Post by: allkary on August 22, 2014, 02:34:15 PM
I do definitely want that, but it doesn't work.
Title: Re: URLs opening in same window
Post by: Arantor on August 22, 2014, 02:35:17 PM
How are you putting links in, exactly?

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

[iurl]https://www.google.com/[/iurl]
Title: Re: URLs opening in same window
Post by: allkary on August 22, 2014, 02:38:58 PM
The one I posted above is a user link and is make using the [url] tag, I saw it editind her post.
Title: Re: URLs opening in same window
Post by: 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?
Title: Re: URLs opening in same window
Post by: 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 (http://"http://google.com")
Title: Re: URLs opening in same window
Post by: Ninja ZX-10RR on August 23, 2014, 09:09:50 AM
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
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 09:12:10 AM
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.
Title: Re: URLs opening in same window
Post by: Ninja ZX-10RR on August 23, 2014, 09:12:53 AM
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 (http://"http://google.com')
Wrong.
[iurl=http://google.com]Whatever[/iurl] is correct ;)

EDIT: lol it was edited for good :)
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 09:24:30 AM
Doesn't the IURL code open links in same window?
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 09:25:10 AM
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.
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 09:30:16 AM
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 (http://www.latorredicotone.com/forum/index.php?topic=34.0)
Title: Re: URLs opening in same window
Post by: Kindred on August 23, 2014, 09:32:44 AM
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.
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 09:35:42 AM
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.
Title: Re: URLs opening in same window
Post by: 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.
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 09:39:57 AM
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.
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 09:42:57 AM
Do you think it can be the seo mod? It is a premium I paid for  :'(
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 09:51:44 AM
It looks like it might be related to the SEO mod looking at it.

If you've paid for it, I'd ask the author about it.
Title: Re: URLs opening in same window
Post by: Kindred on August 23, 2014, 09:52:10 AM
What seo mod did you use?


And Arantor...   Oops... I had it reversed.
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 09:59:31 AM
It's the SMF Seo Premium Pack http://custom.simplemachines.org/mods/index.php?mod=3082 (http://custom.simplemachines.org/mods/index.php?mod=3082)

Thanks for your support, I'll go asking the author.   :)
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 10:00:17 AM
Good luck getting support.
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 10:03:39 AM
Mh, you don't seem to be encouraging  :D
Anyway, I have problems with the pretty urls function too of that mod...
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 10:05:43 AM
That's because I've seen people have trouble getting support out of the author :(
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 10:08:58 AM
Well, I was expecting a premium mod to work the way it should on a brand new installation (it costs 50$!) and this is not really comforting  >:(
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 10:13:03 AM
Honestly, the best thing right now is to try and take it up with the author and see where that gets you. You might be lucky, but I'd suggest not to get your hopes up.
Title: Re: URLs opening in same window
Post by: allkary on August 23, 2014, 10:20:01 AM
 I'll try to get a paypal refund if he doesn't solve my problem.
Thanks a lot for your support!  ;)
Title: Re: URLs opening in same window
Post by: Arantor on August 23, 2014, 10:24:41 AM
I'd like to think you'll get satisfaction but I've seen a few nasty cases in the past :(

Go for it :)
Title: Re: URLs opening in same window
Post by: Ninja ZX-10RR on August 23, 2014, 10:39:37 AM
*Ninja quotes Interrobang VERY much and had a very bad argue with the mod author as well*
but anyway kindly bug him until he fixes it or either you get a refund (very much unlikely) ;)
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 08:28:16 AM
Ok I turned off the SEO mod and all links just open the way they should. I've addeed a nofollow mod and everything seems to be fine.
Except sometimes when opening threads I get a 404 error which disappear when pressing ctrl+F5. Is it a caching issue or something?
Title: Re: URLs opening in same window
Post by: Kindred on August 24, 2014, 08:29:35 AM
just out of curiosity, which nofollow mod did you add?
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 08:34:22 AM
I's from the same Seo pack's author, NoFollow All Links v1.2.1
Title: Re: URLs opening in same window
Post by: Kindred on August 24, 2014, 10:06:16 AM
right....   so, if you nofollow ALL links, then you are actually going to HURT your SEO.
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 11:12:02 AM
I did not find any updated plugin that allow me to nofollow just external links, so I had to use this one atm. If you can suggest me a better nofollow plugin, I'll be glad to try it  :)
Title: Re: URLs opening in same window
Post by: Arantor on August 24, 2014, 11:13:05 AM
We're recommending not using nofollow...
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 11:25:51 AM
That's not a good choice for me as I don't want to pass page rank to poor websites. I understand your need of getting backlinks, and if that's the reason I can provide one from my main site, no problem. But I don't want to follow all links my users could add to their posts.
Title: Re: URLs opening in same window
Post by: Arantor on August 24, 2014, 11:31:00 AM
No, it's nothing to do with us getting backlinks at all.

If you don't trust external links, you yourself receive a penalty in so doing. Both inbound and outbound links are relevant for ranking purposes and you not linking to other sources actually has a habit of penalising you for being untrustworthy yourself and has been the case for some time now.
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 11:40:41 AM
Look, I don't want to start a SEO debate as it is not the right place, nor I'm interested in discussing about that here. I have my own reasons for nofollowing external links so please, if you can suggest a better plugin that separate internal from external and does work with last SMF version, I'd be happy to try it out  :)
Title: Re: URLs opening in same window
Post by: Kindred on August 24, 2014, 11:44:46 AM
There is a mod for affecting links only to a certain post count, which is what we use here...  This prevent spammers from adding links, but will allow you to build search engine mojo with links from older members.

Also, as we have already noted, the so called seo pack is, for the most part, pointless, and will likely conflict with other things
Title: Re: URLs opening in same window
Post by: Arantor on August 24, 2014, 11:49:53 AM
Except it is the right place. You're asking for advice, we are advising you that what you want to do is a bad idea, and even why it is a bad idea. Google already places huge penalties on UGC sites as it is, without you making it worse with 'advice' you've received from 'SEO experts' most of whom have not spent years working with UGC sites figuring out what works and what doesn't.

When even Matt Cutts from Google himself will tell you this... http://searchengineland.com/friends-dont-let-friends-use-nofollow-77922 for example... maybe it's better to listen.

It has always been more important to get good quality links in than it has to worry about lesser quality links out.

No worries, though, hope it works out for you.
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 12:25:10 PM
That little words from Matt Cutts have been used to make people believe he was talking about external link. Instead, he was talking about internal linksactually and page rank sculpting (page rank sculpting is a tecnic used to make page rank flow from internal pages to get a readable and surfable site architecture for bots and spiders other than users).
The question regarding that particular answer was "Q: Does this mean "PageRank sculpting" (trying to change how PageRank flows within your site using e.g. nofollow) is a bad idea?" You can read the entire article here https://www.mattcutts.com/blog/pagerank-sculpting/ (https://www.mattcutts.com/blog/pagerank-sculpting/). Anyhow it is outdated as it's from 2009...

If you want to get some more fresh informations about that, just look at this video from Matt Cutts itself https://www.youtube.com/watch?v=QSEqypgIJME (https://www.youtube.com/watch?v=QSEqypgIJME)
Title: Re: URLs opening in same window
Post by: Arantor on August 24, 2014, 12:30:22 PM
Except since Penguin we've seen huge penalties applied to UGC sites and *moreso* to those with nofollow. Even your advice is a year old and predates the last major algorithmic changes.

*shrug* Have fun with it.
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 12:39:38 PM
Anyway, what was the name of that mod?
Title: Re: URLs opening in same window
Post by: Kindred on August 24, 2014, 01:05:34 PM
I'm on a mobile device right now. So I can't really look it up for you. However I believe the name is something like anti-spam links
Title: Re: URLs opening in same window
Post by: Ninja ZX-10RR on August 24, 2014, 03:20:45 PM
Quote from: Kindred on August 24, 2014, 01:05:34 PM
I'm on a mobile device right now. So I can't really look it up for you. However I believe the name is something like anti-spam links
Yup, searching those exact words brought me here --> http://custom.simplemachines.org/mods/index.php?mod=2404 :)
Title: Re: URLs opening in same window
Post by: allkary on August 24, 2014, 05:11:17 PM
Thanks a lot to everyone  ;)