club-1 / flarum-ext-cross-references

Add cross reference links when a discussion is mentioned from another one.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Add an option to disable the "retrofit" of the links of old messages in the frontend #38

Closed n-peugnet closed 1 year ago

n-peugnet commented 1 year ago

Replacing links content in the frontend was the very first way to "beautify" the links in comments. Now that the TextFormatter configuration (#4) is done properly, this feature is only used to "retrofit" the comments posted before the installation of the extension.

It has a certain number of issues as @rob006 pointed out:

Performance. Even server-side parsing is sub-optimal, since it queries discussion one by one, so 100 links = 100 extra queries. But that is acceptable, it should not happen that often. The same problem on JS level is way worse, but I can live with that too. But the fact that there is a visible delay between loading the original link and replacing it with the discussion title is too much - it shifts post content and it looks really ugly.

This feature will be completely obsolete once #34 is done. But for now, a simple fix is to add an option in the admin panel to disable it.