How to create a plugin comment system

I am wondering how plugins like Disqus are developed . they are similar to URL tags (but abit are more advanced as they should work with different query strings, server side, using short URLs, etc.).

I want to ask about this, because I feel that it is recommended to keep separate functions, such as comments / ratings / reviews, in separate components and connect as needed so that the functionality can be connected dynamically.

eg. blog entries are comments and thus a portfolio image, but a blog entry cannot be reviewed as a portfolio image can

update : I will use PHP / MySQL, but I think that such a "template" can be implemented in any language

+3
source share
1 answer

Nobody seems to want to answer your question. Well ... I recently developed a comment system similar to yours. I will try to explain how I achieved this. (and you will also be able to work with reviews / any others).

, : component (, //), identificator ( ).
, , check, , component @identificator () (MySQL ). , comments.

#example (component) table:
id (item_identificator) | comments | title | content | author | timestamp | <etc.>

My comments component item_identificator.

#comments table:
id | component (in this case - "example") | item_identificator | comment | author | timestamp | <etc.> 

, comments, , component item_identificator .

, ! , PHP MySQL.

, .

, Disqus, ... -.: (

+1

Source: https://habr.com/ru/post/1754104/


All Articles