Some URLs are automatically shortened in 3.1, not anymore in 3.2. I opened a PR for it but I know little about how it worked in 3.1 and what its purpose was. I read various comments about it and I'm afraid that people have different assumptions about it.
If you have any input about shortening links' text, let it be heard now or forever be ignored.
If you can't make a full post now, at least leave a comment to signal your intention to post at a later time.
Current PR works slightly differently from 3.1.
It shortens URLs posted as text as well as [url]...[/url] tags with no parameters. Does not apply to [url=...]...[/url]
The canonical URL of the board is determined at caching time because running generate_board_url() at posting time slightly scares me. It can be changed easily if someone can confirm that running generate_board_url() at posting time will not create a dependency nightmare, especially during testing.
All of it could be implemented as an extension.
Last edited by JoshyPHP on Thu Jan 07, 2016 8:06 pm, edited 1 time in total.
There was a function that would take care of shortening the URL in 3.1, correct? So shouldn't whatever the logic that was being done in that 3.1 function still be in place for 3.2? Not sure why there's different assumptions being brought up about it.
Because there are a bunch of bug reports about that functionality too. Instead of copy/pasting the same thing and end up with the same issues, now would be the time to rethink it properly.
Also, make_clickable() and make_clickable_callback() take about ~200 lines, they do multiple things and the logic is not always immediately apparent.
This! While I have no doubt that shortening URLs has it's benefits, it also has drawbacks - the worst being you quote a post with a link like http://www.phpbb.com/community/viewtop...56 and it turns out exactly like that (obviously I made up the URL). I believe the same thing happens if you right click the link and select "Copy link address", but I'm not 100% sure on this.
also as I pointed out in one of those tickets there needs to be some html changes to the output to allow for better control of the overall styling. basically adding a wrapping span around the text with a class on it... something simple like post-link-text
kinerity wrote: ↑Sat Jan 02, 2016 3:00 am
I believe the same thing happens if you right click the link and select "Copy link address", but I'm not 100% sure on this.
That would mean it was broken, which it wasn't. Quoting a shortened link would keep it short but the link would still work properly.
hanakin wrote: ↑Mon Jan 04, 2016 5:59 am
also as I pointed out in one of those tickets there needs to be some html changes to the output to allow for better control of the overall styling. basically adding a wrapping span around the text with a class on it... something simple like post-link-text
DavidIQ wrote: ↑Mon Jan 04, 2016 1:41 pm That would mean it was broken, which it wasn't. Quoting a shortened link would keep it short but the link would still work properly.
I seem to remember this being a problem, but can't find the post now.
You say it works slightly different form 3.1 but only state the way it works using your change. Please state what it used to work like on 3.1 for easier comparison.
Also, using generate_board_url() at caching time sounds fine to me, as the canonical URL should not change between cache refreshes.