소스 검색

bbs 문구 설정 추가

잉여개발기 (SPDV) 2 년 전
부모
커밋
e4c9f1174c
6개의 변경된 파일27개의 추가작업 그리고 11개의 파일을 삭제
  1. 1 1
      route/bbs_w_edit.py
  2. 2 2
      route/bbs_w_post.py
  3. 18 2
      route/edit.py
  4. 5 1
      route/main_setting_phrase.py
  5. 0 4
      route/topic.py
  6. 1 1
      version.json

+ 1 - 1
route/bbs_w_edit.py

@@ -127,7 +127,7 @@ def bbs_w_edit(bbs_num = '', post_num = '', do_type = ''):
                         <input placeholder="''' + load_lang('title') + '''" name="title" value="''' + html.escape(title) + '''">
                         <hr class="main_hr">
 
-                        ''' + edit_editor(curs, ip, data) + '''
+                        ''' + edit_editor(curs, ip, data, 'bbs') + '''
                         <hr class="main_hr">
                         
                         ''' + captcha_get() + ip_warning() + '''

+ 2 - 2
route/bbs_w_post.py

@@ -184,7 +184,7 @@ def bbs_w_post(bbs_num = '', post_num = '', do_type = ''):
                 bbs_comment_form = ''
                 if bbs_comment_acl == 0:
                     bbs_comment_form += '''                        
-                        ''' + edit_editor(curs, ip, text, 'thread') + '''
+                        ''' + edit_editor(curs, ip, text, 'bbs_comment') + '''
                         <hr class="main_hr">
                         
                         ''' + captcha_get() + ip_warning() + '''
@@ -343,7 +343,7 @@ def bbs_w_post(bbs_num = '', post_num = '', do_type = ''):
                         ''' + comment_select + ''' <a href="javascript:opennamu_return_comment();">(R)</a>
                         <hr class="main_hr">
                         
-                        ''' + edit_editor(curs, ip, text, 'thread') + '''
+                        ''' + edit_editor(curs, ip, text, 'bbs_comment') + '''
                         <hr class="main_hr">
                         
                         ''' + captcha_get() + ip_warning() + '''

+ 18 - 2
route/edit.py

@@ -29,8 +29,24 @@ def edit_editor(curs, ip, data_main = '', do_type = 'edit'):
     add_get_file = ''
     monaco_display = ''
 
-    curs.execute(db_change('select data from other where name = "edit_help"'))
-    sql_d = curs.fetchall()
+    if do_type == 'edit':
+        curs.execute(db_change('select data from other where name = "edit_help"'))
+        sql_d = curs.fetchall()
+    elif do_type == 'bbs':
+        curs.execute(db_change('select data from other where name = "bbs_help"'))
+        sql_d = curs.fetchall()
+    elif do_type == 'bbs_comment':
+        curs.execute(db_change('select data from other where name = "bbs_comment_help"'))
+        sql_d = curs.fetchall()
+    else:
+        curs.execute(db_change('select data from other where name = "topic_text"'))
+        sql_d = curs.fetchall()
+
+    if do_type == 'bbs_comment':
+        do_type = 'thread'
+    elif do_type == 'bbs':
+        do_type = 'edit'
+            
     p_text = html.escape(sql_d[0][0]) if sql_d and sql_d[0][0] != '' else load_lang('default_edit_help')
     
     monaco_on = get_main_skin_set(curs, flask.session, 'main_css_monaco', ip)

+ 5 - 1
route/main_setting_phrase.py

@@ -29,7 +29,8 @@ def main_setting_phrase():
             'phrase_user_page_admin',
             'phrase_user_page_owner',
             'phrase_old_page_warring',
-            'bbs_help'
+            'bbs_help',
+            'bbs_comment_help'
         ]
         if flask.request.method == 'POST':
             for i in i_list:
@@ -129,6 +130,9 @@ def main_setting_phrase():
                         <h2>''' + load_lang('bbs_help') + '''</h2>
                         <textarea class="opennamu_textarea_100" name="''' + i_list[21] + '''">''' + html.escape(d_list[21]) + '''</textarea>
 
+                        <h2>''' + load_lang('bbs_comment_help') + '''</h2>
+                        <textarea class="opennamu_textarea_100" name="''' + i_list[22] + '''">''' + html.escape(d_list[22]) + '''</textarea>
+
                         <hr class="main_hr">
                         <button id="opennamu_save_button" type="submit">''' + load_lang('save') + '''</button>
                     </form>

+ 0 - 4
route/topic.py

@@ -134,10 +134,6 @@ def topic(topic_num = 0, do_type = '', doc_name = 'Test'):
 
             acl_display = 'display: none;' if topic_acl == 1 else ''
             name_display = 'display: none;' if topic_num != '0' else ''
-                
-            curs.execute(db_change('select data from other where name = "topic_text"'))
-            sql_d = curs.fetchall()
-            topic_text = html.escape(sql_d[0][0]) if sql_d and sql_d[0][0] != '' else load_lang('content')
 
             shortcut = '<div class="opennamu_thread_shortcut" id="thread_shortcut">'
             curs.execute(db_change(

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC3-dev215",
+        "r_ver" : "v3.4.6-RC3-dev216",
         "c_ver" : "3500361",
         "s_ver" : "3500111"
     }