【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 fold_reply() function in "pincong-wecenter/models/content.php",and see how folding an answer/comment works on the backend.
  2. Read "pincong-wecenter-master/views/default/article/index.tql.htm" (for example), search for keyword ['fold'], and see how folding works on the frontend
  3. Look at why_fold() function in "pincong-wecenter-master/static/js/aws.js".

                                                                                     
TODO List Summary:
  1. Add a new table, recording all folding type (i.e, whether it's an answer, a comment etc.), folding item_id, and folding reason (better to <select> be a tag) and the id of the folding admin. The column database was already modified for this function. Current code for folding is:
    • Current code in use:
    • 1: 账号被封禁(或被手动折叠)
      2: 踩数过多没有帮助
    • Hypothetical code:
    • 3: 无关回答/评论
      4: 谩骂、侮辱
      5: 刷屏、扰乱秩序
  2. Add a new ajax function for submitting folding request.
  3. Add folding reason (the number) to the item.
  4. Modify why_fold()function to show the folding reason.

                                                                                     
TODO List (PHP Code):
[pincong-wecenter/models/content.php]
Change the function fold_reply, adding extra argument for folding reason, and change the number of folding accordingly.
[pincong-wecenter/app/content/ajax.php]
  • Edit function fold_reply_action() to recieve the folding reason in $_POST.

                                                                                     
TODO List (HTML/JS Code):
For simplicty, we only described the procedure for article. Should be the same for answer and vidoe comment
[pincong-wecenter-master/views/default/article/index.tql.htm]
Add the ['fold'] id to function AWS.User.why_fold().
[pincong-wecenter-master/static/js/aws.js]
  1. Edit the function why_fold() to display the folding reason correctly.
  2. Add a new function fold_comment with the right UI, please see function forbid_user for refrence. Change the textBox to dropDown.

                                                                                     
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 coding!
8
分享 2019-07-27

0 个评论

要发言请先登录注册

要发言请先登录注册