Change internal topic links to their title

https://www.phpbb.com/ideas/
Post Reply
Author:
Toxyy
Posted:
Sat May 16, 2020 9:37 pm
Rating:
Status:
User avatar
Toxyy
Registered User
Posts: 733
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Change internal topic links to their title

Post by Toxyy »

As I mentioned in my reply to the other phpbb seo url suggestion recently, I can see a benefit in changing internal links within posts from being auto rewritten like this:
viewtopic.php?f=661&p=15507106#p15507106

to this:
Re: No access to page or adm after 3.2.1 to 3.3.0 update

(possibly the original topic title for normal posts, without re? perhaps not)
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
3Di
Former Team Member
Posts: 15415
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Change internal topic links to their title

Post by 3Di »

Duplicates viewtopic.php?f=436&t=2553061

which duplicates something else. Hence I duplicated my downvoting. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
Toxyy
Registered User
Posts: 733
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Change internal topic links to their title

Post by Toxyy »

3Di wrote:
Sat May 16, 2020 9:54 pm
Duplicates viewtopic.php?f=436&t=2553061

which duplicates something else. ;)
This is a different suggestion, not changing all internal links everywhere as the usual seo url suggestion, only link text within posts (not the link itself).
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
3Di
Former Team Member
Posts: 15415
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Change internal topic links to their title

Post by 3Di »

Ah, same applies though.

Having slugs for links I know by experience it is not that good. My opinion.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
warmweer
Jr. Extension Validator
Posts: 4462
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Change internal topic links to their title

Post by warmweer »

