【High Priority】问题/回答下评论赞/踩功能

Original_Link
This discussion concerns the function "问题/回答下评论赞/踩功能", for any discussion related to this, please follow up under this thread.
The whole discussion was written in English for developers convenience. For Chinese accessibility, please use Google translate.
                                                                                     
中文描述:目前问题/回答下的评论没有赞踩功能,也无法折叠,本功能实现它的赞踩和折叠。
                                                                                     
Before starting:
  1. Read "pincong-wecenter-master/models/vote.php" understand how voting was written for other functions (e.g.., question, answer, article, article comment, etc).
  2. Read the table structure of "aws_article" and "aws_article_comment", see how "agree_count" works.
  3. Read "pincong-wecenter-master/views/default/article/ajax/comment.tpl.htm", see how "agree" and "disagree" buttons were added and how the submission was sent.

                                                                                     
TODO List (Database Table):
Add a new column to the table "aws_answer_comments" and "aws_question_comments", named "agree_count". Possibly we need to duplicate these two tables, depending on whether simplying adding a new column would be compatible with the exsiting code or not (will test later).
                                                                                     
TODO List (PHP Code):
[pincong-wecenter-master/models/vote.php]
    Edit function process_currency_agree() and process_currency_disagree(). We possibly also need to edit agree() and disagree(), depending on the comptability. The type name should be the same for the table name, i.e., answer_comments and question_comments.

                                                                                     
TODO List (HTML/JS Code):
[pincong-wecenter-master/views/default/question/ajax/comment.tpl.htm]
    Add "agree" and "disagree" button for each comment and its corresponding ajax submission. (see the one for article as an example)

                                                                                     
Please post any question you may have. We probably will encouter more issues while editing. Don't hesitate to follow up your problems. Thanks and happy programming!
5
分享 2019-07-27

0 个评论

要发言请先登录注册

要发言请先登录注册