Camen Design Forum

Problem with IP Address links

append delete Ashley

There seems to be a slight issue with links to addresses that use numbers instead of words.

For example, I'm using the forum software on a LAN, and I need to link to an app in posts. The address of the app is of the form http:// http://10.16.41.39:9021/roll.php?action=find&id=5c128edee1f06090110250

However, this link will not work, as the generated link stops at the port number.

Is there a quick way to get around this?

Reply RSS

Replies

append delete #1. Martijn

Hmm. Maybe. I haven’t tested this, but if you look in functions.php on line 222 [1] you’ll find where the last part of a domain is found. Behind it you could add a check for port numbers, making the line:

% New line 222 of functions.php
                        (?:\.[\p{L}\p{M}\p{N}]+)+(?::\d+)?              # TLDs (also letters, diacritics & numbers only), optionally followed by port
%

Again, this is not tested. Regular expressions for finding URLs in running text are always a little spooky so I give no guarantees.

[1]: https://github.com/Kroc/NoNonsenseForum/blob/e8a996c6cd3eb97c9de8762e3aa31b3b29508f93/lib/functions.php#L222

append delete #2. Ashley

That worked!
Thank you very much.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn