[PATCH] pkg_comments.php: Make comment timestamps link to the comment

Johannes Löthberg johannes at kyriasis.com
Sun Oct 21 11:53:48 UTC 2018


Excerpts from Eli Schwartz's message of October 21, 2018 1:20:
> On 10/20/18 9:05 AM, Johannes Löthberg wrote:
>> Excerpts from Vladimir Panteleev's message of October 16, 2018 2:26:
>>> As of today, there is no easy way to obtain a link to a specific
>>> comment on a package page.
>>>
>>> Many implementations of forums and comment systems today seem to
>>> follow a convention where a comment's timestamp is an unobtrusive link
>>> to the comment itself. Some examples are:
>>>
>>> - phpBB (e.g. bbs.archlinux.org)
>> 
>> (Our BBS is FluxBB, not phpBB.)
>> 
>>> - GitHub
>>> - Disqus
>>> - Discourse
>>>
>>> This patch adopts this convention as well, by making the comment
>>> timestamp an unobtrusive link to the comment itself.
>>>
>> 
>> Most of what makes those URLs useful is that they link to the actual 
>> post though, while this is just an anchor to the page you're currently 
>> on, which means that as soon as it ends up at the next page, the URL is 
>> broken, so I'm not sure how useful this is in practice?
> 
> Admittedly, my usual use case is with ?PP=250. Not too long ago, I
> simply defaulted to using the "show all" link.
> 
> I guess there is a difference between forum posts, which start on the
> first page and add new posts to a new page, vs. the AUR which shows the
> newest comments first. Is there any way to make truly stable links like
> that?
> 

Same way that phpBB and FluxBB does it, you link to a comment-specific 
URL, not an anchor on the destination page.

Something like /comment/<comment_id> -> look up which package the 
comment is on -> count how many visible comments are before it for that 
package -> divide by per-page value -> redirect to that page with the 
anchor.
-- 
Sincerely,
  Johannes Löthberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 1727 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20181021/78dc9069/attachment.sig>


More information about the aur-dev mailing list