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:
- 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:
- 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.