PHPBB3-14323 / PHPBB3-14332 - Link shortening

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Current releases are 3.2/Rhea and 3.3/Proteus.
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 185
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by Marc »

Tested the URL shortening on 3.1 now:
url_shortening.png
It seems like 3.1.x did not shorten URLs posted inside [url] not matter if using just [url] or [url=...]...[/url].
This does seem more consistent to me than what your change seems to do for 3.2.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by JoshyPHP »

Yes, as I mentionned in the first post this part is definitively different. IMO it's more consistent to treat [url] with no params the same way as no BBCode at all. Consider the three:
  1. http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721
  2. [url]http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721[/url]
  3. [url=http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721]text[/url]
In the first example, the user did not specify a text for the link so anything goes. In the third example, the user did specify a URL and a text for the link so the intent is clear. In the second example, the user gave a URL but no descriptive text for the link so I don't see it as being different from the first.

With that said, I really don't care either way so I removed it from the PR.
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
I assume this is not specific to shortened link and more of a general issue, correct? If so, that's something that'd be better tackled as part of a different PR.
kinerity wrote: Tue Jan 05, 2016 4:04 am I seem to remember this being a problem, but can't find the post now. :oops:
I read similar bug reports from 3.0 dating a few years back. If it's the same bug, it's been fixed since then.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by hanakin »

Can be separate although somewhat related to allow but control prevent text wrap
Donations welcome via Paypal Image

User avatar
Elsensee
Former Team Member
Posts: 42
Joined: Sun Mar 16, 2014 1:08 pm
Location: Hamburg, Germany
Contact:

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by Elsensee »

Well I think of the url tag as an explicit call to the parser that "here really comes a link, so pay attention!". That I wanted to show the link in his whole length.
You could also ask why we need a url bbcode anymore then if they have the same behaviour.

I don't know, I just like the old behaviour more, but if most users want this behaviour to be changed, I'll not be in your way. ;)

User avatar
Un1matr1x
Registered User
Posts: 48
Joined: Mon Sep 07, 2009 10:18 pm

no Link shortening

Post by Un1matr1x »

Why use link shortening @ all?

The best way would be to leaf it out of the core an make a offical extension, but this are only my 2 cents

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by CHItA »

JoshyPHP wrote: Thu Jan 07, 2016 8:01 pm
  1. http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721
  2. [url]http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721[/url]
  3. [url=http://area51.phpbb.com/phpBB/viewtopic.php?p=286721#p286721]text[/url]
In the first example, the user did not specify a text for the link so anything goes. In the third example, the user did specify a URL and a text for the link so the intent is clear. In the second example, the user gave a URL but no descriptive text for the link so I don't see it as being different from the first.
+1 for this

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: no Link shortening

Post by DavidIQ »

Un1matr1x wrote: Fri Jan 08, 2016 8:02 am Why use link shortening @ all?

The best way would be to leaf it out of the core an make a offical extension, but this are only my 2 cents
It was a core feature that was removed by accident after an extensive upgrade to the BBCode parser, so no it won't become an official extension at all. Besides it's not "true" link shortening anyways, like through bit.ly, so there's very little reason to make it an official extension.
Image

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 185
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by Marc »

I'd like to change my opinion here. With [url =... ] one specifies a link title that shouldn't be shortened. However, this does not matter for either plain URLs or URLs posted inside a normal [url] BBCode. Therefore I think shortening plain URLs and URLs inside [url] makes more sense.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by hanakin »

Marc wrote: Tue Jan 12, 2016 3:38 am I'd like to change my opinion here. With [url =... ] one specifies a link title that shouldn't be shortened. However, this does not matter for either plain URLs or URLs posted inside a normal [url] BBCode. Therefore I think shortening plain URLs and URLs inside [url] makes more sense.
combined with proper use of text-overflow styling this should be fine. I usually post links on their own line so the only issue for me is mobile which can be handled via css text-overflow coupled with the changes I recommended to the output of the links from the core having wrapping spans with a class of postlink-text
Donations welcome via Paypal Image

User avatar
mrgoldy
Former Team Member
Posts: 64
Joined: Fri Dec 18, 2015 9:41 pm
Location: The Netherlands
Contact:

Re: PHPBB3-14323 / PHPBB3-14332 - Link shortening

Post by mrgoldy »

kinerity wrote: Tue Jan 05, 2016 4:04 am
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. :oops:
I just quoted a post from KevC on phpBB.com which only contained a single (internal) url. Now the quote url isn't a link anymore, eventhough I did nothing to adjust it / edit. Just simply clicked 'Reply with quote'. Not sure if this is desired or not? Seems to me like it should still be a 'clickable' link.

phpBB Forum link: https://www.phpbb.com/community/viewtop ... #p14315396
Screenshot for the lazy among us:
Image

The post content:

Code: Select all

[quote="KevC"]https://www.phpbb.com/community/viewtopic.php?f=456&t=2296866&p=14025846&hilit=anonymous#p14025846[/quote]
This extension is also marked as Abandoned and in the Abandoned Extensions Forum so should not be used either.

I do not know of an extension currently in development that does this.

Post Reply