Jelajahi Sumber

본문 하단 설정 추가

Surplus_Up (2DU) 6 tahun lalu
induk
melakukan
dba49cb314
4 mengubah file dengan 21 tambahan dan 5 penghapusan
  1. 2 1
      language/en-US.json
  2. 3 2
      language/ko-KR.json
  3. 11 2
      route/setting.py
  4. 5 0
      route/view_read.py

+ 2 - 1
language/en-US.json

@@ -201,7 +201,8 @@
                 "main_setting" : "Main settings",
                 "text_setting" : "Text settings",
                 "main_head" : "Global <HEAD>",
-                "main_body" : "Global <BODY>",
+                "main_body" : "Top of body",
+                "main_bottom_body" : "Bottom of body",
             "_comment_2.2.2_" : "Main",
                 "wiki_name" : "Wiki[s] name",
                 "wiki_logo" : "Wiki[s] logo",

+ 3 - 2
language/ko-KR.json

@@ -120,7 +120,7 @@
     "new_password": "새 비밀번호",
     "authority_use_list": "권한 사용 목록",
     "alarm": "알림",
-    "main_body": "전역 <BODY>",
+    "main_body": "본문 상단",
     "all_document_list": "모든 문서 목록",
     "update": "업데이트",
     "login_able": "로그인 가능",
@@ -289,5 +289,6 @@
     "image_license_list": "이미지 라이선스 목록",
     "image_license_add": "이미지 라이선스 추가",
     "direct_input": "직접 입력",
-    "acl_record": "ACL 기록"
+    "acl_record": "ACL 기록",
+    "main_bottom_body": "본문 하단"
 }

+ 11 - 2
route/setting.py

@@ -13,7 +13,8 @@ def setting_2(conn, num):
             load_lang('main_head'),
             load_lang('main_body'),
             'robots.txt',
-            'Google'
+            'Google',
+            load_lang('main_bottom_body'),
         ]
         
         x = 0
@@ -310,12 +311,16 @@ def setting_2(conn, num):
                 ''',
                 menu = [['setting', load_lang('return')]]
             ))
-    elif num == 3 or num == 4:
+    elif num == 3 or num == 4 or num == 7:
         if flask.request.method == 'POST':
             if num == 4:
                 info_d = 'body'
                 end_r = '4'
                 coverage = ''
+            elif num == 7:
+                info_d = 'bottom_body'
+                end_r = '7'
+                coverage = ''
             else:
                 info_d = 'head'
                 end_r = '3'
@@ -344,6 +349,10 @@ def setting_2(conn, num):
                 curs.execute("select data from other where name = 'body'")
                 title = '_body'
                 start = ''
+            elif num == 7:
+                curs.execute("select data from other where name = 'bottom_body'")
+                title = '_bottom_body'
+                start = ''
             else:
                 curs.execute("select data from other where name = 'head' and coverage = ?", [flask.request.args.get('skin', '')])
                 title = '_head'

+ 5 - 0
route/view_read.py

@@ -181,6 +181,11 @@ def view_read_2(conn, name):
     body = curs.fetchall()
     if body:
         div = body[0][0] + '<hr class=\"main_hr\">' + div
+        
+    curs.execute("select data from other where name = 'bottom_body'")
+    body = curs.fetchall()
+    if body:
+        div += '<hr class=\"main_hr\">' + body[0][0]
     
     div = adsense_code + '<div>' + div + '</div>'