A short link to this page -- TinyURL
The wiki page has a convenient TinyURL.
Is it feasible to make TinyURLs for archived list threads such as:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/2...
On 03/11/2018 04:56 PM, John Griessen wrote:
The wiki page has a convenient TinyURL.
Is it feasible to make TinyURLs for archived list threads such as:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/2...
Yes, and it's rather easy to do. You would have to do minimal modifications to Hyperkitty to get it. Here is an open issue about that https://gitlab.com/mailman/hyperkitty/issues/60
Gitlab is having an issue with the comments, but in short you would have to do the following:
Each object has a pk which is an integer by default. You would add a view with a url like "/archives/shortlink/<int>" and make the view fetch the message and redirect to the existing view.
You will probably also want to include the ability of getting these links by changing the templates to include this link. I would recommend either replacing the exiting permalink or adding a new shortlink option.
If you of course want something other than integers, you would have to implement a little more...
I'm not sure if it is an option to include that in hyperkitty by default, or if you would have to do the modifications yourself. The issue is rather old and I'm not sure what the outcome of the discussion was...
John Griessen writes:
Is it feasible to make TinyURLs for archived list threads such as:
It is. Last I checked (Internet-decades ago, I admit) there a lot of third-party URL-compressing services that you can use. So it's certainly possible.
An alternative would be to standardize a few one-letter prefixes such as /m/ for a single message, /t/ for a message as thread head, /d/ for date and /a/ for author which would live under the HyperKitty namespace, with the path functioning as a search key. /t/ could also pull the parents of the message to get the whole thread. The message- and thread-oriented URLs would use prefixes of the message ID hash, and return a page with possible messages or threads if multiple ones have the same prefix, or even a "too short" error message.
There are two problems to understand and perhaps solve before doing TinyURL in Mailman itself. The first is that a small namespace means a larger possibility of collisions. Not with other TinyURLs, but with other URLs on the same site. So this feature needs to be carefully designed, and often tuned to the site (for example, Twitter's use of the "t.co" domain, and Reddit's use of the /r/ prefix). The second is communicating the TinyURL to its users.
What's your use case (why do you need a TinyURL vs. a clickable long URL in a link in a well-known page)? Who requests the TinyURL be created, or is it automatic? What UI do you propose for requesting a TinyURL? How is the TinyURL link communicated to the user who clicks on it or types it? How long does it need to be available?
Also, why wouldn't one of those third-party services serve? That's an honest question to help understand the use case(s), not a brush-off. I have a feeling (that I can't yet explain) that it matters to the design.
Steve
participants (3)
-
John Griessen
-
Simon Hanna
-
Stephen J. Turnbull