News:

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

Main Menu

TS3 / Steam / Application Links

Started by SniperFodder, November 19, 2010, 05:23:37 AM

Previous topic - Next topic

SniperFodder

Howdy!

So... I recently got a SMF forum installed and It was wonderfully a breeze! However I have run across the problem that the url bbcode automatically inserts http:// in front of any link you insert. This is a problem because if someone is linking to an application, for instance TS3, the link now no longer works.

Example...

I have a TS3 server. I want to provide a link in a post to that TS3 server so people can just click it to join. The URL required to activate TS3 is ts3server://endofevolution.com?port=9987

However, the URL BBCode turns it into
http://ts3server://endofevolution.com?port=9987

When that occurs, Your browser tries to visit a webpage which doesn't exist instead of passing the link to TS3. The same would apply for other applications like Steam that accept application links...

So... Is there any way I can turn off the behaviour of adding http:// to a url?

Illori

do you have any mods on your forum? I did a preview of a post with your example link on my 1.1.12 forum and had no issues with it turning into a url link with http added.

SniperFodder

Negative. Brand spanking new install on that baby. Actually wait, I did install one mode. It was a LMGTFY Link mode. It transforms text into a LMGTFY link.

Also, I don't think it shows up in the preview. Did you actually post it?

Paul_Pauline

I can confirm what Illori has said, nothing is added to whatever you enter between the url tags.

I run a forum that has quite a lot of modifications and has been through several upgrades, this would suggest the problem is local to yourself.

"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

SniperFodder

#4
What browsers are you guys using?

I'm running Firefox....

EDIT: I tested in IE8 with the same results.

Are you actually posting the post?

Also, Idk if this is a difference (Didn't seem to be) but I'm using the following for the actual link...

[url=ts3://endofevolution.com?port=9987&bookmark=1]here[/url]

After I save the post, and go to modify it, It then looks like this...

[url=http://ts3://endofevolution.com?port=9987&bookmark=1]here[/url]

Robert.

I'm running Firefox to and nothing is added to the urls. ;)

Paul_Pauline

"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

SniperFodder

Quote from: SniperFodder on November 20, 2010, 06:03:10 AM
Are you actually posting the post?

Also, Idk if this is a difference (Didn't seem to be) but I'm using the following for the actual link...

[url=ts3://endofevolution.com?port=9987&bookmark=1]here[/url]

After I save the post, and go to modify it, It then looks like this...

[url=http://ts3://endofevolution.com?port=9987&bookmark=1]here[/url]

Are you doing this on your forums? Or on mine?

http://forum.endofevolution.com/index.php?topic=3.0

↑ The actual post where this is happening.

Also, I did try the hyperlink button. Using regular //bbcode%20results%20in%20the%20following%20after%20posting...[code][url=http://ts3://endofevolution.com?port=9987&bookmark=1]ts3://endofevolution.com?port=9987&bookmark=1 [nofollow][/code]

Paul_Pauline

Hmmm.


The issue seems to be that you want "Here" to show, rather than the url !

It doesn't add http to standard links.
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

SniperFodder

Of course I want "here" displayed instead of that long link. It looks prettier and more proffesional. Also, just tested and it doesn't matter if do

[url]ts3://endofevolution.com?port=9987&bookmark=1[/url]

or

[url=ts3://endofevolution.com?port=9987&bookmark=1]here[/url]

The same behavior is displayed either way.

Paul_Pauline

#10
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

Illori

i dont think what you want to do can be done with the url bbc code, and may require a new bbc for your forum to be created.

SniperFodder

So in other words... what you are saying, is that by default... the URL BBC Consistently modifies URL's used with it by appending http:// to the front if it isn't detected?

That seems kind of lame. Honestly the forum shouldn't be trying to correct my URL's....

Paul_Pauline

No, it seems not !

The link doesn't work, and when you hit modify to take a look at the post it has added the http   :-\
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

Robert.

Admin --> Messages and Topics --> Bulletin Board Code --> Automatically link urls
Unselect it and save ;) Dunno the exact english names. :P

SniperFodder

Tested. Still adds http:// to the front of the url.

Illori


MrPhil

SMF has code to autolink URLs. It recognizes http(s): and ftp(s):, and mailto: in some cases. Perhaps some other protocols could be added to the list, such as "ts3server:"? Is this just with the 'url' tag or are autolinks done too? Start looking with /Sources/Subs.php... I think that's where it's handled, especially for the 'url' BBCode tag. I see that the 'url' BBCode looks for http: and https:, and nothing else (and then adds http: if http:/https: isn't found). You might be able to add ts3server: to 'url', or make a whole new BBCode tag [ts3] that otherwise behaves like 'url'.

SniperFodder

Quote from: MrPhil on November 20, 2010, 10:55:42 AM
SMF has code to autolink URLs. It recognizes http(s): and ftp(s):, and mailto: in some cases. Perhaps some other protocols could be added to the list, such as "ts3server:"? Is this just with the 'url' tag or are autolinks done too? Start looking with /Sources/Subs.php... I think that's where it's handled, especially for the 'url' BBCode tag. I see that the 'url' BBCode looks for http: and https:, and nothing else (and then adds http: if http:/https: isn't found). You might be able to add ts3server: to 'url', or make a whole new BBCode tag [ts3] that otherwise behaves like 'url'.

This is for the URL Tag. And that defeats the purpose of the URL tag. Other forum software that implements BBCode does not add http:// or https:// to a link if it doesn't exist...

MrPhil

Well, my point was that SMF adds "http://" if there isn't already an "http://" or "https://". You would just add additional protocols to the list (e.g., "ts3server://") to be recognized so "http://" isn't added. You could even allow "any" protocol: [a-zA-Z0-9]+:// to suppress adding the default http, but for an anchor link <a> there are probably only a few valid protocols, so it doesn't hurt to explicitly list them. It remains an open question how to handle an invalid protocol (e.g., "htp://") -- simply slapping "http://" in front of it won't do much good.

What would be the point of a [url] tag if it didn't add "http://" when there was no protocol already given? It would not form a legitimate link (<a> tag).

Advertisement: