/[LeafOK_CVS]/lbbs/src/section_list_display.c
ViewVC logotype

Diff of /lbbs/src/section_list_display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.20 by sysadm, Thu Jun 12 12:14:28 2025 UTC Revision 1.23 by sysadm, Sat Jun 14 02:00:38 2025 UTC
# Line 140  static int section_list_draw_screen(cons Line 140  static int section_list_draw_screen(cons
140          show_top(str_section_master, stitle, str_section_name);          show_top(str_section_master, stitle, str_section_name);
141          moveto(2, 0);          moveto(2, 0);
142          prints("返回[\033[1;32m←\033[0;37m,\033[1;32mESC\033[0;37m] 选择[\033[1;32m↑\033[0;37m,\033[1;32m↓\033[0;37m] "          prints("返回[\033[1;32m←\033[0;37m,\033[1;32mESC\033[0;37m] 选择[\033[1;32m↑\033[0;37m,\033[1;32m↓\033[0;37m] "
143                     "阅读[\033[1;32m→\033[0;37m,\033[1;32mENTER\033[0;37m]\033[m %s[\033[1;32mn\033[0;37m]\033[m",                     "阅读[\033[1;32m→\033[0;37m,\033[1;32mENTER\033[0;37m] 发表[\033[1;32mCtrl-P\033[0;37m] "
144                       "修改[\033[1;32mCtrl-E\033[0;37m] %s[\033[1;32mn\033[0;37m]\033[m",
145                     (display_nickname ? "显示用户名" : "显示昵称"));                     (display_nickname ? "显示用户名" : "显示昵称"));
146          moveto(3, 0);          moveto(3, 0);
147          if (display_nickname)          if (display_nickname)
# Line 283  static int display_article_key_handler(i Line 284  static int display_article_key_handler(i
284                  if (section_topic_view_mode)                  if (section_topic_view_mode)
285                  {                  {
286                          snprintf(p_ctx->msg, sizeof(p_ctx->msg),                          snprintf(p_ctx->msg, sizeof(p_ctx->msg),
287                                           "| 返回[\033[32m←\033[33m,\033[32mESC\033[33m] | "                                           "| 返回[\033[32m←\033[33m,\033[32mESC\033[33m] "
288                                           "同主题阅读[\033[32m↑\033[33m/\033[32m↓\033[33m] | "                                           "同主题阅读[\033[32m↑\033[33m/\033[32m↓\033[33m] "
289                                           "模式[\033[32mp\033[33m] | 帮助[\033[32mh\033[33m] |");                                           "切换[\033[32mp\033[33m] 回复[\033[32mr\033[33m] 帮助[\033[32mh\033[33m] |");
290                  }                  }
291                  else                  else
292                  {                  {
293                          snprintf(p_ctx->msg, sizeof(p_ctx->msg),                          snprintf(p_ctx->msg, sizeof(p_ctx->msg),
294                                           "| 返回[\033[32m←\033[33m,\033[32mESC\033[33m] | "                                           "| 返回[\033[32m←\033[33m,\033[32mESC\033[33m] "
295                                           "移动[\033[32m↑\033[33m/\033[32m↓\033[33m/\033[32mPgUp\033[33m/\033[32mPgDn\033[33m] | "                                           "移动[\033[32m↑\033[33m/\033[32m↓\033[33m/\033[32mPgUp\033[33m/\033[32mPgDn\033[33m] "
296                                           "模式[\033[32mp\033[33m] | 帮助[\033[32mh\033[33m] |");                                           "切换[\033[32mp\033[33m] 回复[\033[32mr\033[33m] 帮助[\033[32mh\033[33m] |");
297                  }                  }
298                  *p_key = 0;                  *p_key = 0;
299                  break;                  break;
# Line 544  int section_list_display(const char *sna Line 545  int section_list_display(const char *sna
545                                          }                                          }
546                                          break;                                          break;
547                                  case 'r': // Reply article                                  case 'r': // Reply article
548                                          if (article_post(p_section, p_articles[selected_index], ARTICLE_POST_REPLY) < 0)                                          if (article_reply(p_section, p_articles[selected_index]) < 0)
549                                          {                                          {
550                                                  log_error("article_post(aid=%d, REPLY) error\n", p_articles[selected_index]->aid);                                                  log_error("article_post(aid=%d, REPLY) error\n", p_articles[selected_index]->aid);
551                                          }                                          }
# Line 571  int section_list_display(const char *sna Line 572  int section_list_display(const char *sna
572                          }                          }
573                          break;                          break;
574                  case POST_ARTICLE:                  case POST_ARTICLE:
575                          if (article_post(p_section, NULL, ARTICLE_POST_NEW) < 0)                          if (article_post(p_section) < 0)
576                          {                          {
577                                  log_error("article_post(sid=%d, NEW) error\n", p_section->sid);                                  log_error("article_post(sid=%d, NEW) error\n", p_section->sid);
578                          }                          }
# Line 586  int section_list_display(const char *sna Line 587  int section_list_display(const char *sna
587                          {                          {
588                                  break;                                  break;
589                          }                          }
590                          if (article_post(p_section, p_articles[selected_index], ARTICLE_POST_EDIT) < 0)                          if (article_modify(p_section, p_articles[selected_index]) < 0)
591                          {                          {
592                                  log_error("article_post(aid=%d, EDIT) error\n", p_articles[selected_index]->aid);                                  log_error("article_post(aid=%d, EDIT) error\n", p_articles[selected_index]->aid);
593                          }                          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1