October 12, 201511 yr HI, I saw once a cool site and forgot to save it - maybe someone knows a similar page or techniques? Mechanism of the site enables user to select a part of text and comment it, which results in creating new section/sections inside the long article. You can also reply to others comments regarding the specific fragment. The section with added comment is normally hidden and ready to expand for interested users (to add another comment or reply to commented section). After some comments, the article looks like a long story with multiple bookmarks, hidden, with just a noted number of comments next to a commented area/s. do you know anything lookalike? Thanx in advance. Best, R
October 17, 201511 yr Don't know about the "selected text" but It could be very achievable to code yourself if the comments just can be added at predefined parts of the article, eg. after each paragraph. If this is an acceptable solution you can try something like this: You will need to know: how to post form data to a server how to sanitize user inputs hot to setup DB queries and process the results Insert a div with a unique ID for comments after each phrase / paragraph in the article. Query the DB for the article and the all the comments, use something ilke explode() to split the article at every comment div and concatenete each fragment of the article with: a button a form for new comments (this form should contain a hidden field with the ID* of the div that gets stored in the comment table of the DB) a loop that filters the comment results by the matching ID and inserts them in appropriate HTML * Though each ID in the aticle string should be unique it should not be unique in the comment table in the DB, as you want to allow multiple comments to each paragraph. Ideally you would use a foreign key rather than a normal field for the ID ( = store the ID on a seperate comment-ID table) Use some JS to toggle visibility of the each form and bind it to the corresponding buttons. It is very likely there are better solutions but since no one else have answered I thought I'd give it my best bid Edited October 17, 201511 yr by Nillervision
November 12, 201510 yr Are you referring to the Medium comment system? If yes, the closest I found was this http://aroc.github.io/side-comments-demo/
Create an account or sign in to comment