评论(Comments) 显示在原始贴子的上下文中,可能是通过Webmention收到的来自其他网站的联合回复帖子以及本地创建的评论。
目标: 以高保真显示收到的评论,至少设计的跟“原生”显示在博客贴子和 silo 贴子那样的好 (例如 对Twitter帖子的回复,Facebook的回复, Flickr/Instagram 照片,等——参见Silos 以下对他们的分析)。
按照接受评论,你的系统应该已经是:
当你的服务器接收到webmention URL:
有了这些信息,应该可以在原始帖子永久链接的页脚“评论”部分中进行足够丰富的展示,将每个评论添加上:
则你应该可以得到一个类似于任何Silo那样保真度的评论显示。
注:其中一些已经实现!
问题:
更妙的是,如果您可以实时 在查看帖子的人群中显示评论,那么当您的服务器收到帖子时,用户看起来会感觉很棒。 想法/挑站 2013-09-30.
如何概览:
参见: 操作详情,代码示例和演示视频
评论回复的帖子应该是顶级的 h-entry, 并且对它的评论应该标记为嵌套在comment属性之下的h-cite。例如:
<div class="h-entry"> <h1 class="p-name">The Main Entry</h1> <p class="p-author h-card">John Smith</p> <p class="e-content">A few insights I've had:</p> <h2>Comments</h2> <div class="u-comment h-cite"> <a class="u-author h-card" href="http://jane.example.com/">Jane Bloggs</a> <p class="p-content p-name">Ha ha ha great article John.</p> <a class="u-url" href="http://jane.example.com/c12"> <time class="dt-published">2015-07-12 HH:MM</time> </a> </div> <div class="u-comment h-cite"> <a class="u-author h-card" href="http://kim.example.net">Kim Codes</a> <p class="p-content p-name">What were the insights?</p> <a class="u-url" href="http://kim.example.net/k23"> <time class="dt-published">2015-07-12 HH:MM</time> </a> </div> • • • </div>
都做什么:
参见:
其中记录了一系列关于如何标注评论的一系列pre-indieweb思想,特别是当评论只是直接在帖子上进行本地化,而不是传播到对等体。
总的来说,这个“操作方法”和indieweb过程是关于微格式评论灵感的进一步简化,根据真实世界的需要添加了属性。
注 class=“p-content” 用在comment的body上,这是原因:
如何删除从其它站点接收到的评论。.
如果独立网站 reply/comment 贴子被 删除,则用户的站点希望发送另一个相应的Webmention。
如果试图检索回复永久链接URL时,服务器收到410 GONE,那么您的服务器应该删除该评论的现有联合副本。 详情参见 处理删除贴子
自动的:
使用 WordPress, 回复评论自从 2013-01-15 e.g.
(native comments since 2003-08-09, e.g. https://snarfed.org/2003-08-09_back_from_vacation ) Uses:
p-comment
一般而言,现有的博客/Silo帖子会显示注释(按时间顺序或反向时间顺序),并提供以下详细信息:
Tumblr groups various different response types into a generic “notes” feed, at the bottom of each post (example). They show:
Twitter shows all tweets which are both in-reply-to a particular tweet AND contain the original tweeters @name below the tweet metadata in chronological order. They provide a “reply” box above (?) the reply feed (example). The tweets have:
Twitter replies are ordered according to an undocumented “relevance” heuristic https://help.twitter.com/en/using-twitter/twitter-conversations#ranking
Facebook treats comments as completely secondary to “full” posts, showing them in chronological order beneath the post’s action bar. Facebook only show the latest ~4 comments if there are more, and display the leave-a-comment box below. They have:
有些silos 使用嵌入了评论,然后在各个网站上使用:
开源嵌入评论:
shutup.css shutup.css是自定义样式表,它隐藏了许多热门网站上的评论。 因此,它是关于如何标注评论的实证研究。 有关详细信息,请参见 该CSS。
如果原始帖子没有明确的 in-reply-to属性表明它是直接回复您的帖子,则不应出现与您提供评论相同的样式或群组。 这可能会误导观众认为一般性提及是对帖子的评论,这可以改变对原文帖子的解读。 例如,请参阅下面的交换内容,了解如何将提及(mention)作为评论(comment)提交意见可以改变的说明。
Q: 我想如果我抓取e-content并认为它太长了,我不妨自己截断它。 为什么我需要这个p-summary?
A: 因为作者/出版商可能(或仅是可能)明确撰写p-summary,使其成为截然不同的截断版本的电子内容,而不是自动截断。
Q: 为什么在评论中使用 u-comment
而不是p-comment
?
A: u-comment
会作为评论的URL解析评论隐含值,这对于支持 salmention很有用。 http://indiewebcamp.com/irc/2015-07-22#t1437612361069
u-responses
to point to another page containing a list of >h-entry
objects with all of the received comments would be useful. Useful in blog lists and when using an external WebMention endpoint such as webmention.herokuapp.com Kodfabrik.seSalmention很容易导致嵌套评论。 reply-chain 有显示多个回复的例子。. 一个来自 https://ben.thatmustbe.me/note/2014/4/24/1/的例子:
<div class="comment u-comment h-cite"> <div class='comment_header'> <span class="minicard h-card u-author"> <img class='comment_author u-photo' src="https://ben.thatmustbe.me/image/static/icon_128.jpg" /> <span class="p-name u-url" href="https://ben.thatmustbe.me" rel="nofollow" title="Ben Roberts" > Ben Roberts </span> </span> <a href="https://ben.thatmustbe.me/note/2014/9/12/1/_" class="u-url permalink"> <time class="date dt-published" datetime="2014-09-12 13:40:56">September 12, 2014 1:40 PM</time> </a> </div> <div class='comment_body p-content p-name'> On account of I got called out on it, I now have back context in my replies! </div> <div class="subcomment u-comment h-cite"> <div class='comment_header'> <span class="minicard h-card u-author"> <img class='comment_author u-photo' src="https://kylewm.com/static/img/users/kyle.jpg" /> <span class="p-name u-url" href="https://kylewm.com" rel="nofollow" title="Kyle Mahan" > Kyle Mahan </span> </span> <a href="https://kylewm.com/2014/09/great-work-ben-have-a-feeling-you" class="u-url permalink"> <time class="date dt-published" datetime="2014-09-12 16:29:19">September 12, 2014 4:29 PM</time> </a> </div> <div class='comment_body p-content p-name'> Great work, Ben! Have a feeling you have started a trend :P </div> </div> </div>
该标记可以重复嵌套
How do you scale the display of hundreds (or more) of comments or responses in general?
E.g. see: