Provide control of what URL(s) phpBB considers "the local board."

https://www.phpbb.com/ideas/
Post Reply
Author:
EA117
Posted:
Mon Oct 21, 2019 11:46 am
Rating:
Status:
New
User avatar
EA117
Registered User
Posts: 1067
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Provide control of what URL(s) phpBB considers "the local board."

Post by EA117 » Mon Oct 21, 2019 11:46 am

I suppose it doesn't happen often enough to give the idea much traction. But every time the viewtopic.php?f=556&t=2526446 discussion gets bumped, it keeps making this idea come to mind:
  1. In the ACP, provide a multi-value edit field into which one or more partial URL prefixes could be entered. For all such entries, phpBB is intended to consider "a URL matching one of these prefixes should be considered a URL intending to reference the local phpBB board."
    • For example, the list could contain entries such as:
      1. olddomain.tld
      2. olddomain.tld/oldpath
      3. oldsubdomain.currentdomain.tld
      4. currentdomain.tld/oldpath
      • The current phpBB "URL truncation" behavior -- where a link to https://www.phpbb.com/community/viewtopic.php?f=556&t=2526446 is truncated to display as viewtopic.php?f=556&t=2526446 instead -- would be updated to refer to this new list in addition to whatever phpBB considers to be the current board URL.

        i.e. Links which match any of these optional prefixes, or which match the current board URL, will all be treated as "local board links."
        • New behavior would be introduced, to perform "local link" processing on the actual target URL of the link, in addition to the existing "display-only truncation" processing. The target URL of a matching link would be written with the matching URL prefix replaced with the prefix of the current live board.

          e.g. A link to https://olddomain.tld/oldpath/viewforum.php?f=123 would be rendered for display as a link to https://currentdomain.tld/currentpath/viewforum.php?f=123 instead.
          • Note the link target stored in the database hasn't changed, and is still the original link as written by the original link author. The modified existing and new behaviors only affect how such links will be displayed and presented, without making a permanent change to the previously-written message data.

            Not that this is by definition "better"; it actually involves slightly more overhead when rendering the link. But leaving the original data intact, for the administrator to able to re-think their decision and change the list of prefixes without "permanent change" having been written to the database, is the intention.
            So overall, just a feature within phpBB to acknowledge "these are the previous URLs of the current board." And to treat any such URL references "the same as" a reference to the current local board URL. And to present the link's target URL "as though it always was" a reference to the current local board URL.

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

            Re: Provide control of what URL(s) phpBB considers "the local board."

            Post by 3Di » Mon Oct 21, 2019 6:49 pm

            No by my side, can be done via extension as for the main reason.
            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
            👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

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

            Re: Provide control of what URL(s) phpBB considers "the local board."

            Post by EA117 » Mon Oct 21, 2019 8:23 pm

            You're right, "as an extension" probably fits this use case very well, because of the "most phpBB users will never need this at all" aspect.

            I kept thinking in terms of "phpBB is already evaluating and making a decision about each link at runtime", to determine whether phpBB considers the link to be "'a local link". And realizing that "not just the current board URL, but also prior board URLs" could be made part of this existing runtime decision process.

            But it probably will be more likely to show up in an extension's functionality, as opposed to getting adopted by the core.

            Post Reply

            Return to “phpBB Ideas”