Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Comments to a part of article

Featured Replies

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

 

 

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 by Nillervision

  • 4 weeks later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.