Improvements to URLs in custom user fields when they link to the forum domain

AI-generated summary

A discussion is underway to improve the behavior of URLs in custom user fields when they link to the same domain as the forum. meglio proposed three ideas to make these links clickable:

  1. Auto-make links clickable if the domain matches the forum domain.
  2. Introduce a domains whitelist to make links clickable in user profiles and custom user fields.
  3. Display topic titles instead of links in custom user fields if the link is to a topic or message on the same domain.

erlend_sh suggested meglio could create a plugin for this feature, but meglio replied that they don’t have the necessary programming skills. Meanwhile, techAPJ shared a how-to guide for linking custom user fields to external websites, which may be relevant to the discussion.

So, every goat farmer in our forum is allowed to create their own personal topic where they share their company news.

I created a custom user field where they can put a URL to such a topic. However, it is not clickable.

In this topic I read why links are not clickable by default. However, when linked to the same domain where the forum runs, it should not be dangerous.

I propose a few ideas on how to improve links behaviour, choose one or many:

  1. Make all links in custom user fields, as well as in user profile description, clickable, if the domain matches the forum domain.

  2. Add a domains whitelist into settings and make all links containing the domain clickable in user profile and custom user fields

  3. If a custom user field (or website url standard user field) contains only a link, and it is a topic or a message link, display the topic title instead and make it clickable.

1개의 좋아요

Sounds reasonable, but it’s still very niche. You have some programmer chops, so maybe you’d be able to make a plugin for this? You could ask for help in the Dev category when necessary.

I tried once and it looks as if Ruby and Ember are not my friends at all. So I don’t code for Discourse, unfortunately. However, I gladly do other things, e.g. translating to Russian, reporting bugs and actively participating in meta.

3개의 좋아요

We now have a howto for this:

2개의 좋아요