As an extension: nothing against that.
As a defaultsystem: absolutely not (reason: too many non-sensical topic titles.
We should embrace problems, without which there wouldn't be any solutions.

User avatar
AmigoJack
Registered User
Posts: 5715
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Change internal topic links to their title

Post by AmigoJack »

Automatically making the link text the subject of a post/title of a topic bypasses access restrictions: the posting member may have access to what the URL links to, but others may not and the subject/title may already be confidential.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
Toxyy
Registered User
Posts: 733
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Change internal topic links to their title

Post by Toxyy »

AmigoJack wrote:
Tue May 19, 2020 7:29 am
the posting member may have access to what the URL links to, but others may not
The link would still work, as they do here, you could right click and copy link as you would anywhere else.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
AmigoJack
Registered User
Posts: 5715
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Change internal topic links to their title

Post by AmigoJack »

That (the link address) was neither the point, nor is it an issue - the link text is the issue: while it is obvious to those having access to the URI target, others who don't have access would now see the (potentially confidential) text nonetheless, i.e. a post subject or topic title that wouldn't be known to them by default. I don't know why you disregarded this from my text and only focused on the sideshow.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
Toxyy
Registered User
Posts: 733
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Change internal topic links to their title

Post by Toxyy »

Ah I understand now, I got confused by the the posting member may have access to what the URL links to, but others may not part.

That's a good point about permissions. Without looking into it too much I can assume it would be a bit resource intensive to check the viewing member's permissions of each link in this case. The first ideas that come to mind are that a more crude but less resource intensive approach, I assume, would be to either have an option to allow it per forum, or only rewrite the links in which all groups have access to.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
EA117
Registered User
Posts: 1601
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Change internal topic links to their title

Post by EA117 »

warmweer wrote:
Mon May 18, 2020 8:01 pm
As a defaultsystem: absolutely not (reason: too many non-sensical topic titles.
That one just made me chuckle. 😁 "Showing the post subject might possibly appear nonsensical, therefore we should continue showing links that are indistinguishable from π to ten decimal places instead..." At least when showing the post subject, the opportunity to make sense exists. As opposed to now, where "it will never make sense."

Information disclosure is definitely a necessary consideration though. I could sit in post Preview mode and "probe" for forums and message subjects I don't have access to actually see.

Maybe we split the difference and consider the alternative of making it easy for the post author to insert a link to an existing post that uses a descriptive title instead of just the raw link. You know, like Microsoft's Clippy™ popping up when you're attempting to include a link and saying "I see you're trying to link to an existing post on this board...."

I'm kidding. I mean anything as simple as just making a new BBCode like [post][/post] to wrap the link in instead of [url][/url], when the post author's intention is to automatically pull the post title in addition to linking to the post. Access check will be for whether the post author has access to the post being linked, since at that point they're at liberty to disclose the post subject in their message, whether the subject text was being automatically pulled or not.


edit: As I continue to think about it, maybe the "access check only for the post author" applies even to Toxyy's original idea, too.

e.g. What if the "replace links to this board with the title of the post" isn't a "when viewtopic.php renders the message" action, like the current URL shortening behavior. And was instead an "at the time of posting" action, when the links will be converted into literal [url=viewtopic.php?r2&d2&c3&p0]subject description[/url] references instead of just the raw URL.

i.e. No different than if the post author themselves had chosen to do that. And if the post author didn't have access to the post being linked to, simply no replacement will be performed and the raw link will be included as-is.

Subsequent viewers of the posted message have no new access check, since they're simply reading the posted message, same as if the post author had manually typed in the same description.

Similar to the existing "Do not automatically parse URLs" checkbox underneath the post editor, there could be a checkbox for opting-in or opting-out of this behavior if needed.

User avatar
AmigoJack
Registered User
Posts: 5715
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Change internal topic links to their title

Post by AmigoJack »

EA117 wrote:
Wed May 20, 2020 2:14 pm
instead an "at the time of posting" action, when the links will be converted into literal
Then what happens to border cases?
  • A topic's title/post's subject changes: should all link texts in posts change, too?
  • A topic/post is moved to a (topic in a) different forum, so access differs: should all link texts in posts change, too?
  • A post's author is changed and the new author can have more/less/different access: should it be impossible to edit the post's text so previously "allowed" link texts continue to be allowed, even if the new author has no access to the link address?
  • Do not forget I can easily use the board search to get a full list of all posts containing links in full, so I can still brute-force thru all those available to me to gather topic titles/post subjects out of the link texts from forums that were available to others but who didn't mind editing their posted links.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
JoshyPHP
Code Contributor
Posts: 1111
Joined: Mon Jul 11, 2011 12:28 am

Re: Change internal topic links to their title

Post by JoshyPHP »

EA117 wrote:
Wed May 20, 2020 2:14 pm
i.e. No different than if the post author themselves had chosen to do that. And if the post author didn't have access to the post being linked to, simply no replacement will be performed and the raw link will be included as-is.
A while ago I wrote a proof of concept that does exactly that. It's easy to implement as an extension, there are probably 5 different ways to do it.
I wrote the thing that does BBCodes in 3.2+.

User avatar
EA117
Registered User
Posts: 1601
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Change internal topic links to their title

Post by EA117 »

AmigoJack wrote:
Wed May 20, 2020 4:36 pm
Then what happens to border cases?
100% the same thing that happens right now whenever the user chooses to manually create a more descriptive link, like Change internal topic links to their title. Nothing requires that the text I just wrote "remains a correct description of the post"; it just normally will remain correct. If someone deletes that post, or moves it somewhere no one can access it, my link still looks pretty and has a helpful description but is now useless when you click on it. Same as if it was an ugly viewtopic.php?r2&d2&c3&p0 link.

JoshyPHP wrote:
Wed May 20, 2020 7:20 pm
A while ago I wrote a proof of concept that does exactly that.
Neat. I'm still not familiar enough with the parsing framework to understand completely what is happening and when this code would actually become invoked; but I can see the access check and fetching of the replacement text within the helper. Thanks, that looks like it's going to be really helpful to someone who actually knows what they're doing in that code.

User avatar
Toxyy
Registered User
Posts: 733
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Change internal topic links to their title

Post by Toxyy »

AmigoJack wrote:
Wed May 20, 2020 4:36 pm
  • A topic's title/post's subject changes: should all link texts in posts change, too?
  • A topic/post is moved to a (topic in a) different forum, so access differs: should all link texts in posts change, too?
  • A post's author is changed and the new author can have more/less/different access: should it be impossible to edit the post's text so previously "allowed" link texts continue to be allowed, even if the new author has no access to the link address?
EA117 wrote:
Wed May 20, 2020 10:36 pm
If someone deletes that post, or moves it somewhere no one can access it, my link still looks pretty and has a helpful description but is now useless when you click on it. Same as if it was an ugly viewtopic.php?r2&d2&c3&p0 link.
That's why I'm thinking that it should be rewritten maybe on the fly instead of utilizing existing bbcode ([url=title_here]somelink[/url]), so that old posts containing these kinds of links would reflect new changes/deletions/moves. Can't think of a way to not bog down the database with that though. This kind of solution should resolve some of AmigoJack's points.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

Post Reply

Return to “phpBB Ideas”