Unwanted links

Started by chadon, May 23, 2022, 10:37:29 AM

Previous topic - Next topic

chadon

Before SMF 2.1.2, when we typed a word followed by period and letters without a space, a link was generated automatically.

Since SMF 2.1.2 the same happens but the URL of the forum is added before the generated link.

I understand it's a good way to deactivate dead links or links to bad websites but is there a way to have no link generation at all?

Here is an example of a sentence with no space after a period.As you can see, a link was generated.

chadon

Correction. It must be specific to my forum and not SMF 2.1.2 as the "period dot as" would generate a link like https://www.simplemachines.org/community////period.as on my forum.

Kindred

mods installed?
What is your forum URL configured to be?
Сл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."

chadon

Quote from: Kindred on May 23, 2022, 01:15:35 PMmods installed?
Yes, the difference could be caused by a mod but I am also talking about the default behavior. What is happening on my forum is in fact a positive thing compared to what should have happened.

In my first post you can see I created a link that could have been against my will.

Period.as is not a valid website but we shouldn't have a link in a post when we don't want to post a link. Imagine if period.as was an adult website and my forum was a kids website, wouldn't it be a big issue?



Arantor

If you don't mean to post a link... don't post something that is a legitimate link. Put a space after punctuation.

Here's the thing - if you posted google.com wouldn't you expect that to become a link? .as is a valid domain type these days, so SMF recognises that period.as *could* be a link. Twitter does the exact same thing by the way, I started typing 'test period.as test' and sure enough period.as was linked.

I suppose SMF could verify on saving that the domain actually exists but this will slow down posting quite considerably, potentially up to 30 seconds which is enough for the server to time out, just on one link... and that's without even verifying if the link loads, that's just 'does the domain exist'.

chadon

Well I know that if I forget a space after a period, I will have a link in my post so there are very little chances it will happen.
When you have a very busy forum, all kind of users post links without even noticing it, I know I have seen them.

SMF offers BBC codes to post links so what are their purpose if links are generated automatically when you paste an URL or a domain name?
It's not something I like.It is a pain when you see unwanted links, right ?  ;D

Arantor

Firstly, because you might want to link things that aren't just the link URL.

Secondly, the autolink feature detects and then just rewrites the link to having a url bbcode around it to simplify the rest of the parsing behaviour. You *can* turn that off but it's off everywhere for all links.

Because that's really it - it *cannot know* whether you *meant* to make it a link or not. It just sees a string of characters that is a legal link (and it checks the TLD after the last dot to verify it's a real domain type) and converts it to a link.

Not all types of text.after the dot get you a link. Only the ones that aren't.legal URL forms.

chadon

I tried to make a post on Facebook with period.as and no link was generated.
If I want to post a link on Facebook, I would have to write www.period.as or https://period.as
This is for me and maybe many more website owners, normal behaviour and makes much more sense than generating links when users forget to place a space.No ?

Arantor

Like I said, Twitter accepts period.as as a link, but I suppose that's because of the nature of the shorter post length.

Thing is, there's plenty of sites that don't use www as a prefix, and the same logic in SMF is also used to identify for example.com/more/of/the/url which I think *everyone* would agree should be linked if found.

Basically you seem to want SMF to mind-read for you when a thing should be a link...?

chadon

No, I want SMF to be like it used to be. Under SMF 2.0 if my memory is right, you had to enter full URL's to have links generated and if you only entered a domain name or if you forgot the space, you had no link.

I also don't want to change SMF, my preferences are not always what is best for all. I was just wondering in my first post if there was a way to deactivate links (only when there is no [url] tag).

Oldiesmann

The auto link feature has existed since at least SMF 1.1. I think it was even included in SMF 1.0 but it's been so long that I don't even remember at this point.

Yes, you can disable that option. Admin -> Configuration -> Features and Options -> Bulletin Board Code, uncheck the "Automatically link posted URLs" setting and save.
Michael Eshom
Christian Metal Fans

chadon

Thank you Oldiesmann, that will do the job.

FrizzleFried

I've been typing on SMF forums for many years and have yet to make a single accidental URL in such a manor.  I didn't even know it was a thing.  Seems like a non-issue to me... I mean,  12+ years on an SMF site... literally over a hundred thousand posts... and not a single issue.  Better yet... 846,016 Posts in 34,642 Topics on my forum and not a single complaint.

Pfft...


Advertisement: