From 88920bc9feeb85db6a851e774c8f53cfa62e0baa Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Sun, 4 Sep 2016 03:11:11 +0900 Subject: [PATCH 01/28] =?UTF-8?q?=EB=84=A4=EB=AA=A8=EC=9D=98=20=EA=BF=88?= =?UTF-8?q?=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 라이믹스도 또 하나의 네모일까? 라이믹스 기본 레이아웃, 스킨 프로젝트 입니다. 코드 중에 MIT 라이선스를 가지는 햄버거 메뉴 버튼 CSS 소스가 사용되었습니다. 구글 안드로이드 색상 가이드라인의 색상을 이용하였습니다. --- layouts/simple_world/conf/info.xml | 129 ++++++++ layouts/simple_world/lang/lang.xml | 15 + layouts/simple_world/layout.html | 127 ++++++++ layouts/simple_world/layout.js | 37 +++ layouts/simple_world/layout.scss | 469 +++++++++++++++++++++++++++++ layouts/simple_world/thumbnail.png | Bin 0 -> 8654 bytes 6 files changed, 777 insertions(+) create mode 100644 layouts/simple_world/conf/info.xml create mode 100644 layouts/simple_world/lang/lang.xml create mode 100644 layouts/simple_world/layout.html create mode 100644 layouts/simple_world/layout.js create mode 100644 layouts/simple_world/layout.scss create mode 100644 layouts/simple_world/thumbnail.png diff --git a/layouts/simple_world/conf/info.xml b/layouts/simple_world/conf/info.xml new file mode 100644 index 000000000..c18ae48b8 --- /dev/null +++ b/layouts/simple_world/conf/info.xml @@ -0,0 +1,129 @@ + + + 네모의 꿈 + Rectangular World + 깔끔한 면과 그림자 레이아웃 + Simple rectangular planes and shadows + 1.0 + 2016-09-04 + + misol + misol + + + + 사이트 중심 메뉴 + Global Navigation Menu + + + + + 사이트 로고 이미지 + Site logo image + + + 사이트 로고 문자 + Site logo text + + + 사이트 로고 링크 주소 + Site logo link URL + + + 사이트 하단 문자 + Site footer text + + + 중심 색상 + Primary color + 분위기를 형성하는데 사용되는 중심 색상입니다. + Please type the mood color you want. + + + + 붉은 색 + Red + + + 크림슨 + Crimson + + + 분홍 + Pink + + + 보라 + Purple + + + 진보라 + Deep Purple + + + 인디고 + Indigo + + + 짙은 파랑 + Deep Blue + + + 파랑 + Blue + + + 밝은 파랑 + Light Blue + + + 시안 + Cyan + + + + Teal + + + 초록 + Green + + + 연한 초록 + Light Green + + + 라임 + Lime + + + 노랑 + Yellow + + + 앰버 + Amber + + + 주황 + Orange + + + 진한 주황 + Deep Orange + + + 갈색 + Brown + + + 회색 + Grey + + + 푸른 회색 + Blue Grey + + + + \ No newline at end of file diff --git a/layouts/simple_world/lang/lang.xml b/layouts/simple_world/lang/lang.xml new file mode 100644 index 000000000..5595db5f3 --- /dev/null +++ b/layouts/simple_world/lang/lang.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layouts/simple_world/layout.html b/layouts/simple_world/layout.html new file mode 100644 index 000000000..6ac51cd69 --- /dev/null +++ b/layouts/simple_world/layout.html @@ -0,0 +1,127 @@ + +{Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")} + + + +{@ $material_colors = array( + 'red' => '#f44336', + 'crimson' => '#66001f', + 'pink' => '#e91e63', + 'purple' => '#9c27b0', + 'deep-purple' => '#673ab7', + 'indigo' => '#3f51b5', + 'deep-blue' => '#00397f', + 'blue' => '#2196f3', + 'light-blue' => '#03a9f4', + 'cyan' => '#00bcd4', + 'teal' => '#009688', + 'green' => '#4caf50', + 'light-green' => '#8bc34a', + 'lime' => '#cddc39', + 'yellow' => '#ffeb3b', + 'amber' => '#ffc107', + 'orange' => '#ff9800', + 'deep-orange' => '#ff5722', + 'brown' => '#795548', + 'grey' => '#9e9e9e', + 'blue-grey' => '#607d8b', + 'black' => '#000000', + 'white' => '#ffffff' +); + + $oMemberModel = getModel('member'); + $member_config = $oMemberModel->getMemberConfig(); + +} + + +{@ if(!$layout_info->primary_color) $layout_info->primary_color = 'red'} +{@ if(!$layout_info->secondary_color) $layout_info->secondary_color = 'indigo'} + +{@ if($layout_info->primary_color === $layout_info->secondary_color && $layout_info->primary_color === 'indigo') $layout_info->secondary_color = 'red'} +{@ if($layout_info->primary_color === $layout_info->secondary_color && $layout_info->primary_color !== 'indigo') $layout_info->secondary_color = 'indigo'} + + +{Context::addMetaTag("theme-color", $material_colors[$layout_info->primary_color])} + + +{Context::set('layout_scss_value', array('grey' => $material_colors['grey'], 'primary_color' => $material_colors[$layout_info->primary_color], 'secondary_color' => $layout_info->secondary_color, ))} + + + + + + \ No newline at end of file diff --git a/layouts/simple_world/layout.js b/layouts/simple_world/layout.js new file mode 100644 index 000000000..282a2929a --- /dev/null +++ b/layouts/simple_world/layout.js @@ -0,0 +1,37 @@ +$(function() { + $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + + "use strict"; + + var toggles = document.querySelectorAll(".layout_mobile_menu"); + + for (var i = toggles.length - 1; i >= 0; i--) { + var toggle = toggles[i]; + layout_toggleHandler(toggle); + }; + + function layout_toggleMenuOpener(obj) { + if(obj.classList.contains("is-active") === true){ + var targetMenu = $(obj).attr('data-target'); + $('#' + targetMenu).slideUp('300', function() { + $(this).css('display', '') + }); + + obj.classList.remove("is-active"); + } + else { + var targetMenu = $(obj).attr('data-target'); + $('#' + targetMenu).slideDown('300'); + + obj.classList.add("is-active"); + } + } + + function layout_toggleHandler(toggle) { + toggle.addEventListener( "click", function(e) { + e.preventDefault(); + layout_toggleMenuOpener(this); + }); + } + +}); \ No newline at end of file diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss new file mode 100644 index 000000000..e38b435fe --- /dev/null +++ b/layouts/simple_world/layout.scss @@ -0,0 +1,469 @@ +@charset "UTF-8"; +@function layoutGrayContrast($color, $ratio) { + $grayColor: grayscale($color); + $grayValue: red($grayColor); + + @if $grayValue > ($ratio * 255) { + $return: 0; + } @else { + $return: 255; + } + + @return rgb($return, $return, $return); +} + +@function layoutLightenSelector($background, $ratio, $lighten, $lighter, $lightest) { + $backgroundGrayColor: grayscale($background); + $backgroundGrayValue: red($backgroundGrayColor); + + $lightenGrayColor: grayscale($lighten); + $lightenGrayValue: red($lightenGrayColor); + + $lighterGrayColor: grayscale($lighter); + $lighterGrayValue: red($lighterGrayColor); + + @if (abs($backgroundGrayValue - $lightenGrayValue) > ($ratio * 255)) { + $return: $lighten; + } @else if (abs($backgroundGrayValue - $lighterGrayValue) > ($ratio * 255)) { + $return: $lighter; + } @else { + $return: $lightest; + } + + @return $return; +} + +body { + margin:0; + background-color: #ffffff; +} +/* Skin to content */ +.skip { + position: relative; + margin:0 +} + +.skip>a { + display: block; + text-align: center; + line-height:28px; + height:0px; + overflow: hidden +} + +.skip>a:focus { + height: auto +} + +/* Layout */ +#layout_canvas { + position: relative; + max-width:960px; + width:100%; + margin:0 auto; +} + +.layout_header { + min-height:90px; + padding:0; + margin:0 0 17px; +} + +.layout_header>.hside { + position: absolute; + right:5px; + top: 25px +} + +.layout_body { + position: relative; +} + +.layout_header:after, +.layout_body:after { + content:""; + display: block; + clear: both +} + +.layout_content { + padding:0 0 40px 0; +} + +.layout_content>*:first-child { + margin-top:0 +} + +.layout_content img { + max-width:100%; + height: auto +} + +/* Header */ +.layout_header>h1 { + margin:0 auto; + padding:20px 95px 20px 5px; + box-sizing: border-box; + background-color: lighten($primary-color, 10%); + color: layoutGrayContrast(lighten($primary-color, 10%), 0.710); +} + +.layout_header>h1>a { + font-size:32px; + text-decoration: none; + color: layoutGrayContrast(lighten($primary-color, 10%), 0.710); + padding:0 5px; +} + +#layout_menu_toggle { + width:90px; + display: none; +} + +/*.layout_footer */ +.layout_footer { + padding:30px 10px 70px; + border-top:1px solid lighten($grey, 10%); + background-color: darken($grey, 35%); + color: lighten($grey, 30%); +} + +.layout_footer p { + font-size:12px +} + +.layout_footer a { + font-weight: bold; + text-decoration: none; + color: lighten($primary_color, 31%); +} + +.layout_footer a:hover, +.layout_footer a:focus { + text-decoration: underline +} + +/* Search */ +.layout_header .layout_search { + display: inline-block; + vertical-align: bottom; + margin:0 +} + +.layout_header .layout_search>input { + font-size:12px; + -webkit-appearance: none; + border-radius: 0; +} + +.layout_header .layout_search>input[type="text"] { + width: 126px; + line-height: 18px; + font-size: 14px; + margin: 0; + padding: 8px 8px 6px 8px; + position: relative; + display: inline-block; + outline: none; + border-radius: 0; + border: none; + background: lighten($primary-color, 20%); + color: layoutGrayContrast(lighten($primary-color, 20%), 0.710); +} + +.layout_header .layout_search>input[type="text"]:hover, +.layout_header .layout_search>input[type="text"]:focus { + background: lighten($primary-color, 50%); + color: layoutGrayContrast(lighten($primary-color, 50%), 0.710); +} + +.layout_header .layout_search>input[type="submit"] { + vertical-align: bottom; + background: lighten($primary-color,15%); + color: layoutGrayContrast(lighten($primary-color, 15%), 0.710); + border: none; + height:32px; + padding:0 15px; + margin:0; +} + +.layout_header .layout_search>input[type="submit"]:hover, + .layout_header .layout_search>input[type="submit"]:focus { + background:$primary-color; + color: layoutGrayContrast($primary-color, 0.710); +} + +/* GNB */ +.layout_menu ul { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; + background-color: darken($grey, 30%); +} + +.layout_menu>ul>li { + float: left; +} + +.layout_menu>ul>li:first-child { + float: right; +} + +.layout_menu li a, .dropbtn { + display: inline-block; + color: white; + text-align: center; + padding: 14px 16px; + text-decoration: none; +} + +.layout_menu>ul>li:first-child { + float: right; +} + +.layout_menu li.active>a { + background-color: lighten($primary-color, 15%); + color: layoutGrayContrast(lighten($primary-color, 15%), 0.710); +} + +.layout_menu li a:hover, +.layout_menu li a:focus, +.layout_menu li a:active, +.layout_dropdown:hover .dropbtn, +.layout_dropdown:focus .dropbtn, +.layout_dropdown:active .dropbtn { + background-color: $primary-color; + color: layoutGrayContrast($primary-color, 0.710); +} + +.layout_menu li.layout_dropdown { + display: inline-block; +} + +.layout_menu .layout_dropdown-content { + display: none; + position: absolute; + background-color: lighten($grey, 40%); + z-index: 9999999; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); +} + + +.layout_menu .layout_dropdown-content a { + color: black; + padding: 12px 16px; + text-decoration: none; + min-width: 160px; + display: block; + text-align: left; + box-sizing: border-box; +} + +. +.layout_menu .layout_dropdown-content a:hover { + display: block; + background-color: lighten($primary-color, 10%); + color: layoutGrayContrast(lighten($primary-color, 10%), 0.710); +} + +.layout_menu .layout_dropdown:hover .layout_dropdown-content { + display: block; +} + + +/* Hamberger menu http://callmenick.com/post/animating-css-only-hamburger-menu-icons Licensed under the MIT license, http://www.opensource.org/licenses/mit-license.php Copyright 2014, Call Me Nick http://callmenick.com */ +.layout_mobile_menu { + display: block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + width: 90px; + height: 90px; + font-size: 0; + text-indent: -9999px; + appearance: none; + box-shadow: none; + border-radius: none; + border: none; + cursor: pointer; + transition: background 0.3s; +} + +.layout_mobile_menu:focus { + outline: none; +} + +.layout_mobile_menu span { + display: block; + position: absolute; + top: 41px; + left: 17px; + right: 17px; + height: 8px; + background: white; +} + +.layout_mobile_menu span::before, +.layout_mobile_menu span::after { + position: absolute; + display: block; + left: 0; + width: 100%; + height: 8px; + background-color: #fff; + content: ""; +} + +.layout_mobile_menu span::before { + top: -19px; +} + +.layout_mobile_menu span::after { + bottom: -19px; +} + +.layout_mobile_menu--htx { + background-color: $primary-color; +} + +.layout_mobile_menu--htx span { + transition: background 0s 0.3s; +} + +.layout_mobile_menu--htx span::before, +.layout_mobile_menu--htx span::after { + transition-duration: 0.3s, 0.3s; + transition-delay: 0.3s, 0s; +} + +.layout_mobile_menu--htx span::before { + transition-property: top, transform; +} + +.layout_mobile_menu--htx span::after { + transition-property: bottom, transform; +} + +/* active state, i.e. menu open */ +.layout_mobile_menu--htx.is-active { + background-color: darken( $primary-color, 10% ); +} + +.layout_mobile_menu--htx.is-active span { + background: none; +} + +.layout_mobile_menu--htx.is-active span::before { + top: 0; + transform: rotate(45deg); +} + +.layout_mobile_menu--htx.is-active span::after { + bottom: 0; + transform: rotate(-45deg); +} + +.layout_mobile_menu--htx.is-active span::before, +.layout_mobile_menu--htx.is-active span::after { + transition-delay: 0s, 0.3s; +} +#layout_search_link { + display: none; +} + +@media (max-width: 750px) { + #layout_menu_toggle, #layout_search_link { + display: block; + } + .layout_header h1 { + background-color: lighten($primary-color, 10%); + color: layoutGrayContrast(lighten($primary-color, 10%), 0.710); + } + + .layout_header>h1>a { + color: layoutGrayContrast(lighten($primary-color, 10%), 0.710); + } + + .layout_header>*, + .layout_container, + .layout_footer>p { + width:100%; + margin:0 auto; + } + + #layout_menu_toggle { + position: absolute; + top:0; + right:0; + } + + /* GNB */ + .layout_menu { + display: none; + font-size:15px; + width:100%; + height: auto; + clear: both; + } + + .layout_menu ul { + list-style-type: none; + margin: 0; + padding: 0; + width: 100%; + height: auto; + background-color: lighten($grey, 31%); + } + + .layout_menu>ul>li, .layout_menu>ul>li:first-child { + float: none; + } + + .layout_menu li a, .dropbtn { + display: block; + color: #000; + text-align: left; + padding: 15px; + text-decoration: none; + } + + .layout_menu li.active>a { + background-color: lighten($primary-color, 15%); + color: layoutGrayContrast(lighten($primary-color, 15%), 0.710); + } + + .layout_menu li a:hover, .layout_dropdown:hover .dropbtn { + background-color: $primary-color; + color: layoutGrayContrast($primary-color, 10%, 0.710); + } + + .layout_menu li.layout_dropdown { + display: block; + } + + .layout_menu .layout_dropdown-content { + display: block; + position: relative; + background-color: lighten($grey, 35%); + color: layoutGrayContrast(lighten($grey, 35%), 0.710); + min-width: 100%; + box-shadow: none; + } + + .layout_menu .layout_dropdown-content a { + background-color: lighten($grey, 35%); + color: layoutGrayContrast(lighten($grey, 35%), 0.710); + padding: 15px 30px; + text-decoration: none; + display: block; + text-align: left; + } + + /* PC only */ + .layout_pc { + display: none; + } + +} \ No newline at end of file diff --git a/layouts/simple_world/thumbnail.png b/layouts/simple_world/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..3f5f132a8d880a0877d21f26666bfd79143b7325 GIT binary patch literal 8654 zcmaKS1ymf%)-FzP0tB7F-~_keuEB!^ClDAU*f28$_W%hl!5sp@-Q8`F5Q4i51b4T` zIsZNPzPHwYU$5>i>HU3s*REaFRlWM_TXjV|Y)Wh-BqThgH*#7}Y0c9W_zdOgUi>p3 z{FG3@|NPF65ia|j4Y+S2I*2&m*>ZVl1`nOnL$4}!#ykWlGtb@XBSYN{d@P7a*r zf5~vVIsAo2LK2g71DjjefndN7AZuGkak|6ib~>P~r8u45Yc*~)uq?>N_KgPwr0t=u zW8qmy7%96yV_D7kMop!Yc^;*FpEB4Pt2} zq9v#BFI`V1aXK3q3@pOMB`6H1hMAg5f&Eyi-VV!<4J-8>h1_LcjIt`(*MIC z2ZCBaY{4*FCr994jOHJlTwvmKPnP~q6CA+*rgen=%S}%X<8m_xbMbI;|J9^_1l833 z|Dp~K|CWZrv_Su{_kSgZ>bQeJTv{NglMBS+spG8Z|561Ok%fTFVNMVoCnx)Vy!h6} z3FZW~aRLKnwFQ7IdbW<1POi{bf6J?>i6}WjVdjn&ASF3*x+exsTU$#JSpgY-A%)j6 zf;Que2R9+Q&@k>c&I``qLxvTlh$#Y+w(SXV$e%4U6`TgrMnDLVyZXP$une#udDm* zI4f>3(veiV+Br;q${px#+d*)Vi+nqNDgrTvDAb^SGT@M ze}Qk%@*p`TCZ=*}m-xA5tZJ-QZ4*QBfahCz1%;)C!IsM~=&0*KBlFM8hrSO5Z-v$L zMbLCIP=ubnEX85E+jzzkPRuO^udsPk^-K2SCaNdE!RPt>*;+cE}nW^Tc16a*oP8DG8;= zH*S(DGQ$W66j%HN>c$3mZ{YJ?%Y-L^lfYNJ`TZ@mJ&*T*8{5}r2H)b7nw0vGPmL2^ zcz2nlP0sp4k{_emPaf|u9?fwQ-7uEC?fi`jV-`723CJ2fM^<8_iBN`E|7esSOX?qQ zxu7j`mIL9mIUUC8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U80V+@@3}(`5diuP@>se3vO8M)?`?>}*!(_G(nUM{4@Lr3359^{4# z8c^S4$Aq~5M&Jgj(~|Xs7~{XR+R7Ap`z`lnR_s%7Mob-E`SR4e-Xcd{OU$G zZp;7bt-~Tz@D}_wdnHSzQ#vRh5E~uy#nTrv62M;%jE%EAAt&8cCAtk`mfDVZ9 z%A7*|3yER>wRN$N_+7zc+;!02*^@mnCb{W2tM*+&fpk^3GNaN19a7RnQZ}|!4%66L z*!B(8DZ}sr4NmMZbfIsNMv%%AH%I=>SZY@NvX7|OlriB^7B?X=Y3+tSMjR4x#@5<> zAX0!9Em=aKxqAhD;aZ6UtV=}JxWV8HXka{jMQ8Md&{{6@a)(UL{av;zQESS^t+sGI z{&t)Ow+PF3=Z4Eb?7XVKz45=h^8fL1yf)$yiyP^z!OLuezh>jFKP;5w)#b`$%mV%o Ds%kI| literal 0 HcmV?d00001 From cabcdbdb663944255a752dffd1c364d9fe414e4e Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 5 Sep 2016 17:22:32 +0900 Subject: [PATCH 02/28] Fix mobile member menu width --- layouts/simple_world/layout.js | 9 ++++++++- layouts/simple_world/layout.scss | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/layouts/simple_world/layout.js b/layouts/simple_world/layout.js index 282a2929a..eead87d60 100644 --- a/layouts/simple_world/layout.js +++ b/layouts/simple_world/layout.js @@ -1,5 +1,12 @@ $(function() { - $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + if($('.layout_menu>ul>li:first-child').width() > 50) { + $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + } +$( window ).resize(function() { + if($('.layout_menu>ul>li:first-child').width() > 50) { + $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + } +}); "use strict"; diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss index e38b435fe..d71c81bd6 100644 --- a/layouts/simple_world/layout.scss +++ b/layouts/simple_world/layout.scss @@ -208,6 +208,7 @@ body { .layout_menu>ul>li:first-child { float: right; + } .layout_menu li a, .dropbtn { @@ -216,10 +217,8 @@ body { text-align: center; padding: 14px 16px; text-decoration: none; -} - -.layout_menu>ul>li:first-child { - float: right; + font-size: 13px; + line-height: 1; } .layout_menu li.active>a { @@ -238,7 +237,7 @@ body { } .layout_menu li.layout_dropdown { - display: inline-block; + display: block; } .layout_menu .layout_dropdown-content { @@ -448,6 +447,7 @@ body { position: relative; background-color: lighten($grey, 35%); color: layoutGrayContrast(lighten($grey, 35%), 0.710); + width: 100%; min-width: 100%; box-shadow: none; } From 8aaae59b80b8a95467a5f7e7ac2383209919ae15 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 5 Sep 2016 17:39:14 +0900 Subject: [PATCH 03/28] Fix member menu width --- layouts/simple_world/layout.js | 24 +++++++++++++++--------- layouts/simple_world/layout.scss | 6 +++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/layouts/simple_world/layout.js b/layouts/simple_world/layout.js index eead87d60..e15ffe6ea 100644 --- a/layouts/simple_world/layout.js +++ b/layouts/simple_world/layout.js @@ -1,15 +1,20 @@ $(function() { - if($('.layout_menu>ul>li:first-child').width() > 50) { - $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); - } -$( window ).resize(function() { - if($('.layout_menu>ul>li:first-child').width() > 50) { - $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); - } -}); - "use strict"; + var menu_width = function() { + if($('.layout_menu>ul>li:first-child').width() > 50) { + $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + } + } + + $( window ).resize(function() { + if($('.layout_menu>ul>li:first-child').width() > 50) { + menu_width(); + } + }); + + menu_width(); + var toggles = document.querySelectorAll(".layout_mobile_menu"); for (var i = toggles.length - 1; i >= 0; i--) { @@ -27,6 +32,7 @@ $( window ).resize(function() { obj.classList.remove("is-active"); } else { + $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', '').css('min-width', ''); var targetMenu = $(obj).attr('data-target'); $('#' + targetMenu).slideDown('300'); diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss index d71c81bd6..f708a284b 100644 --- a/layouts/simple_world/layout.scss +++ b/layouts/simple_world/layout.scss @@ -217,8 +217,8 @@ body { text-align: center; padding: 14px 16px; text-decoration: none; - font-size: 13px; - line-height: 1; + font-size: 13px; + line-height: 1; } .layout_menu li.active>a { @@ -447,7 +447,7 @@ body { position: relative; background-color: lighten($grey, 35%); color: layoutGrayContrast(lighten($grey, 35%), 0.710); - width: 100%; + width: 100%; min-width: 100%; box-shadow: none; } From 1d52f91cdf8f75c969f13a06bcf11d17758dcf28 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 5 Sep 2016 19:54:21 +0900 Subject: [PATCH 04/28] Support language select --- layouts/simple_world/conf/info.xml | 6 ++- layouts/simple_world/layout.html | 16 +++++++ layouts/simple_world/layout.js | 12 +++-- layouts/simple_world/layout.scss | 72 ++++++++++++++++++++++++++++-- 4 files changed, 97 insertions(+), 9 deletions(-) diff --git a/layouts/simple_world/conf/info.xml b/layouts/simple_world/conf/info.xml index c18ae48b8..94940f107 100644 --- a/layouts/simple_world/conf/info.xml +++ b/layouts/simple_world/conf/info.xml @@ -12,9 +12,13 @@ - 사이트 중심 메뉴 + 상단 메뉴 Global Navigation Menu + + 하단 메뉴 + Footer Navigation Menu + diff --git a/layouts/simple_world/layout.html b/layouts/simple_world/layout.html index 6ac51cd69..801578967 100644 --- a/layouts/simple_world/layout.html +++ b/layouts/simple_world/layout.html @@ -121,7 +121,23 @@ \ No newline at end of file diff --git a/layouts/simple_world/layout.js b/layouts/simple_world/layout.js index e15ffe6ea..b7822271c 100644 --- a/layouts/simple_world/layout.js +++ b/layouts/simple_world/layout.js @@ -2,13 +2,13 @@ $(function() { "use strict"; var menu_width = function() { - if($('.layout_menu>ul>li:first-child').width() > 50) { - $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', $('.layout_menu>ul>li:first-child').width()).css('min-width', $('.layout_menu>ul>li:first-child').width()); + if($('#layout_gnb>ul>li:first-child').width() > 50) { + $('#layout_gnb>ul>li:first-child .layout_dropdown-content, #layout_gnb>ul>li:first-child .layout_dropdown-content a').css('width', $('#layout_gnb>ul>li:first-child').width()).css('min-width', $('#layout_gnb>ul>li:first-child').width()); } } $( window ).resize(function() { - if($('.layout_menu>ul>li:first-child').width() > 50) { + if($('#layout_gnb>ul>li:first-child').width() > 50) { menu_width(); } }); @@ -32,7 +32,7 @@ $(function() { obj.classList.remove("is-active"); } else { - $('.layout_menu>ul>li:first-child .layout_dropdown-content, .layout_menu>ul>li:first-child .layout_dropdown-content a').css('width', '').css('min-width', ''); + $('#layout_gnb>ul>li:first-child .layout_dropdown-content, #layout_gnb>ul>li:first-child .layout_dropdown-content a').css('width', '').css('min-width', ''); var targetMenu = $(obj).attr('data-target'); $('#' + targetMenu).slideDown('300'); @@ -47,4 +47,8 @@ $(function() { }); } + // Language Select + $('.language>.toggle').click(function(){ + $('.selectLang').toggle(); + }); }); \ No newline at end of file diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss index f708a284b..704465628 100644 --- a/layouts/simple_world/layout.scss +++ b/layouts/simple_world/layout.scss @@ -206,7 +206,7 @@ body { float: left; } -.layout_menu>ul>li:first-child { +#layout_gnb>ul>li:first-child { float: right; } @@ -231,7 +231,10 @@ body { .layout_menu li a:active, .layout_dropdown:hover .dropbtn, .layout_dropdown:focus .dropbtn, -.layout_dropdown:active .dropbtn { +.layout_dropdown:active .dropbtn, +.language li:hover button, +.language li:focus button, +.language li:active button { background-color: $primary-color; color: layoutGrayContrast($primary-color, 0.710); } @@ -248,7 +251,6 @@ body { box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); } - .layout_menu .layout_dropdown-content a { color: black; padding: 12px 16px; @@ -269,7 +271,59 @@ body { .layout_menu .layout_dropdown:hover .layout_dropdown-content { display: block; } +/* Language */ +.language{ + display: inline-block; + width: 100%; + text-align: right; +} +.language ul::before { + content: ""; + display: block; + clear: both; +} +.language ul { + display: none; + float:right; + width:120px; + clear:both; + margin: 0; + padding: 0; + z-index: 9999999; + box-shadow: 0px 8px 16px 0px rgba(255,255,255,0.2); +} +.language .toggle{ + background:none; + display: block; + float: right; + width:120px; + border:0; + color:#fff; + cursor:pointer; + vertical-align:top; + text-align:right; + padding:0; + height:45px; +} + +.language li{ + list-style:none; + background: lighten($grey, 40%); +} +.language li button { + display:block; + color: black; + background: lighten($grey, 40%); + padding: 12px 16px; + text-decoration: none; + width: 100%; + display: block; + text-align: left; + box-sizing: border-box; + border:0; + cursor:pointer; +} /* Hamberger menu http://callmenick.com/post/animating-css-only-hamburger-menu-icons Licensed under the MIT license, http://www.opensource.org/licenses/mit-license.php Copyright 2014, Call Me Nick http://callmenick.com */ .layout_mobile_menu { @@ -416,7 +470,7 @@ body { background-color: lighten($grey, 31%); } - .layout_menu>ul>li, .layout_menu>ul>li:first-child { + .layout_menu>ul>li, #layout_gnb>ul>li:first-child { float: none; } @@ -461,6 +515,16 @@ body { text-align: left; } + .language ul { + display: none; + float:none; + width:100%; + } + .language .toggle{ + display: block; + float: none; + width:100%; + } /* PC only */ .layout_pc { display: none; From 2a1e874a6febdb9f4f92fbb617ca8f76d5294718 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 5 Sep 2016 19:56:50 +0900 Subject: [PATCH 05/28] Lang code fix... for RX --- layouts/simple_world/lang/lang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/simple_world/lang/lang.xml b/layouts/simple_world/lang/lang.xml index 5595db5f3..0c0dc5d2c 100644 --- a/layouts/simple_world/lang/lang.xml +++ b/layouts/simple_world/lang/lang.xml @@ -3,13 +3,13 @@ - + - + \ No newline at end of file From 0e0356876e3561cf363069b33d043ebbda23b0e9 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 5 Sep 2016 20:03:32 +0900 Subject: [PATCH 06/28] . --- layouts/simple_world/layout.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss index 704465628..499088dee 100644 --- a/layouts/simple_world/layout.scss +++ b/layouts/simple_world/layout.scss @@ -277,7 +277,9 @@ body { width: 100%; text-align: right; } - +.language button { + outline: none; +} .language ul::before { content: ""; display: block; @@ -514,7 +516,9 @@ body { display: block; text-align: left; } - + .language { + margin-top: 30px; + } .language ul { display: none; float:none; From c4d303591da2ad961a4983be1b5f29ca2be67eb9 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 6 Sep 2016 18:51:03 +0900 Subject: [PATCH 07/28] modify footer menu style --- layouts/simple_world/layout.scss | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/layouts/simple_world/layout.scss b/layouts/simple_world/layout.scss index 499088dee..3712017d5 100644 --- a/layouts/simple_world/layout.scss +++ b/layouts/simple_world/layout.scss @@ -120,9 +120,9 @@ body { display: none; } -/*.layout_footer */ +/* .layout_footer */ .layout_footer { - padding:30px 10px 70px; + padding:10px; border-top:1px solid lighten($grey, 10%); background-color: darken($grey, 35%); color: lighten($grey, 30%); @@ -271,6 +271,12 @@ body { .layout_menu .layout_dropdown:hover .layout_dropdown-content { display: block; } +.layout_footer .layout_menu li a, .layout_footer .dropbtn { + color: #fff; + font-weight: normal; + text-decoration: none; +} + /* Language */ .language{ display: inline-block; @@ -516,6 +522,16 @@ body { display: block; text-align: left; } + + .layout_footer .layout_menu { + display: block; + margin-bottom: 10px; + } + + .layout_footer .layout_menu ul { + background-color: transparent; + } + .language { margin-top: 30px; } From 0d0775e0523040912f1f1b1261afed7b592e582b Mon Sep 17 00:00:00 2001 From: BJRambo Date: Thu, 8 Sep 2016 03:12:04 +0900 Subject: [PATCH 08/28] clear notification when a user is reading the posts --- .../ncenterlite/ncenterlite.controller.php | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index fb50a53c3..2a5963be6 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -498,11 +498,24 @@ class ncenterliteController extends ncenterlite $oDocument = Context::get('oDocument'); $logged_info = Context::get('logged_info'); - if($document_srl && $logged_info && $config->document_read == 'Y') + if($document_srl && Context::get('is_logged') && $config->document_read == 'Y') { - $args->srl = $document_srl; - $args->member_srl = $logged_info->member_srl; - $outputs = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args); + $notify_count = getModel('ncenterlite')->_getNewCount(); + if($notify_count) + { + $args->srl = $document_srl; + $args->member_srl = $logged_info->member_srl; + $outputs = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args); + if($outputs->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } + } } if($comment_srl && $document_srl && $oDocument) @@ -574,7 +587,16 @@ class ncenterliteController extends ncenterlite $args = new stdClass(); $args->target_srl = $message_srl; $args->member_srl = $logged_info->member_srl; - executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args); + $update_output = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args); + if($update_output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } } } @@ -631,6 +653,15 @@ class ncenterliteController extends ncenterlite $args->srl = $vars->document_srl; $args->type = $this->_TYPE_DOCUMENT; $output = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args); + if($output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } } } else if($oModule->act == 'getKinComments') @@ -640,6 +671,15 @@ class ncenterliteController extends ncenterlite $args->member_srl = $logged_info->member_srl; $args->target_srl = $vars->parent_srl; $output = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args); + if($output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } } return new Object(); From 657c0e30b8f4ac6e5befc8b6da3ed972b5db2218 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Thu, 8 Sep 2016 03:14:01 +0900 Subject: [PATCH 09/28] Remove unused code. --- .../ncenterlite/ncenterlite.controller.php | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 2a5963be6..15d9f507a 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -526,7 +526,6 @@ class ncenterliteController extends ncenterlite if(array_key_exists($comment_srl, $_comment_list)) { $url = getNotEncodedUrl('_comment_srl', '') . '#comment_' . $comment_srl; - $need_check_socialxe = true; } else { @@ -534,7 +533,6 @@ class ncenterliteController extends ncenterlite if($cpage > 1) { $url = getNotEncodedUrl('cpage', $cpage - 1) . '#comment_' . $comment_srl; - $need_check_socialxe = true; } else { @@ -542,35 +540,6 @@ class ncenterliteController extends ncenterlite } } - if($need_check_socialxe) - { - $oDB = &DB::getInstance(); - if($oDB->isTableExists('socialxe')) - { - $args = new stdClass(); - $oModuleModel = getModel('module'); - $module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl); - $args->module_srl = $module_info->module_srl; - $output = executeQuery('ncenterlite.getSocialxeCount', $args); - if($output->data->cnt) - { - $socialxe_comment_srl = $comment_srl; - - $args = new stdClass(); - $args->comment_srl = $comment_srl; - $oCommentModel = getModel('comment'); - $oComment = $oCommentModel->getComment($comment_srl); - $parent_srl = $oComment->get('parent_srl'); - if($parent_srl) - { - $socialxe_comment_srl = $parent_srl; - } - - $url = getNotEncodedUrl('_comment_srl', '', 'cpage', '', 'comment_srl', $socialxe_comment_srl) . '#comment_' . $comment_srl; - } - } - } - $url = str_replace('&', '&', $url); header('location: ' . $url); Context::close(); From 29a456a1c91cc4541193214cd990333afa4da057 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Thu, 8 Sep 2016 03:21:34 +0900 Subject: [PATCH 10/28] Delete trigger are executed, delete the cache files. --- .../ncenterlite/ncenterlite.controller.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 15d9f507a..a5518bcd4 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -63,6 +63,15 @@ class ncenterliteController extends ncenterlite { return $output; } + else + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } return new Object(); } @@ -414,6 +423,15 @@ class ncenterliteController extends ncenterlite $args = new stdClass(); $args->srl = $obj->comment_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); + if($output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } return new Object(); } @@ -429,6 +447,15 @@ class ncenterliteController extends ncenterlite $args = new stdClass(); $args->srl = $obj->document_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); + if($output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } return new Object(); } @@ -445,6 +472,15 @@ class ncenterliteController extends ncenterlite $args = new stdClass(); $args->srl = $obj->document_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); + if($output->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } return new Object(); } @@ -489,6 +525,15 @@ class ncenterliteController extends ncenterlite $args->target_srl = $comment_srl; $args->member_srl = $logged_info->member_srl; $output_update = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args); + if($output_update->toBool()) + { + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } } } else if($oModule->act == 'dispBoardContent') From 99e1870e2f3d11b12d6ad67ef72df6ad707daced Mon Sep 17 00:00:00 2001 From: BJRambo Date: Thu, 8 Sep 2016 03:25:32 +0900 Subject: [PATCH 11/28] Increase the version to be excluded from the list of updates. --- modules/ncenterlite/conf/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ncenterlite/conf/info.xml b/modules/ncenterlite/conf/info.xml index fd5bf8f8a..1c68ebe2a 100644 --- a/modules/ncenterlite/conf/info.xml +++ b/modules/ncenterlite/conf/info.xml @@ -4,7 +4,7 @@ Notification Center Lite 사이트 사용자간의 커뮤니케이션에 대한 정보를 알려주는 모듈입니다. This module notify users of information about new documents, comments and/or messages that call them. This module will enhance communication beween site users. - 3.0.0 + 3.1 2016-04-17 content From ab4c3d370504eddd5878f444cdc18f94bc239ad6 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 05:06:00 +0900 Subject: [PATCH 12/28] srl column don't use comment_srl number. --- modules/ncenterlite/ncenterlite.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index a5518bcd4..10ca9a640 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -421,7 +421,7 @@ class ncenterliteController extends ncenterlite } $args = new stdClass(); - $args->srl = $obj->comment_srl; + $args->target_srl = $obj->comment_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); if($output->toBool()) { From 1112bd1ce6eba203f296796630ac03e51827fb52 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 18:51:05 +0900 Subject: [PATCH 13/28] add removeFlagFile method. --- .../ncenterlite/ncenterlite.controller.php | 83 +++++++------------ 1 file changed, 29 insertions(+), 54 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 10ca9a640..734d0c94c 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -65,12 +65,7 @@ class ncenterliteController extends ncenterlite } else { - //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } return new Object(); } @@ -421,17 +416,21 @@ class ncenterliteController extends ncenterlite } $args = new stdClass(); - $args->target_srl = $obj->comment_srl; + $args->srl = $obj->comment_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); if($output->toBool()) { + $oDocumentModel = getModel('document'); + $oDocument = $oDocumentModel->getDocument($obj->document_srl); + //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($oDocument->get('member_srl')) . $oDocument->get('member_srl') . '.php'; if(file_exists($flag_path)) { FileHandler::removeFile($flag_path); } } + return new Object(); } @@ -528,11 +527,7 @@ class ncenterliteController extends ncenterlite if($output_update->toBool()) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } } } @@ -554,11 +549,7 @@ class ncenterliteController extends ncenterlite if($outputs->toBool()) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } } } @@ -605,11 +596,7 @@ class ncenterliteController extends ncenterlite if($update_output->toBool()) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } } } @@ -670,11 +657,7 @@ class ncenterliteController extends ncenterlite if($output->toBool()) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } } } @@ -688,11 +671,7 @@ class ncenterliteController extends ncenterlite if($output->toBool()) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); } } @@ -923,11 +902,7 @@ class ncenterliteController extends ncenterlite //$output = executeQuery('ncenterlite.deleteNotify', $args); //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); return $output; } @@ -940,11 +915,7 @@ class ncenterliteController extends ncenterlite //$output = executeQuery('ncenterlite.deleteNotifyByTargetSrl', $args); //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); return $output; } @@ -956,11 +927,7 @@ class ncenterliteController extends ncenterlite //$output = executeQuery('ncenterlite.deleteNotifyByMemberSrl', $args); //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); return $output; } @@ -1105,12 +1072,7 @@ class ncenterliteController extends ncenterlite } } - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - //remove flag files - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($args->member_srl); return $output; } @@ -1132,6 +1094,19 @@ class ncenterliteController extends ncenterlite FileHandler::writeFile($flag_path, $buff); } + public static function removeFlagFile($member_srl = null) + { + $logged_info = Context::get('logged_info'); + if($member_srl === null && Context::get('is_logged')) + { + $member_srl = $logged_info->member_srl; + } + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } + } /** * @brief 노티 ID 반환 From b4b95465314b639fc7a89d1adce4eab42fe3893d Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 18:53:27 +0900 Subject: [PATCH 14/28] Delete logged_info check code. --- modules/ncenterlite/ncenterlite.controller.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 734d0c94c..f010e2cde 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -1096,11 +1096,6 @@ class ncenterliteController extends ncenterlite public static function removeFlagFile($member_srl = null) { - $logged_info = Context::get('logged_info'); - if($member_srl === null && Context::get('is_logged')) - { - $member_srl = $logged_info->member_srl; - } $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; if(file_exists($flag_path)) { From 13b69cbf38f70516235799c8c50c114100156a0b Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 19:31:19 +0900 Subject: [PATCH 15/28] =?UTF-8?q?=ED=9C=B4=EC=A7=80=ED=86=B5=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99=EC=8B=9C=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=EC=9D=B4=EC=9E=88=EB=8A=94=20=ED=9A=8C=EC=9B=90=EB=93=A4?= =?UTF-8?q?=EC=9D=98=20=EC=BA=90=EC=8B=9C=EB=A5=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ncenterlite/ncenterlite.controller.php | 31 ++++++++++++------- modules/ncenterlite/ncenterlite.model.php | 17 ++++++++++ .../queries/getNotifyListByDocumentSrl.xml | 11 +++++++ 3 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index f010e2cde..48acbae78 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -446,14 +446,9 @@ class ncenterliteController extends ncenterlite $args = new stdClass(); $args->srl = $obj->document_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); - if($output->toBool()) + if(!$output->toBool()) { - //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + return $output; } return new Object(); } @@ -461,6 +456,17 @@ class ncenterliteController extends ncenterlite function triggerAfterMoveToTrash(&$obj) { $oNcenterliteModel = getModel('ncenterlite'); + $notify_list = $oNcenterliteModel->getNotifyListByDocumentSrl($obj->document_srl); + + $member_srls = array(); + foreach($notify_list as $value) + { + if(!in_array($value->member_srl, $member_srls)) + { + $member_srls = $value->member_srl; + } + } + $config = $oNcenterliteModel->getConfig(); if(empty($config->use)) @@ -473,11 +479,14 @@ class ncenterliteController extends ncenterlite $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); if($output->toBool()) { - //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php'; - if(file_exists($flag_path)) + foreach($member_srls as $member_srl) { - FileHandler::removeFile($flag_path); + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } } } return new Object(); diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 7794d386f..421acf185 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -457,4 +457,21 @@ class ncenterliteModel extends ncenterlite return zdate($datetime, 'Y-m-d'); } + + function getNotifyListByDocumentSrl($document_srl = null) + { + if($document_srl === null) + { + return false; + } + $args = new stdClass(); + $args->document_srl = $document_srl; + $output = executeQueryArray('ncenterlite.getNotifyListByDocumentSrl', $args); + if(!$output->toBool()) + { + return $output; + } + + return $output->data; + } } diff --git a/modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml b/modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml new file mode 100644 index 000000000..565f223c8 --- /dev/null +++ b/modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + From 20cbdc6ef3b46fba969412c2c87e8f1f59e28376 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 19:36:41 +0900 Subject: [PATCH 16/28] =?UTF-8?q?=EB=A7=B4=EB=B2=84=EC=8B=9C=EB=A6=AC?= =?UTF-8?q?=EC=96=BC=EB=84=98=EB=B2=84=EA=B0=80=20=EC=97=86=EC=9D=84?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20=ED=94=8C=EB=9E=98=EA=B7=B8=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=EB=A5=BC=20=EC=8B=A4=ED=96=89=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ncenterlite/ncenterlite.controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 48acbae78..6aaa6c1ff 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -1105,6 +1105,11 @@ class ncenterliteController extends ncenterlite public static function removeFlagFile($member_srl = null) { + if($member_srl === null) + { + return; + } + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; if(file_exists($flag_path)) { From 28cec75752a0def5f66031777cdbe3f6352b62c0 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 19:39:17 +0900 Subject: [PATCH 17/28] =?UTF-8?q?=EB=A6=B4=EB=A6=AC=EC=A6=88=EB=82=A0?= =?UTF-8?q?=EC=9E=90=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ncenterlite/conf/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ncenterlite/conf/info.xml b/modules/ncenterlite/conf/info.xml index 1c68ebe2a..76cc4c118 100644 --- a/modules/ncenterlite/conf/info.xml +++ b/modules/ncenterlite/conf/info.xml @@ -5,7 +5,7 @@ 사이트 사용자간의 커뮤니케이션에 대한 정보를 알려주는 모듈입니다. This module notify users of information about new documents, comments and/or messages that call them. This module will enhance communication beween site users. 3.1 - 2016-04-17 + 2016-09-10 content XE Public From f56b23e52219a0bd3643d497b08ec01500f65185 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 19:44:07 +0900 Subject: [PATCH 18/28] Fixed missing array code. --- modules/ncenterlite/ncenterlite.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 6aaa6c1ff..f34121710 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -463,7 +463,7 @@ class ncenterliteController extends ncenterlite { if(!in_array($value->member_srl, $member_srls)) { - $member_srls = $value->member_srl; + $member_srls[] = $value->member_srl; } } From 5848572bb17b2414276ff61ef3e5f2fc9267dab2 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 20:29:47 +0900 Subject: [PATCH 19/28] =?UTF-8?q?=EB=8C=80=EB=8C=93=EA=B8=80=EC=9D=BC?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=EB=A5=BC=20=EB=8C=80=EB=B9=84=ED=95=B4?= =?UTF-8?q?=EC=84=9C=20=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ncenterlite/ncenterlite.controller.php | 26 ++++++++++++++----- modules/ncenterlite/ncenterlite.model.php | 17 ++++++++++++ .../getNotifyMemberSrlByCommentSrl.xml | 12 +++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 modules/ncenterlite/queries/getNotifyMemberSrlByCommentSrl.xml diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index f34121710..b0f28827e 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -415,19 +415,31 @@ class ncenterliteController extends ncenterlite return new Object(); } + $notify_list = $oNcenterliteModel->getNotifyMemberSrlByCommentSrl($obj->comment_srl); + + // 대댓글이 2개이상일경우 comment + $member_srls = array(); + foreach($notify_list as $value) + { + if(!in_array($value->member_srl, $member_srls)) + { + $member_srls[] = $value->member_srl; + } + } + $args = new stdClass(); $args->srl = $obj->comment_srl; $output = executeQuery('ncenterlite.deleteNotifyBySrl', $args); if($output->toBool()) { - $oDocumentModel = getModel('document'); - $oDocument = $oDocumentModel->getDocument($obj->document_srl); - - //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($oDocument->get('member_srl')) . $oDocument->get('member_srl') . '.php'; - if(file_exists($flag_path)) + foreach($member_srls as $member_srl) { - FileHandler::removeFile($flag_path); + //Remove flag files + $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; + if(file_exists($flag_path)) + { + FileHandler::removeFile($flag_path); + } } } diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 421acf185..73b04d041 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -474,4 +474,21 @@ class ncenterliteModel extends ncenterlite return $output->data; } + + function getNotifyMemberSrlByCommentSrl($comment_srl) + { + if(!$comment_srl === null) + { + return false; + } + $args = new stdClass(); + $args->srl = $comment_srl; + $output = executeQueryArray('ncenterlite.getNotifyMemberSrlByCommentSrl', $args); + if(!$output->toBool()) + { + return $output; + } + + return $output->data; + } } diff --git a/modules/ncenterlite/queries/getNotifyMemberSrlByCommentSrl.xml b/modules/ncenterlite/queries/getNotifyMemberSrlByCommentSrl.xml new file mode 100644 index 000000000..7e2727799 --- /dev/null +++ b/modules/ncenterlite/queries/getNotifyMemberSrlByCommentSrl.xml @@ -0,0 +1,12 @@ + + +
+ + + + + + + + + From e0b619dea0f5b976c13583b0a310931a33c3c6f8 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 20:34:16 +0900 Subject: [PATCH 20/28] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EB=82=B4=EC=9A=A9?= =?UTF-8?q?=EC=9D=84=20=EB=AA=85=ED=99=95=ED=95=98=EA=B2=8C=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ncenterlite/ncenterlite.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index b0f28827e..6b45ad369 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -417,7 +417,7 @@ class ncenterliteController extends ncenterlite $notify_list = $oNcenterliteModel->getNotifyMemberSrlByCommentSrl($obj->comment_srl); - // 대댓글이 2개이상일경우 comment + // 대댓글의 대댓글일 경우 혹은 중복적으로 받는 경우 comment_srl 당 2개이상 notify가 생성될 수 있다. $member_srls = array(); foreach($notify_list as $value) { From 0a669054906018c262cead8c061d6ce733d1390d Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Sep 2016 20:37:18 +0900 Subject: [PATCH 21/28] =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EC=95=A1=EC=85=98?= =?UTF-8?q?=EC=9D=84=20=EB=A9=94=EC=86=8C=EB=93=9C=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ncenterlite/ncenterlite.controller.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 6b45ad369..1b8641368 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -435,11 +435,7 @@ class ncenterliteController extends ncenterlite foreach($member_srls as $member_srl) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($member_srl); } } @@ -494,11 +490,7 @@ class ncenterliteController extends ncenterlite foreach($member_srls as $member_srl) { //Remove flag files - $flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php'; - if(file_exists($flag_path)) - { - FileHandler::removeFile($flag_path); - } + self::removeFlagFile($member_srl); } } return new Object(); From 3291375fc4e22dc7dc2e73c66c55ebba910b4402 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 13 Sep 2016 23:06:42 +0900 Subject: [PATCH 22/28] Fix missing $SUBPAGE_TITLE in document view SEO setting --- modules/board/board.view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 41af3c945..b64f55926 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -323,7 +323,7 @@ class boardView extends board Context::setBrowserTitle($seo_title, array( 'site_title' => Context::getSiteTitle(), 'site_subtitle' => Context::getSiteSubtitle(), - 'subpage_title' => $module_info->browser_title, + 'subpage_title' => $this->module_info->browser_title, 'document_title' => $oDocument->getTitleText(), 'page' => Context::get('page') ?: 1, )); From cf6c5f727e854d315a8dfe9ba4ffc4096c9d68c9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 14 Sep 2016 13:13:29 +0900 Subject: [PATCH 23/28] Add option to control error logging --- common/defaults/config.php | 1 + common/framework/debug.php | 19 ++++++++++--------- modules/admin/admin.admin.controller.php | 1 + modules/admin/admin.admin.view.php | 1 + modules/admin/lang/en.php | 4 ++++ modules/admin/lang/ko.php | 4 ++++ modules/admin/tpl/config_debug.html | 8 ++++++++ tests/unit/framework/DebugTest.php | 6 ++---- 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/common/defaults/config.php b/common/defaults/config.php index 479119c0d..1afb6a510 100644 --- a/common/defaults/config.php +++ b/common/defaults/config.php @@ -88,6 +88,7 @@ return array( 'display_type' => 'comment', 'display_content' => array(), 'display_to' => 'admin', + 'write_error_log' => 'fatal', 'allow' => array(), ), 'seo' => array( diff --git a/common/framework/debug.php b/common/framework/debug.php index ee366ff3c..5ef7aaf68 100644 --- a/common/framework/debug.php +++ b/common/framework/debug.php @@ -22,11 +22,6 @@ class Debug protected static $_remote_requests = array(); protected static $_slow_remote_requests = array(); - /** - * Also write to error log. - */ - public static $write_to_error_log = true; - /** * Get all entries. * @@ -166,7 +161,7 @@ class Debug self::$_entries[] = $entry; // Add the entry to the error log. - if (self::$write_to_error_log && self::isEnabledForCurrentUser()) + if (config('debug.write_error_log') === 'all' && self::isEnabledForCurrentUser()) { $log_entry = str_replace("\0", '', sprintf('Rhymix Debug: %s in %s on line %d', var_export($message, true), $entry->file, $entry->line)); @@ -215,7 +210,7 @@ class Debug ); // Add the entry to the error log. - if (self::$write_to_error_log) + if (config('debug.write_error_log') === 'all') { $log_entry = strtr(sprintf('PHP %s: %s in %s on line %d', $errinfo->type, $errstr, $errfile, intval($errline)), "\0\r\n\t\v\e\f", ' '); error_log($log_entry . \PHP_EOL . self::formatBacktrace($backtrace)); @@ -371,7 +366,10 @@ class Debug $log_entry = str_replace("\0", '', sprintf('%s #%d "%s" in %s on line %d', get_class($e), $e->getCode(), $e->getMessage(), $errfile, $e->getLine())); } - error_log('PHP Exception: ' . $log_entry . \PHP_EOL . self::formatBacktrace($e->getTrace())); + if (config('debug.write_error_log') !== 'none') + { + error_log('PHP Exception: ' . $log_entry . \PHP_EOL . self::formatBacktrace($e->getTrace())); + } // Display the error screen. self::displayErrorScreen($log_entry); @@ -398,7 +396,10 @@ class Debug // Add the entry to the error log. $message = sprintf('%s in %s on line %d', $errinfo['message'], $errinfo['file'], intval($errinfo['line'])); $log_entry = str_replace("\0", '', 'PHP ' . self::getErrorType($errinfo['type']) . ': ' . $message); - error_log($log_entry); + if (config('debug.write_error_log') !== 'none') + { + error_log($log_entry); + } // Display the error screen. self::displayErrorScreen($log_entry); diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index a4006bdee..91c6efeef 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -737,6 +737,7 @@ class adminAdminController extends admin Rhymix\Framework\Config::set('debug.log_slow_remote_requests', max(0, floatval($vars->debug_log_slow_remote_requests))); Rhymix\Framework\Config::set('debug.display_type', strval($vars->debug_display_type) ?: 'comment'); Rhymix\Framework\Config::set('debug.display_to', strval($vars->debug_display_to) ?: 'admin'); + Rhymix\Framework\Config::set('debug.write_error_log', strval($vars->debug_write_error_log) ?: 'fatal'); // Debug content $debug_content = array_values($vars->debug_display_content); diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index b9b91b764..71e82b240 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -559,6 +559,7 @@ class adminAdminView extends admin Context::set('debug_display_type', Rhymix\Framework\Config::get('debug.display_type')); Context::set('debug_display_content', Rhymix\Framework\Config::get('debug.display_content')); Context::set('debug_display_to', Rhymix\Framework\Config::get('debug.display_to')); + Context::set('debug_write_error_log', Rhymix\Framework\Config::get('debug.write_error_log')); // IP access control $allowed_ip = Rhymix\Framework\Config::get('debug.allow'); diff --git a/modules/admin/lang/en.php b/modules/admin/lang/en.php index 4e26b9682..d7bd7c2e6 100644 --- a/modules/admin/lang/en.php +++ b/modules/admin/lang/en.php @@ -159,6 +159,10 @@ $lang->debug_display_to_admin = 'Administrator only'; $lang->debug_display_to_ip = 'Visitors from IP adresses listed below'; $lang->debug_display_to_everyone = 'Everyone'; $lang->debug_log_filename = 'Log filename'; +$lang->debug_write_error_log = 'Write to Error Log'; +$lang->debug_write_error_log_all = 'All errors'; +$lang->debug_write_error_log_fatal = 'Fatal errors only'; +$lang->debug_write_error_log_none = 'None'; $lang->about_debug_log_filename = 'YYYYMMDD in the filename will be replaced with the current date.
It is recommended to split the log file by date to prevent it from getting too large.'; $lang->msg_debug_log_filename_not_writable = 'Rhymix cannot write log files in the specified path.'; $lang->debug_allowed_ip = 'Allowed IP addresses'; diff --git a/modules/admin/lang/ko.php b/modules/admin/lang/ko.php index 221dcce35..e1cb5490e 100644 --- a/modules/admin/lang/ko.php +++ b/modules/admin/lang/ko.php @@ -154,6 +154,10 @@ $lang->debug_display_to_admin = '관리자에게만 표시'; $lang->debug_display_to_ip = '아래 IP의 방문자에게만 표시'; $lang->debug_display_to_everyone = '모두에게 표시'; $lang->debug_log_filename = '디버그 정보 기록 파일'; +$lang->debug_write_error_log = '에러 로그에 기록'; +$lang->debug_write_error_log_all = '모든 에러를 기록'; +$lang->debug_write_error_log_fatal = '치명적인 에러만 기록'; +$lang->debug_write_error_log_none = '기록하지 않음'; $lang->about_debug_log_filename = '파일명에 YYYYMMDD가 포함된 경우 날짜별로 파일을 분리하여 기록합니다.
파일을 분리하지 않으면 용량이 매우 커질 수 있으니 주의하십시오.'; $lang->msg_debug_log_filename_not_writable = '지정한 경로에 로그 파일을 작성할 수 없습니다.'; $lang->debug_allowed_ip = '디버그 허용 IP'; diff --git a/modules/admin/tpl/config_debug.html b/modules/admin/tpl/config_debug.html index 7ca92e55b..e8d69062f 100644 --- a/modules/admin/tpl/config_debug.html +++ b/modules/admin/tpl/config_debug.html @@ -84,6 +84,14 @@ +
+ +
+ + + +
+
diff --git a/tests/unit/framework/DebugTest.php b/tests/unit/framework/DebugTest.php index 444ebac1f..143ebbed7 100644 --- a/tests/unit/framework/DebugTest.php +++ b/tests/unit/framework/DebugTest.php @@ -5,8 +5,7 @@ class DebugTest extends \Codeception\TestCase\Test public function testDebugEntry() { $file = __FILE__; - $line = __LINE__ + 2; - Rhymix\Framework\Debug::$write_to_error_log = false; + $line = __LINE__ + 1; Rhymix\Framework\Debug::addEntry('foobar entry'); $entries = Rhymix\Framework\Debug::getEntries(); $this->assertEquals(1, count($entries)); @@ -18,8 +17,7 @@ class DebugTest extends \Codeception\TestCase\Test public function testDebugError() { $file = __FILE__; - $line = __LINE__ + 2; - Rhymix\Framework\Debug::$write_to_error_log = false; + $line = __LINE__ + 1; Rhymix\Framework\Debug::addError(~0, 'Rhymix', $file, $line, null); $errors = Rhymix\Framework\Debug::getErrors(); $this->assertGreaterThanOrEqual(1, count($errors)); From be9a109a376541c02978e23010c4442490e93c78 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 12 Sep 2016 22:53:56 +0900 Subject: [PATCH 24/28] Support in XML query section --- classes/db/queryparts/limit/Limit.class.php | 11 ++++++++--- .../xmlquery/tags/navigation/LimitTag.class.php | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/classes/db/queryparts/limit/Limit.class.php b/classes/db/queryparts/limit/Limit.class.php index 5e660c4d6..e84fd3390 100644 --- a/classes/db/queryparts/limit/Limit.class.php +++ b/classes/db/queryparts/limit/Limit.class.php @@ -37,10 +37,11 @@ class Limit * constructor * @param int $list_count * @param int $page - * @param int $page_count + * @param int $page_count + * @param int $offset * @return void */ - function __construct($list_count, $page = NULL, $page_count = NULL) + function __construct($list_count, $page = NULL, $page_count = NULL, $offset = NULL) { $this->list_count = $list_count; if($page) @@ -50,6 +51,10 @@ class Limit $this->start = ($page_value - 1) * $list_count_value; $this->page_count = $page_count; $this->page = $page; + } + elseif($offset) + { + $this->start = $offset->getValue(); } } @@ -81,7 +86,7 @@ class Limit function toString() { - if($this->page) + if($this->page || $this->start) { return $this->start . ' , ' . $this->list_count->getValue(); } diff --git a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php index e3ff511dd..6bef36a33 100644 --- a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php @@ -35,6 +35,12 @@ class LimitTag */ var $list_count; + /** + * QueryArgument object + * @var QueryArgument + */ + var $offset; + /** * constructor * @param object $index @@ -58,6 +64,12 @@ class LimitTag $index->list_count->attrs->default = 0; $this->list_count = new QueryArgument($index->list_count); $this->arguments[] = $this->list_count; + + if(isset($index->offset) && isset($index->offset->attrs)) + { + $this->offset = new QueryArgument($index->offset); + $this->arguments[] = $this->offset; + } } function toString() @@ -66,6 +78,10 @@ class LimitTag { return sprintf('new Limit(${\'%s_argument\'}, ${\'%s_argument\'}, ${\'%s_argument\'})', $this->list_count->getArgumentName(), $this->page->getArgumentName(), $this->page_count->getArgumentName()); } + elseif($this->offset) + { + return sprintf('new Limit(${\'%s_argument\'}, NULL, NULL, ${\'%s_argument\'})', $this->list_count->getArgumentName(), $this->offset->getArgumentName()); + } else { return sprintf('new Limit(${\'%s_argument\'})', $this->list_count->getArgumentName()); From 9d594526b4e7fb54ef6a35b2672278bf7aab4c34 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 16 Sep 2016 16:44:29 +0900 Subject: [PATCH 25/28] Cache grant information for modules and documents https://www.xetown.com/qna/374223 http://sejin7940.co.kr/xe_tips/108198 --- modules/document/document.item.php | 42 +++++++++++++++++++++++------- modules/module/module.model.php | 10 +++++++ 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 605703b43..788325118 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -20,6 +20,11 @@ class documentItem extends Object * @var string */ var $lang_code = null; + /** + * grant + * @var bool + */ + var $grant_cache = null; /** * Status of allow trackback * @var bool @@ -157,25 +162,44 @@ class documentItem extends Object function isGranted() { - if($_SESSION['own_document'][$this->document_srl]) return true; - - if(!Context::get('is_logged')) return false; - + if ($this->grant_cache !== null) + { + return $this->grant_cache; + } + + if ($_SESSION['own_document'][$this->document_srl]) + { + return $this->grant_cache = true; + } + $logged_info = Context::get('logged_info'); - if($logged_info->is_admin == 'Y') return true; + if (!$logged_info->member_srl) + { + return $this->grant_cache = false; + } + if ($logged_info->is_admin == 'Y') + { + return $this->grant_cache = true; + } + if ($this->get('member_srl') && abs($this->get('member_srl')) == $logged_info->member_srl) + { + return $this->grant_cache = true; + } $oModuleModel = getModel('module'); $grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info); - if($grant->manager) return true; + if ($grant->manager) + { + return $this->grant_cache = true; + } - if($this->get('member_srl') && ($this->get('member_srl') == $logged_info->member_srl || $this->get('member_srl')*-1 == $logged_info->member_srl)) return true; - - return false; + return $this->grant_cache = false; } function setGrant() { $_SESSION['own_document'][$this->document_srl] = true; + $this->grant_cache = true; } function isAccessible() diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 9ffafb54a..563d0a4f3 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -1862,6 +1862,13 @@ class moduleModel extends module */ function getGrant($module_info, $member_info, $xml_info = '') { + $cache_key = sprintf('site_and_module:module_grant:%d:%d', $module_info->module_srl, $member_info->member_srl); + $grant = Rhymix\Framework\Cache::get($cache_key); + if ($grant !== null) + { + return $grant; + } + $grant = new stdClass(); if(!$xml_info) @@ -2014,6 +2021,9 @@ class moduleModel extends module } } } + + // Set to cache and return + Rhymix\Framework\Cache::set($cache_key, $grant, 0, true); return $grant; } From 07d53f3e7e54e4f924a3f2632df54b667365813f Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 17 Sep 2016 20:24:21 +0900 Subject: [PATCH 26/28] Fix incorrect config name (DisplayHandler uses view.use_gzip) --- modules/admin/admin.admin.controller.php | 2 +- modules/admin/admin.admin.view.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index 91c6efeef..d38afd50b 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -713,7 +713,7 @@ class adminAdminController extends admin Rhymix\Framework\Config::set('view.minify_scripts', $vars->minify_scripts ?: 'common'); Rhymix\Framework\Config::set('view.concat_scripts', $vars->concat_scripts ?: 'none'); Rhymix\Framework\Config::set('view.server_push', $vars->use_server_push === 'Y'); - Rhymix\Framework\Config::set('view.gzip', $vars->use_gzip === 'Y'); + Rhymix\Framework\Config::set('view.use_gzip', $vars->use_gzip === 'Y'); // Save Rhymix\Framework\Config::save(); diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 71e82b240..f1535af65 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -538,7 +538,7 @@ class adminAdminView extends admin Context::set('minify_scripts', Rhymix\Framework\Config::get('view.minify_scripts')); Context::set('concat_scripts', Rhymix\Framework\Config::get('view.concat_scripts')); Context::set('use_server_push', Rhymix\Framework\Config::get('view.server_push')); - Context::set('use_gzip', Rhymix\Framework\Config::get('view.gzip')); + Context::set('use_gzip', Rhymix\Framework\Config::get('view.use_gzip')); $this->setTemplateFile('config_advanced'); } From f4535fbc848ee688b4d9a9247627cc3d89dc9bc8 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 18 Sep 2016 16:57:57 +0900 Subject: [PATCH 27/28] Ensure consistent ordering of triggers by module name and method name (see xpressengine/xe-core#1962) --- modules/module/queries/getTrigger.xml | 7 +++++++ modules/module/queries/getTriggers.xml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/modules/module/queries/getTrigger.xml b/modules/module/queries/getTrigger.xml index b2be983ca..c7c2dc870 100644 --- a/modules/module/queries/getTrigger.xml +++ b/modules/module/queries/getTrigger.xml @@ -12,4 +12,11 @@ + + + + + + + diff --git a/modules/module/queries/getTriggers.xml b/modules/module/queries/getTriggers.xml index 4967c88de..e31412776 100644 --- a/modules/module/queries/getTriggers.xml +++ b/modules/module/queries/getTriggers.xml @@ -9,4 +9,11 @@ + + + + + + + From 69ea93914ab7277512433a2363a2f27d2cf33ede Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 18 Sep 2016 20:59:07 +0900 Subject: [PATCH 28/28] Don't redirect from site start module unless request method is GET --- classes/module/ModuleHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index ca736d731..80cb7ad62 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -272,7 +272,7 @@ class ModuleHandler extends Handler } // redirect, if site start module - if(isset($_GET['mid']) && $_GET['mid'] === $site_module_info->mid && count($_GET) === 1) + if(Context::getRequestMethod() === 'GET' && isset($_GET['mid']) && $_GET['mid'] === $site_module_info->mid && count($_GET) === 1) { Context::setCacheControl(0); header('location: ' . getNotEncodedSiteUrl($site_module_info->domain), true, 301);