diff --git a/addons/captcha/conf/info.xml b/addons/captcha/conf/info.xml index f10a1d7af..0e72d6b9d 100644 --- a/addons/captcha/conf/info.xml +++ b/addons/captcha/conf/info.xml @@ -5,7 +5,7 @@ Captcha Addon 验证码插件 Captchaアドオン - Аддон Captcha + Аддон Captcha 圖形驗證 프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 이미지를 보여주고 글에 해당하는 이미지를 선택하게 하는 애드온입니다. @@ -27,7 +27,7 @@ ボット(bot)がプログラムによるスパム行為を防ぐために、掲示板/issueTrackerで書き込み・コメントを登録する際、ランダムな文字や数字の列を画面に表示し、表示されたものと一致した情報を入力した時、登録が出来るようにするアドオンです。 ログインしてない時だけ、動作します。 - + To block spam written by programs, let users to choose a suitable image to text when writing a posting or comment. This addon applies only to not-logged-in users. @@ -39,46 +39,46 @@ XE - XE - XE + XE + XE XE - XE - XE + XE + XE XE Captcha 표시 대상 - 应用对象 - Captchaを表示する対象 - 選擇目標 + 应用对象 + Captchaを表示する対象 + 選擇目標 Captcha Target - Captcha Target + Captcha Target Mục tiêu Captcha hiển thị 글/댓글 등록시 captcha가 동작할 대상을 정할 수 있습니다. 관리자는 무조건 제외됩니다 - 可以指定验证码应用对象(管理员除外)。 - 管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。 - 除了管理員,在發表主題或評論時,設定圖形驗證應用的對象。 + 可以指定验证码应用对象(管理员除外)。 + 管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。 + 除了管理員,在發表主題或評論時,設定圖形驗證應用的對象。 You may specify targets CAPTCHA work. It's not applied when administrator writes. - You may specify targets CAPTCHA work. It's not applied when administrator writes. + You may specify targets CAPTCHA work. It's not applied when administrator writes. Khi gửi bài, bình luận, Capcha sẽ hiển thị để xác nhận hành động của người sử dụng. Chức năng này không hoạt động với người quản lý. 로그인하지 않은 사용자 - 非登录用户 - ログインしてないユーザー - 非用戶 + 非登录用户 + ログインしてないユーザー + 非用戶 Not logged-in users - Not logged-in users + Not logged-in users Người dùng chưa đăng nhập 모든 사용자 - 所有用户 - すべてのユーザー + 所有用户 + すべてのユーザー 所有用戶 All users - All users + All users Tất cả mọi người @@ -88,14 +88,14 @@ 動作方式 行為模式 How it works - How it works + How it works Sử dụng "1번만 동작"을 선택하시면 1번만 동작후 상태를 저장해서 다음부터 물어보지 않고 그렇지 않으면 매번 물어보게 됩니다 - "一次"就是每个IP只出现一次验证。 + "一次"就是每个IP只出现一次验证。 「1回だけ表示」を選択すると、最初だけ動作した後、その情報を記憶して次回からはCaptchaを見せないようにします。また、もう一つのオプションは毎回Captchaを表示します。 選擇"單次",產生第一次動作後,下次不會再顯示;選擇"每次"則會一直顯示。 If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes. - If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes. + If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes. Nếu chọn "Chỉ một lần" thì sau lần hiển thị đó Capcha sẽ không hiển thị với người sử dụng đó nữa. 1번만 동작 @@ -104,7 +104,7 @@ 單次 Chỉ một lần once - 1 раз + 1 раз 매번 동작 @@ -112,7 +112,7 @@ 毎回表示 每次 every time - каждый раз + каждый раз Luôn sử dụng @@ -122,14 +122,14 @@ 비밀번호 찾기 적용 忘記密碼 applying to an action finding account - applying to an action finding account + applying to an action finding account Khi lấy lại mật khẩu 적용으로 하시면 비밀번호 찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. 启用此项功能可以有效地拦截以查找密码名义发送的垃圾邮件。 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. If you set this option as apply, CAPTCHA will work for finding account action, too. - If you set this option as apply, CAPTCHA will work for finding account action, too. + If you set this option as apply, CAPTCHA will work for finding account action, too. Nếu áp dụng, khi thành viên cần lấy lại mật khẩu khi lỡ quên, Capcha sẽ hiện thị để xác nhận việc này. 적용하지 않음 @@ -137,7 +137,7 @@ 적용하지 않음 關閉 Not apply - Not apply + Not apply Không áp dụng @@ -146,7 +146,7 @@ 적용 開啟 Apply - Apply + Apply Áp dụng @@ -156,14 +156,14 @@ 인증 메일 재발송 적용 重寄認證信 apply to an action resending authmail - apply to an action resending authmail + apply to an action resending authmail Khi lấy lại mã kích hoạt 적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. 启用此项功能可以有效地拦截以重新发送认证邮件名义发送的垃圾邮件。 적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. 적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. If you set this option as apply, CAPTCHA will work for resending authmail action, too. - If you set this option as apply, CAPTCHA will work for resending authmail action, too. + If you set this option as apply, CAPTCHA will work for resending authmail action, too. Nếu áp dụng, khi thành viên cần lấy lại mã kích hoạt thành viên, Capcha sẽ hiện thị để xác nhận việc này. 적용하지 않음 @@ -171,7 +171,7 @@ 적용하지 않음 關閉 Not apply - Not apply + Not apply Không áp dụng @@ -180,20 +180,20 @@ 적용 開啟 Apply - Apply + Apply Áp dụng 회원 가입 적용 - Apply to member signup + 应用到用户注册表单 인증 메일 재발송 적용 會員註冊 Apply to member signup - Apply to member signup + Apply to member signup Apply to member signup 적용으로 하시면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다. - 적용으로 하시면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다. + 启用此项功能可以有效地拦截自动注册软件的施虐。 적용으로 하시면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다. If you set this option as apply, CAPTCHA will work for signup action, too. If you set this option as apply, CAPTCHA will work for signup action, too. @@ -205,7 +205,7 @@ 적용하지 않음 關閉 Not apply - Not apply + Not apply Không áp dụng @@ -214,7 +214,7 @@ 적용 開啟 Apply - Apply + Apply Áp dụng diff --git a/addons/mobile/conf/info.xml b/addons/mobile/conf/info.xml index 4d63d00cf..817a3ac2e 100644 --- a/addons/mobile/conf/info.xml +++ b/addons/mobile/conf/info.xml @@ -27,7 +27,7 @@ Addon này hiển thị WAP Tag bởi việc phân tích thông tin khi kết nối bằng di động. Chỉ hỗ trợ cho các định dạng wml, hdml, mhtml. - + Данный аддон показывает WAP теги, анализирую информацию мобильного соединения. Поддерживаются только wml, hdml, mhtml форматы. @@ -44,7 +44,7 @@ zero zero zero - zero + zero zero @@ -55,7 +55,7 @@ misol misol misol - misol + misol misol 언어선택 추가(WML, mHTML) @@ -70,7 +70,7 @@ 编码 Charset Charset - Charset + Charset 編碼 모바일 기기의 경우 UTF-8 문자셋을 인식하지 못할 수 있습니다. @@ -97,7 +97,7 @@ Những công cụ di động sẽ trình bày Charset đúng khi bạn nhập vào Charset bạn muốn. Charset mặc định là UTF-8. - + utf-8 may be read with mobile tools. Mobile tools will display correct charset when you input charset you want. Default charset is UTF-8. diff --git a/addons/smartphone/classes/smartphone.class.php b/addons/smartphone/classes/smartphone.class.php deleted file mode 100644 index 9ac28d955..000000000 --- a/addons/smartphone/classes/smartphone.class.php +++ /dev/null @@ -1,139 +0,0 @@ -oModule = $oModule; - $this->module_info = $module_info; - - if(!$this->module_info->menu_srl) { - $oMenuModel = &getAdminModel('menu'); - $menus = $oMenuModel->getMenus($this->module_info->site_srl); - if($menus[0]) $this->module_info->menu_srl = $menus[0]->menu_srl; - } - - if($this->module_info->menu_srl) { - $menu_cache_file = sprintf(_XE_PATH_.'files/cache/menu/%d.php', $this->module_info->menu_srl); - if(!file_exists($menu_cache_file)) return; - @include $menu_cache_file; - Context::addHtmlHeader(sprintf('', $this->_getAllItems($menu->list))); - $this->_setParentUrl($menu->list); - } - } - - function _setParentUrl($menu_list) { - if(!count($menu_list)) return; - foreach($menu_list as $key => $val) { - if(!$val['text']) continue; - if($val['list'] && $this->_setParentUrl($val['list'])) { - $href = $val['href']; - if(preg_match('/^[a-z0-9_]+$/i',$val['url'])) $href = getUrl('','mid',$val['url'],'smartphone','true'); - else $href = $val['href']; - $this->setParentUrl($href); - return false; - } - if($val['url']==Context::get('mid')) return true; - } - return false; - } - - function _getAllItems($menu_list, $depth=0) { - if(!count($menu_list)) return; - $output = ''; - - foreach($menu_list as $menu_item) - { - if($output) $output .= ","; - $key = $menu_item['text']; - $val = $menu_item['url']; - if($menu_item['list']) { - $childs = '{'.$this->_getAllItems($menu_item['list'], $depth+1).'}'; - } else { - $childs = 'null'; - } - - $output .= sprintf('"%s" : { "url" : "%s", "childs" : %s } ',str_replace('"','\"',$key), str_replace('"','\"',$val), $childs); - } - return $output; - } - - function procSmartPhone($msg = null) { - if(preg_match('/(iPod|iPhone|Android)/',$_SERVER['HTTP_USER_AGENT'])) { - Context::addHtmlHeader(''); - } else if(preg_match('/SCH\-M[0-9]+/',$_SERVER['HTTP_USER_AGENT'])) { - Context::addHtmlHeader(''); - } - - if(is_a($this->output, 'Object') || is_subclass_of($this->output, 'Object') || $msg) { - if($msg) $this->setContent(Context::getLang($msg)); - else $this->setContent($this->output->getMessage()); - return; - } - - if($this->haveSmartphoneModule($this->module_info->module)) { - $oSmartPhoneModule =& getModule($this->module_info->module, 'smartphone'); - $vars = get_object_vars($this->oModule); - if(count($vars)) foreach($vars as $key => $val) $oSmartPhoneModule->{$key} = $val; - $oSmartPhoneModule->procSmartPhone($this); - } else { - switch(Context::getLangType()) { - case 'ko' : - $msg = '스마트폰을 지원하지 않는 모듈입니다'; - break; - case 'jp' : - $msg = 'このモジュールをサポートしていません。'; - break; - case 'zh-TW' : - $msg = '該模塊不支持。'; - break; - case 'zh-CN' : - $msg = '该模块不支持。'; - break; - default : - $msg = 'This module is not supported.'; - break; - } - $this->setContent($msg); - } - } - - function setContent($content) { - $this->content = $content; - } - - function setParentUrl($url) { - $this->parent_url = $url; - } - - function setPrevUrl($url) { - $this->prev_url = $url; - } - - function setNextUrl($url) { - $this->next_url = $url; - } - - } -?> diff --git a/addons/smartphone/conf/info.xml b/addons/smartphone/conf/info.xml deleted file mode 100644 index 4a72c7d5f..000000000 --- a/addons/smartphone/conf/info.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - SmartPhone XE 애드온 - SmartPhone XE - 智能手机XE插件 - SmartPhone XE - SmartPhone XE - 智慧型手機 - SmartPhone XE アドオン - - IPhone (touch) 등, smartphone 에서 접속시 최적화된 화면을 보여줍니다. - - - This addon displays the best screen for users who use smartphones like IPhone (touch). - - - 用于IPhone(touch)等智能手机访问时的界面优化。 - - - Addon này sẽ hiển thị Website trên màn hình iPhone một cách tốt nhất khi người dùng sử dụng SmartPhone để truy cập (iPhone cảm ứng) - - - 用iPhone(touch)和智慧型手機瀏覽時會以最適當的畫面顯示。 - - - This addon displays the best screen for users who use smartphones like IPhone (touch). - - - IPhone(touch)など、スマートフォンからアクセスした時、最適化されたインターフェースで表示させます。 - - 0.1 - 2009-04-20 - - haneul - haneul - haneul - haneul - haneul - haneul - haneul - - diff --git a/addons/smartphone/smartphone.addon.php b/addons/smartphone/smartphone.addon.php deleted file mode 100644 index 28849250f..000000000 --- a/addons/smartphone/smartphone.addon.php +++ /dev/null @@ -1,39 +0,0 @@ -module_info, $output); - $oSmartphoneXE->procSmartPhone(); - Context::set('layout', 'none'); - Context::set('smart_content', $oSmartphoneXE->content); - Context::set('parent_url', $oSmartphoneXE->parent_url); - Context::set('prev_url', $oSmartphoneXE->prev_url); - Context::set('next_url', $oSmartphoneXE->next_url); - $this->setTemplatePath('addons/smartphone/tpl'); - $this->setTemplateFile('layout'); - - } elseif($called_position == 'before_module_proc' && !$this->grant->access) { - $oSmartphoneXE = new smartphoneXE($this, $this->module_info, $output); - $oSmartphoneXE->procSmartPhone('msg_not_permitted_act'); - Context::set('layout', 'none'); - Context::set('smart_content', $oSmartphoneXE->content); - Context::set('parent_url', $oSmartphoneXE->parent_url); - Context::set('prev_url', $oSmartphoneXE->prev_url); - Context::set('next_url', $oSmartphoneXE->next_url); - $this->setTemplatePath('addons/smartphone/tpl'); - $this->setTemplateFile('layout'); - } -?> diff --git a/addons/smartphone/tpl/images/btnMenu.png b/addons/smartphone/tpl/images/btnMenu.png deleted file mode 100755 index 3c43a027c..000000000 Binary files a/addons/smartphone/tpl/images/btnMenu.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/btnNext.png b/addons/smartphone/tpl/images/btnNext.png deleted file mode 100755 index 15b8215ba..000000000 Binary files a/addons/smartphone/tpl/images/btnNext.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/btnPrev.png b/addons/smartphone/tpl/images/btnPrev.png deleted file mode 100755 index 085d42942..000000000 Binary files a/addons/smartphone/tpl/images/btnPrev.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/btnTop.png b/addons/smartphone/tpl/images/btnTop.png deleted file mode 100755 index aa106e8cc..000000000 Binary files a/addons/smartphone/tpl/images/btnTop.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/listArrow.png b/addons/smartphone/tpl/images/listArrow.png deleted file mode 100644 index 6421a1676..000000000 Binary files a/addons/smartphone/tpl/images/listArrow.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/listGroup.png b/addons/smartphone/tpl/images/listGroup.png deleted file mode 100644 index 221553ae9..000000000 Binary files a/addons/smartphone/tpl/images/listGroup.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/pinstripes.png b/addons/smartphone/tpl/images/pinstripes.png deleted file mode 100644 index c99777512..000000000 Binary files a/addons/smartphone/tpl/images/pinstripes.png and /dev/null differ diff --git a/addons/smartphone/tpl/images/titlebar.png b/addons/smartphone/tpl/images/titlebar.png deleted file mode 100755 index ddc3cd9b8..000000000 Binary files a/addons/smartphone/tpl/images/titlebar.png and /dev/null differ diff --git a/addons/smartphone/tpl/layout.html b/addons/smartphone/tpl/layout.html deleted file mode 100644 index 93d7e5845..000000000 --- a/addons/smartphone/tpl/layout.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - -
- {$smart_content} -
- -
-
- - Top - - - Prev - Next - - Menu -
- -
diff --git a/addons/smartphone/tpl/smartphone.css b/addons/smartphone/tpl/smartphone.css deleted file mode 100644 index ea9a39ccf..000000000 --- a/addons/smartphone/tpl/smartphone.css +++ /dev/null @@ -1,200 +0,0 @@ -body { - margin: 0; - padding:0; - font-family: Helvetica; - background: #E6E6E6 url(./images/pinstripes.png); - color: #000000; - overflow-x: hidden; - -webkit-user-select: none; - -webkit-text-size-adjust: none; - width:100%; -} - -.smartPhoneTitleBar { - border-bottom: 1px solid #2d3642; - border-top: 1px solid #6d84a2; - height: 43px; - overflow:hidden; - background:#485567 url(./images/titlebar.png) repeat-x left top; - - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} - -.smartPhoneToolBar .buttons -{ - float: left; -} - -.smartPhoneToolBar .rightbuttons -{ - float: right; margin-right:5px; margin-top:5px; -} - -.smartPhoneTitleBar h1 { - white-space:nowrap; - overflow: hidden; - color: #FFFFFF; - font-size: 20px; - font-weight: bold; - padding:8px 10px; - margin:0; - text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0; - text-overflow: ellipsis; -} - -.smartPhoneTitleBar h1 a { - text-decoration:none; - color:#fff; -} - -.smartPhoneContent { - z-index:450; - border: 1px solid #999999; - padding:10px; - background-color:#fff; - margin:10px; - box-sizing: border-box; - -webkit-box-sizing: border-box; - -webkit-border-radius: 8px; -} - -.smartPhoneToolBar { - z-index:9999; - width:100%; - border-bottom: 1px solid #2d3642; - border-top: 1px solid #6d84a2; - height: 43px; - overflow:hidden; - background:#485567 url(./images/titlebar.png) repeat-x left top; - white-space:nowrap; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} - -.smartPhoneBtn { - width:43px; - height:43px; - margin-left:8px; - border:0; -} - -.smartPhoneContent div.info { - font-size:13px; - padding-bottom:10px; - border-bottom:1px solid #444; - overflow:hidden; - *zoom:1; -} - -.smartPhoneContent div.info .author { - font-weight:bold; - float:left; -} - -.smartPhoneContent div.info .date { - font-size:11px; - float:right; -} - -.smartPhoneContent div.link { - margin-top:10px; - border-top:1px solid #444; -} - -.smartPhoneContent div.link a { - display:block; - padding:10px 0; - font-size:15px; - text-decoration:underline; - font-weight:bold; - color:#000; -} - -.smartPhoneList { - background-color:#fff; - z-index:500; - padding:0; - margin:0; -} - -.smartPhoneList ul { - padding:0; - margin:0; - left:0; - right:0; - top:43px; -} - -.smartPhoneList li { - list-style:none; - font-size:18px; - font-weight:bold; - padding:10px 20px 10px 10px; - border-bottom:1px solid #ccc; -} - -.smartPhoneList li a { - text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0; - text-overflow: ellipsis; - color:#000; - text-decoration:none; - display:block; - width:100%; -} - -.smartPhoneList li.title { - position: relative; - top: -1px; - margin-bottom: -2px; - border-top: 1px solid #7d7d7d; - border-bottom: 1px solid #999999; - padding: 5px 10px; - background: url(./images/listGroup.png) repeat-x; - font-size: 12px; - font-weight: bold; - text-shadow: rgba(0, 0, 0, 0.4) 0 1px 0; - color: #FFFFFF; -} - -.smartPhoneList li.selected { - background-color:#ddd; -} - -.smartPhoneList li.selected * { - color:#fff; -} - - -.smartPhoneList li a { - background:transparent url(./images/listArrow.png) no-repeat scroll right center; - padding-right:30px; -} - -.smartPhoneList li.noArrow a { - background:none !important; -} - -.smartPhoneList li.item img.thumbnail { - margin:0 10px 0 0; - padding:0; -} - -.smartPhoneList li.item span.title, .smartPhoneList li.item span.title div { - font-size:15px; - font-weight:normal; - display:block; -} - -.smartPhoneList li.item span.info { - font-size:10px; - font-weight:normal; - color:#bbb; - display:block; - margin-top:2px; - letter-spacing:0px; -} - - diff --git a/addons/smartphone/tpl/smartphone.js b/addons/smartphone/tpl/smartphone.js deleted file mode 100644 index e27634d03..000000000 --- a/addons/smartphone/tpl/smartphone.js +++ /dev/null @@ -1,105 +0,0 @@ -var xeSmartMenu = null; -var xeSmartUpperMenu = null; -function setFullBrowse() { - location.href = current_url.setQuery('full_browse',1); -} - -function showXEMenu() { - if(!xeSmartMenu) { - - xeSmartMenu = jQuery('
') - .attr("className","smartPhoneList") - .css('display','none') - .css('backgroundColor','#fff'); - - jQuery(document.body).append(xeSmartMenu); - - xeSmartMenu.slideIn = function(step) { - var w = this.width() + Math.pow(step,2)*30; - - if(w>jQuery(document).width()) { - this.css({left:0,right:0,display:'block'}); - this.width(''); - jQuery('.smartPhoneContentArea').css("display","none"); - } else { - this.width(w); - var o = parseInt(jQuery(document).width/w,10)/5; - if(o>1) o = 1; - setTimeout(function() { xeSmartMenu.slideIn(step+1); }, 50); - } - } - - xeSmartMenu.slideOut = function(step) { - var l = parseInt(this.css('left'),10) + Math.pow(step,2)*30; - - if(l>jQuery('.smartPhoneContent').width()) { - this.css({display:'none','left':''}); - jQuery('.smartPhoneContentArea').css("display","block"); - } else { - var o = parseInt(jQuery(document).width/l,10)/5; - if(o<0) o = 0; - this.css('left',l+'px'); - setTimeout(function() { xeSmartMenu.slideOut(step+1); }, 50); - } - } - } - - if(xeSmartMenu.css('display')=='none' && typeof(xeMenus)!='undefined') { - xeSmartUpperMenu = null; - var menu = findSmartNode(xeMenus); - if(!menu) menu = xeMenus; - var html = '
    '; - if(location.href.getQuery('mid')) html += '
  • < go Home >
  • '; - if(xeSmartUpperMenu) html += '
  • < go Upper >
  • '; - for(var text in menu) { - if(!text) continue; - var url = menu[text].url; - var href = ''; - if(/^[a-z0-9_]+$/i.test(url)) { - href = request_uri.setQuery('mid',url); - if(href.indexOf('?')>-1) href += '&smartphone=true'; - else href += '?smartphone=true'; - } - else href = url; - if(typeof(xeVid)!='undefined') { - if(href.indexOf('?')>-1) href += '&vid='+xeVid; - else href += '?vid='+xeVid; - } - html += '
  • '+text+'
  • '; - } - html += '
'; - - jQuery(xeSmartMenu).html(html); - jQuery(xeSmartMenu).css({ - width:'1px', - right:'0', - top:'43px', - display:'block', - position:'absolute', - padding:0 - }); - xeSmartMenu.slideIn(0); - } else if(location.href.getQuery('mid')||location.href.getQuery('document_srl')) { - xeSmartMenu.slideOut(0); - } -} - -function findSmartNode(nodes) { - var mid = current_url.getQuery('mid'); - if(typeof(mid)=='undefined'||!mid) return nodes; - for(var text in nodes) { - if(!text) continue; - if(nodes[text].childs) { - var n = findSmartNode(nodes[text].childs); - if(n) { - xeSmartUpperMenu = nodes[text]; - return n; - } - } - if(nodes[text].url == mid) { - if(nodes[text].childs) return nodes[text].childs; - return nodes; - } - } - return null; -} diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 238002908..5f0e4679f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -158,22 +158,6 @@ if(file_exists(_XE_PATH_.'.htaccess')&&$this->db_info->use_rewrite == 'Y') $this->allow_rewrite = true; else $this->allow_rewrite = false; - // add common JS/CSS files - $this->addJsFile("./common/js/jquery.js", true, '', -100000); - $this->addJsFile("./common/js/x.js"); - $this->addJsFile("./common/js/common.js"); - $this->addJsFile("./common/js/js_app.js"); - $this->addJsFile("./common/js/xml_handler.js"); - $this->addJsFile("./common/js/xml_js_filter.js"); - $this->addCSSFile("./common/css/default.css"); - $this->addCSSFile("./common/css/button.css"); - - // for admin page, add admin css - if(Context::get('module')=='admin' || strpos(Context::get('act'),'Admin')>0){ - $this->addCssFile("./modules/admin/tpl/css/font.css", true, 'all', '',10000); - $this->addCssFile("./modules/admin/tpl/css/pagination.css", true, 'all', '', 100001); - $this->addCssFile("./modules/admin/tpl/css/admin.css", true, 'all', '', 100002); - } // set locations for javascript use if($_SERVER['REQUEST_METHOD'] == 'GET') { @@ -1179,7 +1163,7 @@ /** * @brief js file을 추가 **/ - function _addJsFile($file, $optimized, $targetie,$index) { + function _addJsFile($file, $optimized = true, $targetie = '',$index=null) { if(strpos($file,'://')===false && $file{0}!='/' && $file{0}!='.') $file = './'.$file; $file = preg_replace('@/\./|(? 0) { + if ($now_matchs == 1) { + $tmpval = explode ("(", $prefix); + $tmpval[1] = sprintf ('"%s"', $tmpval[1]); + $prefix = implode ("(", $tmpval); + $tmpval = explode (")", $name); + $tmpval[0] = sprintf ('"%s"', $tmpval[0]); + $name = implode (")", $tmpval); + } } - else $prefix = sprintf('"%s"',$prefix); - if ($flag_of_function === true) { - $tmpval = explode (")", $name); - $tmpval[0] = sprintf ('"%s"', $tmpval[0]); - $name = implode (")", $tmpval); - $flag_of_function = false; + else { + $prefix = sprintf('"%s"',$prefix); + $name = ($name == '*') ? $name : sprintf('"%s"',$name); } - else $name = ($name == '*') ? $name : sprintf('"%s"',$name); - + $xtmp = null; + $now_matchs = null; $column_list[] = sprintf($click_count,sprintf('%s.%s', $prefix, $name)) . ($alias ? sprintf(' as %s',$alias) : ''); - + } elseif (($now_matchs = preg_match_all ("/\(/", $name, $xtmp)) > 0) { + if ($now_matchs == 1 && preg_match ("/[a-zA-Z0-9]*\(\*\)/", $name) < 1) { + $open_pos = strpos ($name, "("); + $close_pos = strpos ($name, ")"); + if (preg_match ("/,/", $name)) { + $tmp_func_name = sprintf ('%s', substr ($name, 0, $open_pos)); + $tmp_params = sprintf ('%s', substr ($name, $open_pos + 1, $close_pos - $open_pos - 1)); + $tmpval = null; + $tmpval = explode (',', $tmp_params); + foreach ($tmpval as $tmp_param) { + $tmp_param_list[] = (!is_numeric ($tmp_param)) ? sprintf ('"%s"', $tmp_param) : $tmp_param; + } + $tmpval = implode (',', $tmp_param_list); + $name = sprintf ('%s(%s)', $tmp_func_name, $tmpval); + } else { + $name = sprintf ('%s("%s")', + substr ($name, 0, $open_pos), + substr ($name, $open_pos + 1, $close_pos - $open_pos - 1)); + } + } + $column_list[] = sprintf ($click_count,$name) . ($alias ? sprintf (' as %s', $alias) : ''); } else { $column_list[] = sprintf($click_count,$name) . ($alias ? sprintf(' as %s',$alias) : ''); } diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index d085ecc09..c6116eb93 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -13,6 +13,7 @@ var $content_size = 0; ///< 출력하는 컨텐츠의 사이즈 var $gz_enabled = false; ///< gzip 압축하여 컨텐츠 호출할 것인지에 대한 flag변수 + var $handler = null; /** * @brief print either html or xml content given oModule object @@ -31,68 +32,25 @@ ) $this->gz_enabled = true; // request method에 따른 컨텐츠 결과물 추출 - if(Context::get('xeVirtualRequestMethod')=='xml') $output = $this->_toVirtualXmlDoc($oModule); - else if(Context::getRequestMethod() == 'XMLRPC') { - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) $this->gz_enabled = false; - $output = $this->_toXmlDoc($oModule); + if(Context::get('xeVirtualRequestMethod')=='xml') { + require_once("./classes/display/VirtualXMLDisplayHandler.php"); + $handler = new VirtualXMLDisplayHandler(); + } + else if(Context::getRequestMethod() == 'XMLRPC') { + require_once("./classes/display/XMLDisplayHandler.php"); + $handler = new XMLDisplayHandler(); + if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) $this->gz_enabled = false; + } + else if(Context::getRequestMethod() == 'JSON') { + require_once("./classes/display/JSONDisplayHandler.php"); + $handler = new JSONDisplayHandler(); + } + else { + require_once("./classes/display/HTMLDisplayHandler.php"); + $handler = new HTMLDisplayHandler(); } - else if(Context::getRequestMethod() == 'JSON') $output = $this->_toJSON($oModule); - else $output = $this->_toHTMLDoc($oModule); - // HTML 출력 요청일 경우 레이아웃 컴파일과 더블어 완성된 코드를 제공 - if(Context::getResponseMethod()=="HTML") { - - // 관리자 모드일 경우 #xeAdmin id를 가지는 div 추가 - if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')>0) $output = '
'.$output.'
'; - - // 내용을 content라는 변수로 설정 (layout에서 {$output}에서 대체됨) - Context::set('content', $output); - - // 레이아웃을 컴파일 - $oTemplate = &TemplateHandler::getInstance(); - - // layout이라는 변수가 none으로 설정되면 기본 레이아웃으로 변경 - if(Context::get('layout') != 'none') { - if(__DEBUG__==3) $start = getMicroTime(); - - $layout_path = $oModule->getLayoutPath(); - - $layout_file = $oModule->getLayoutFile(); - $edited_layout_file = $oModule->getEditedLayoutFile(); - - // 현재 요청된 레이아웃 정보를 구함 - $oLayoutModel = &getModel('layout'); - $current_module_info = Context::get('current_module_info'); - $layout_srl = $current_module_info->layout_srl; - - // 레이아웃과 연결되어 있으면 레이아웃 컴파일 - if($layout_srl > 0){ - $layout_info = Context::get('layout_info'); - - // faceoff 레이아웃일 경우 별도 처리 - if($layout_info && $layout_info->type == 'faceoff') { - $oLayoutModel->doActivateFaceOff($layout_info); - Context::set('layout_info', $layout_info); - } - - // 관리자 레이아웃 수정화면에서 변경된 CSS가 있는지 조사 - $edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl); - - if(file_exists($edited_layout_css)) Context::addCSSFile($edited_layout_css,true,'all','',100); - } - if(!$layout_path) $layout_path = "./common/tpl"; - if(!$layout_file) $layout_file = "default_layout"; - $output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file); - - if(__DEBUG__==3) $GLOBALS['__layout_compile_elapsed__'] = getMicroTime()-$start; - - - if(preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT']) && (Context::get("_use_ssl")=='optional'||Context::get("_use_ssl")=="always")) { - Context::addHtmlFooter(''); - } - } - - } + $output = $handler->toDoc($oModule); // 출력하기 전에 trigger 호출 (before) ModuleHandler::triggerCall('display', 'before', $output); @@ -100,58 +58,16 @@ // 애드온 실행 $called_position = 'before_display_content'; $oAddonController = &getController('addon'); - $addon_file = $oAddonController->getCacheFilePath(); + $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc"); @include($addon_file); - // HTML 출력일 경우 최종적으로 common layout을 씌워서 출력 - if(Context::getResponseMethod()=="HTML") { - if(__DEBUG__==3) $start = getMicroTime(); - - // body 내의 를 header로 이동 - $output = preg_replace_callback('!!is', array($this,'moveStyleToHeader'), $output); - - // 메타 파일 변경 (캐싱기능등으로 인해 위젯등에서 태그를 content에 넣는 경우가 있음 - $output = preg_replace_callback('//is', array($this,'transMeta'), $output); - - // rewrite module 사용시 생기는 상대경로에 대한 처리를 함 - if(Context::isAllowRewrite()) { - $url = parse_url(Context::getRequestUri()); - $real_path = $url['path']; - - $pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s'; - $output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output); - - $pattern = '/href=("|\'){1}(\?[^"\']+)/s'; - $output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output); - - if(Context::get('vid')) { - $pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is'; - $output = preg_replace($pattern, '/?$1=', $output); - } - } - - // 간혹 background-image에 url(none) 때문에 request가 한번 더 일어나는 경우가 생기는 것을 방지 - $output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output); - - if(__DEBUG__==3) $GLOBALS['__trans_content_elapsed__'] = getMicroTime()-$start; - - // 불필요한 정보 제거 - $output = preg_replace('/member\_\-([0-9]+)/s','member_0',$output); - - // 최종 레이아웃 변환 - Context::set('content', $output); - $output = $oTemplate->compile('./common/tpl', 'common_layout'); - - // 사용자 정의 언어 변환 - $oModuleController = &getController('module'); - $oModuleController->replaceDefinedLangCode($output); - } + if(method_exists($handler, "prepareToPrint")) $handler->prepareToPrint($output); // header 출력 if($this->gz_enabled) header("Content-Encoding: gzip"); - if(Context::getResponseMethod() == 'JSON') $this->_printJSONHeader(); - else if(Context::getResponseMethod() != 'HTML') $this->_printXMLHeader(); - else $this->_printHTMLHeader(); + if(Context::getResponseMethod() == 'JSON') $this->_printJSONHeader(); + else if(Context::getResponseMethod() != 'HTML') $this->_printXMLHeader(); + else $this->_printHTMLHeader(); // debugOutput 출력 $this->content_size = strlen($output); @@ -165,117 +81,6 @@ ModuleHandler::triggerCall('display', 'after', $content); } - /** - * @brief add given .css or .js file names in widget code to Context - * @param[in] $oModule the module object - **/ - function transMeta($matches) { - if(substr($matches[1],'-4')=='.css') Context::addCSSFile($matches[1]); - elseif(substr($matches[1],'-3')=='.js') Context::addJSFile($matches[1]); - } - - /** - * @brief add html style code extracted from html body to Context, which will be - * printed inside
later. - * @param[in] $oModule the module object - **/ - function moveStyleToHeader($matches) { - Context::addHtmlHeader($matches[0]); - } - - /** - * @brief produce JSON compliant cotent given a module object. - * @param[in] $oModule the module object - **/ - function _toJSON(&$oModule) { - $variables = $oModule->getVariables(); - $variables['error'] = $oModule->getError(); - $variables['message'] = $oModule->getMessage(); - $json = preg_replace("(\r\n|\n)",'\n',json_encode2($variables)); - return $json; - } - - /** - * @brief Produce virtualXML compliant content given a module object.\n - * @param[in] $oModule the module object - **/ - function _toVirtualXmlDoc(&$oModule) { - $error = $oModule->getError(); - $message = $oModule->getMessage(); - $redirect_url = $oModule->get('redirect_url'); - $request_uri = Context::get('xeRequestURI'); - $request_url = Context::get('xeVirtualRequestUrl'); - if(substr($request_url,-1)!='/') $request_url .= '/'; - - if($error === 0) { - if($message != 'success') $output->message = $message; - if($redirect_url) $output->url = $redirect_url; - else $output->url = $request_uri; - } else { - if($message != 'fail') $output->message = $message; - } - - $html = ''."\n"; - return $html; - } - - /** - * @brief Produce XML compliant content given a module object.\n - * @param[in] $oModule the module object - **/ - function _toXmlDoc(&$oModule) { - $variables = $oModule->getVariables(); - - $xmlDoc = "\n\n"; - $xmlDoc .= sprintf("%s\n",$oModule->getError()); - $xmlDoc .= sprintf("%s\n",str_replace(array('<','>','&'),array('<','>','&'),$oModule->getMessage())); - - $xmlDoc .= $this->_makeXmlDoc($variables); - - $xmlDoc .= ""; - - return $xmlDoc; - } - - /** - * @brief produce XML code given variable object\n - * @param[in] $oModule the module object - **/ - function _makeXmlDoc($obj) { - if(!count($obj)) return; - - $xmlDoc = ''; - - foreach($obj as $key => $val) { - if(is_numeric($key)) $key = 'item'; - - if(is_string($val)) $xmlDoc .= sprintf('<%s>%s', $key, $val, $key,"\n"); - else if(!is_array($val) && !is_object($val)) $xmlDoc .= sprintf('<%s>%s%s', $key, $val, $key,"\n"); - else $xmlDoc .= sprintf('<%s>%s%s%s',$key, "\n", $this->_makeXmlDoc($val), $key, "\n"); - } - - return $xmlDoc; - } - - /** - * @brief Produce HTML compliant content given a module object.\n - * @param[in] $oModule the module object - **/ - function _toHTMLDoc(&$oModule) { - // template handler 객체 생성 - $oTemplate = &TemplateHandler::getInstance(); - - // module tpl 변환 - $template_path = $oModule->getTemplatePath(); - $tpl_file = $oModule->getTemplateFile(); - return $oTemplate->compile($template_path, $tpl_file); - } /** * @brief Print debugging message to designated output source depending on the value set to __DEBUG_OUTPUT_. \n @@ -428,42 +233,46 @@ } } - /** - * @brief print a HTTP HEADER for XML, which is encoded in UTF-8 - **/ - function _printXMLHeader() { - header("Content-Type: text/xml; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - } + /** + * @brief print a HTTP HEADER for XML, which is encoded in UTF-8 + **/ + function _printXMLHeader() { + header("Content-Type: text/xml; charset=UTF-8"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + } + + + /** + * @brief print a HTTP HEADER for HTML, which is encoded in UTF-8 + **/ + function _printHTMLHeader() { + header("Content-Type: text/html; charset=UTF-8"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + } + + + /** + * @brief print a HTTP HEADER for JSON, which is encoded in UTF-8 + **/ + function _printJSONHeader() { + header("Content-Type: text/html; charset=UTF-8"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + } - /** - * @brief print a HTTP HEADER for HTML, which is encoded in UTF-8 - **/ - function _printHTMLHeader() { - header("Content-Type: text/html; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - } - /** - * @brief print a HTTP HEADER for JSON, which is encoded in UTF-8 - **/ - function _printJSONHeader() { - header("Content-Type: text/html; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - } } ?> diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php new file mode 100644 index 000000000..966efb683 --- /dev/null +++ b/classes/display/HTMLDisplayHandler.php @@ -0,0 +1,156 @@ +getTemplatePath(); + $tpl_file = $oModule->getTemplateFile(); + $output = $oTemplate->compile($template_path, $tpl_file); + + // add #xeAdmin div for adminitration pages + if(Context::getResponseMethod() == 'HTML') { + if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')>0) $output = '
'.$output.'
'; + + if(Context::get('layout') != 'none') { + if(__DEBUG__==3) $start = getMicroTime(); + + Context::set('content', $output); + + $layout_path = $oModule->getLayoutPath(); + $layout_file = $oModule->getLayoutFile(); + + $edited_layout_file = $oModule->getEditedLayoutFile(); + + // 현재 요청된 레이아웃 정보를 구함 + $oLayoutModel = &getModel('layout'); + $layout_info = Context::get('layout_info'); + $layout_srl = $layout_info->layout_srl; + + // 레이아웃과 연결되어 있으면 레이아웃 컴파일 + if($layout_srl > 0){ + + // faceoff 레이아웃일 경우 별도 처리 + if($layout_info && $layout_info->type == 'faceoff') { + $oLayoutModel->doActivateFaceOff($layout_info); + Context::set('layout_info', $layout_info); + } + + // 관리자 레이아웃 수정화면에서 변경된 CSS가 있는지 조사 + $edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl); + + if(file_exists($edited_layout_css)) Context::addCSSFile($edited_layout_css,true,'all','',100); + } + if(!$layout_path) $layout_path = "./common/tpl"; + if(!$layout_file) $layout_file = "default_layout"; + $output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file); + + if(__DEBUG__==3) $GLOBALS['__layout_compile_elapsed__'] = getMicroTime()-$start; + + if(preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT']) && (Context::get("_use_ssl")=='optional'||Context::get("_use_ssl")=="always")) { + Context::addHtmlFooter(''); + } + } + } + return $output; + } + + function prepareToPrint(&$output) { + if(Context::getResponseMethod() != 'HTML') return; + + if(__DEBUG__==3) $start = getMicroTime(); + + // body 내의 를 header로 이동 + $output = preg_replace_callback('!!is', array($this,'_moveStyleToHeader'), $output); + + // 메타 파일 변경 (캐싱기능등으로 인해 위젯등에서 태그를 content에 넣는 경우가 있음 + $output = preg_replace_callback('//is', array($this,'_transMeta'), $output); + + // rewrite module 사용시 생기는 상대경로에 대한 처리를 함 + if(Context::isAllowRewrite()) { + $url = parse_url(Context::getRequestUri()); + $real_path = $url['path']; + + $pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s'; + $output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output); + + $pattern = '/href=("|\'){1}(\?[^"\']+)/s'; + $output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output); + + if(Context::get('vid')) { + $pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is'; + $output = preg_replace($pattern, '/?$1=', $output); + } + } + + // 간혹 background-image에 url(none) 때문에 request가 한번 더 일어나는 경우가 생기는 것을 방지 + $output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output); + + if(__DEBUG__==3) $GLOBALS['__trans_content_elapsed__'] = getMicroTime()-$start; + + // 불필요한 정보 제거 + $output = preg_replace('/member\_\-([0-9]+)/s','member_0',$output); + + // 최종 레이아웃 변환 + Context::set('content', $output); + $oTemplate = &TemplateHandler::getInstance(); + if(Mobile::isFromMobilePhone()) { + $output = $oTemplate->compile('./common/tpl', 'mobile_layout'); + } + else + { + $this->_loadJSCSS(); + $output = $oTemplate->compile('./common/tpl', 'common_layout'); + } + + // 사용자 정의 언어 변환 + $oModuleController = &getController('module'); + $oModuleController->replaceDefinedLangCode($output); + } + + /** + * @brief add html style code extracted from html body to Context, which will be + * printed inside
later. + * @param[in] $oModule the module object + **/ + function _moveStyleToHeader($matches) { + Context::addHtmlHeader($matches[0]); + } + + /** + * @brief add given .css or .js file names in widget code to Context + * @param[in] $oModule the module object + **/ + function _transMeta($matches) { + if(substr($matches[1],'-4')=='.css') Context::addCSSFile($matches[1]); + elseif(substr($matches[1],'-3')=='.js') Context::addJSFile($matches[1]); + } + + function _loadJSCSS() + { + $oContext =& Context::getInstance(); + // add common JS/CSS files + $oContext->_addJsFile("./common/js/jquery.js", true, '', -100000); + //$oContext->_addJsFile("./common/js/jquery-1.4.2-full.js", true, '', -100000); + $oContext->_addJsFile("./common/js/x.js", true, '', -100000); + $oContext->_addJsFile("./common/js/common.js", true, '', -100000); + $oContext->_addJsFile("./common/js/js_app.js", true, '', -100000); + $oContext->_addJsFile("./common/js/xml_handler.js", true, '', -100000); + $oContext->_addJsFile("./common/js/xml_js_filter.js", true, '', -100000); + $oContext->_addCSSFile("./common/css/default.css", true, 'all', '', -100000); + $oContext->_addCSSFile("./common/css/button.css", true, 'all', '', -100000); + + // for admin page, add admin css + if(Context::get('module')=='admin' || strpos(Context::get('act'),'Admin')>0){ + $oContext->_addCSSFile("./modules/admin/tpl/css/font.css", true, 'all', '',10000); + $oContext->_addCSSFile("./modules/admin/tpl/css/pagination.css", true, 'all', '', 100001); + $oContext->_addCSSFile("./modules/admin/tpl/css/admin.css", true, 'all', '', 100002); + } + } +} diff --git a/classes/display/JSONDisplayHandler.php b/classes/display/JSONDisplayHandler.php new file mode 100644 index 000000000..cdea8d937 --- /dev/null +++ b/classes/display/JSONDisplayHandler.php @@ -0,0 +1,12 @@ +getVariables(); + $variables['error'] = $oModule->getError(); + $variables['message'] = $oModule->getMessage(); + $json = preg_replace("(\r\n|\n)",'\n',json_encode2($variables)); + return $json; + } +} diff --git a/classes/display/VirtualXMLDisplayHandler.php b/classes/display/VirtualXMLDisplayHandler.php new file mode 100644 index 000000000..850adeb75 --- /dev/null +++ b/classes/display/VirtualXMLDisplayHandler.php @@ -0,0 +1,37 @@ +getError(); + $message = $oModule->getMessage(); + $redirect_url = $oModule->get('redirect_url'); + $request_uri = Context::get('xeRequestURI'); + $request_url = Context::get('xeVirtualRequestUrl'); + if(substr($request_url,-1)!='/') $request_url .= '/'; + + if($error === 0) { + if($message != 'success') $output->message = $message; + if($redirect_url) $output->url = $redirect_url; + else $output->url = $request_uri; + } else { + if($message != 'fail') $output->message = $message; + } + + $html = ''."\n"; + return $html; + } +} + +?> diff --git a/classes/display/XMLDisplayHandler.php b/classes/display/XMLDisplayHandler.php new file mode 100644 index 000000000..1b1c0ff5e --- /dev/null +++ b/classes/display/XMLDisplayHandler.php @@ -0,0 +1,44 @@ +getVariables(); + + $xmlDoc = "\n\n"; + $xmlDoc .= sprintf("%s\n",$oModule->getError()); + $xmlDoc .= sprintf("%s\n",str_replace(array('<','>','&'),array('<','>','&'),$oModule->getMessage())); + + $xmlDoc .= $this->_makeXmlDoc($variables); + + $xmlDoc .= ""; + + return $xmlDoc; + } + + /** + * @brief produce XML code given variable object\n + * @param[in] $oModule the module object + **/ + function _makeXmlDoc($obj) { + if(!count($obj)) return; + + $xmlDoc = ''; + + foreach($obj as $key => $val) { + if(is_numeric($key)) $key = 'item'; + + if(is_string($val)) $xmlDoc .= sprintf('<%s>%s', $key, $val, $key,"\n"); + else if(!is_array($val) && !is_object($val)) $xmlDoc .= sprintf('<%s>%s%s', $key, $val, $key,"\n"); + else $xmlDoc .= sprintf('<%s>%s%s%s',$key, "\n", $this->_makeXmlDoc($val), $key, "\n"); + } + + return $xmlDoc; + } +} + +?> diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index c826af846..8b24e3595 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -141,9 +141,9 @@ $value = $this->_getTypeValue($this->type, $this->value); switch($this->type) { case 'homepage' : - return sprintf('%s', $value, $value); + return ($value)?sprintf('%s', $value, $value):""; case 'email_address' : - return sprintf('%s', $value, $value); + return ($value)?sprintf('%s', $value, $value):""; break; case 'tel' : return sprintf('%s - %s - %s', $value[0],$value[1],$value[2]); diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 669baaf65..c3d2277b1 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -332,11 +332,11 @@ * @remarks if the target is moved (when return code is 300~399), this function follows the location specified response header. **/ function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array()) { - //set_include_path(_XE_PATH_."libs/PEAR"); requirePear(); require_once('HTTP/Request.php'); - if(__PROXY_SERVER__!==null) { + $parsed_url = parse_url(__PROXY_SERVER__); + if($parsed_url["host"]) { $oRequest = new HTTP_Request(__PROXY_SERVER__); $oRequest->setMethod('POST'); $oRequest->_timeout = $timeout; diff --git a/classes/mobile/Mobile.class.php b/classes/mobile/Mobile.class.php new file mode 100644 index 000000000..07968047d --- /dev/null +++ b/classes/mobile/Mobile.class.php @@ -0,0 +1,55 @@ +_isFromMobilePhone(); + } + + function _isFromMobilePhone() { + if(isset($this->ismobile)) return $this->ismobile; + $db_info = Context::getDBInfo(); + if($db_info->use_mobile_view != "Y" || Context::get('full_browse') || $_COOKIE["FullBrowse"]) + { + $this->ismobile = false; + } + else + { + $m = Context::get('m'); + if($m == "1") { + setcookie("mobile", true); + $this->ismobile = true; + } + else if($m === "0") { + setcookie("mobile", ""); + $this->ismobile = false; + } + else if($_COOKIE["mobile"]) $this->ismobile = true; + else { + if(preg_match('/(iPod|iPhone|Android|BlackBerry|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT'])) + { + setcookie("mobile", true); + $this->ismobile = true; + } + } + } + + return $this->ismobile; + } + + function setMobile($ismobile) + { + $oMobile =& Mobile::getInstance(); + $oMobile->ismobile = $ismobile; + } +} + +?> diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index b8ad341f0..ace0e1e7d 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -61,7 +61,7 @@ // execute addon (before module initialization) $called_position = 'before_module_init'; $oAddonController = &getController('addon'); - $addon_file = $oAddonController->getCacheFilePath(); + $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc"); @include($addon_file); } @@ -203,13 +203,102 @@ $type = $xml_info->action->{$this->act}->type; $kind = strpos(strtolower($this->act),'admin')!==false?'admin':''; if(!$kind && $this->module == 'admin') $kind = 'admin'; + if($this->module_info->use_mobile != "Y") Mobile::setMobile(false); - // create a module instance - $oModule = &$this->getModuleInstance($this->module, $type, $kind); - if(!is_object($oModule)) { - $this->error = 'msg_module_is_not_exists'; - return; - } + // if(type == view, and case for using mobilephone) + if($type == "view" && Mobile::isFromMobilePhone() && Context::isInstalled()) + { + $orig_type = "view"; + $type = "mobile"; + // create a module instance + $oModule = &$this->getModuleInstance($this->module, $type, $kind); + if(!is_object($oModule) || !method_exists($oModule, $this->act)) { + $type = $orig_type; + Mobile::setMobile(false); + $oModule = &$this->getModuleInstance($this->module, $type, $kind); + } + } + else + { + // create a module instance + $oModule = &$this->getModuleInstance($this->module, $type, $kind); + } + + if(!is_object($oModule)) { + $this->error = 'msg_module_is_not_exists'; + return; + } + + // If there is no such action in the module object + if(!isset($xml_info->action->{$this->act}) || !method_exists($oModule, $this->act)) + { + if(!Context::isInstalled()) + { + $this->error = 'msg_invalid_request'; + return; + } + + $forward = null; + // 1. Look for the module with action name + if(preg_match('/^([a-z]+)([A-Z])([a-z0-9\_]+)(.*)$/', $this->act, $matches)) { + $module = strtolower($matches[2].$matches[3]); + $xml_info = $oModuleModel->getModuleActionXml($module); + if($xml_info->action->{$this->act}) { + $forward->module = $module; + $forward->type = $xml_info->action->{$this->act}->type; + $forward->act = $this->act; + } + } + + if(!$forward) + { + $forward = $oModuleModel->getActionForward($this->act); + } + + if($forward->module && $forward->type && $forward->act && $forward->act == $this->act) { + $kind = strpos(strtolower($forward->act),'admin')!==false?'admin':''; + $type = $forward->type; + $tpl_path = $oModule->getTemplatePath(); + $orig_module = $oModule; + + if($type == "view" && Mobile::isFromMobilePhone()) + { + $orig_type = "view"; + $type = "mobile"; + // create a module instance + $oModule = &$this->getModuleInstance($forward->module, $type, $kind); + if(!is_object($oModule) || !method_exists($oModule, $this->act)) { + $type = $orig_type; + Mobile::setMobile(false); + $oModule = &$this->getModuleInstance($forward->module, $type, $kind); + } + } + else + { + $oModule = &$this->getModuleInstance($forward->module, $type, $kind); + } + $xml_info = $oModuleModel->getModuleActionXml($forward->module); + if($this->module == "admin" && $type == "view") + { + $oMemberModel = &getModel('member'); + $logged_info = $oMemberModel->getLoggedInfo(); + if($logged_info->is_admin=='Y') { + $orig_module->loadSideBar(); + $oModule->setLayoutPath("./modules/admin/tpl"); + $oModule->setLayoutFile("layout.html"); + } + } + } + else if($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) + { + $this->act = $xml_info->default_index_act; + } + else + { + $this->error = 'msg_invalid_request'; + return; + } + } $oModule->setAct($this->act); @@ -264,11 +353,20 @@ } // Check if layout_srl exists for the module - if($oModule->module_info->layout_srl && !$oModule->getLayoutFile()) { + if(Mobile::isFromMobilePhone()) + { + $layout_srl = $oModule->module_info->mlayout_srl; + } + else + { + $layout_srl = $oModule->module_info->layout_srl; + } + + if($layout_srl && !$oModule->getLayoutFile()) { // If layout_srl exists, get information of the layout, and set the location of layout_path/ layout_file $oLayoutModel = &getModel('layout'); - $layout_info = $oLayoutModel->getLayout($oModule->module_info->layout_srl); + $layout_info = $oLayoutModel->getLayout($layout_srl); if($layout_info) { // Input extra_vars into $layout_info @@ -369,10 +467,10 @@ $instance_name = sprintf("%s%s",$module,"WAP"); $class_file = sprintf('%s%s%s.wap.php', _XE_PATH_, $class_path, $module); break; - case 'smartphone' : - $instance_name = sprintf("%s%s",$module,"SPhone"); - $class_file = sprintf('%s%s%s.smartphone.php', _XE_PATH_, $class_path, $module); - break; + case 'mobile' : + $instance_name = sprintf("%s%s",$module,"Mobile"); + $class_file = sprintf("%s%s%s.mobile.php", _XE_PATH_, $class_path, $module); + break; case 'class' : $instance_name = $module; $class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module); diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index a85333e54..c8947694f 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -246,7 +246,7 @@ // addon 실행(called_position 를 before_module_proc로 하여 호출) $called_position = 'before_module_proc'; $oAddonController = &getController('addon'); - $addon_file = $oAddonController->getCacheFilePath(); + $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc"); @include($addon_file); if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act)) { @@ -261,75 +261,16 @@ // 실행 $output = $this->{$this->act}(); - - // act이 없으면 action_forward에서 해당하는 act가 있는지 찾아서 대신 실행 - } else if(Context::isInstalled()) { - $oModuleModel = &getModel('module'); - - $forward = null; - - // 현재 요청된 action의 대상 모듈을 찾음 - // 1. action이름으로 검색 (DB검색 없이 하기 위함) - if(preg_match('/^([a-z]+)([A-Z])([a-z0-9\_]+)(.*)$/', $this->act, $matches)) { - $module = strtolower($matches[2].$matches[3]); - $xml_info = $oModuleModel->getModuleActionXml($module); - if($xml_info->action->{$this->act}) { - $forward->module = $module; - $forward->type = $xml_info->action->{$this->act}->type; - $forward->act = $this->act; - } - } - - // 2. 1번에서 찾지 못하면 action forward를 검색 - if(!$forward) $forward = $oModuleModel->getActionForward($this->act); - - // 찾아진 forward 모듈이 있으면 실행 - if($forward->module && $forward->type && $forward->act && $forward->act == $this->act) { - - $kind = strpos(strtolower($forward->act),'admin')!==false?'admin':''; - - $oModule = &getModule($forward->module, $forward->type, $kind); - $xml_info = $oModuleModel->getModuleActionXml($forward->module); - - $oModule->setAct($forward->act); - $oModule->init(); - if($oModule->stop_proc) return $this->stop($oModule->getMessage()); - - $oModule->setModuleInfo($this->module_info, $xml_info); - - if(isset($xml_info->action->{$forward->act}) && method_exists($oModule, $forward->act)) { - $output = $oModule->{$forward->act}(); - } else { - return $this->stop("msg_module_is_not_exists"); - } - - // forward 모듈의 실행 결과 검사 - if($oModule->stop_proc) return $this->stop($oModule->getMessage()); - - $this->setTemplatePath($oModule->getTemplatePath()); - $this->setTemplateFile($oModule->getTemplateFile()); - if($oModule->getLayoutFile()) $this->setLayoutFile($oModule->getLayoutFile()); - - $this->adds($oModule->getVariables()); - $this->setMessage($oModule->getMessage()); - $this->setError($oModule->getError()); - - // forward 모듈을 찾지 못했다면 원 모듈의 default index action을 실행 - } else if($this->xml_info->default_index_act && method_exists($this, $this->xml_info->default_index_act)) { - Context::set('act',$this->act = $this->xml_info->default_index_act); - $output = $this->{$this->xml_info->default_index_act}(); - } else { - return false; - } - - } else { - return false; - } + } + else { + return false; + } + // addon 실행(called_position 를 after_module_proc로 하여 호출) $called_position = 'after_module_proc'; $oAddonController = &getController('addon'); - $addon_file = $oAddonController->getCacheFilePath(); + $addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc"); @include($addon_file); if(is_a($output, 'Object') || is_subclass_of($output, 'Object')) { diff --git a/classes/xml/XmlJsFilter.class.php b/classes/xml/XmlJsFilter.class.php index abcc1c3ac..c79240240 100644 --- a/classes/xml/XmlJsFilter.class.php +++ b/classes/xml/XmlJsFilter.class.php @@ -43,7 +43,7 @@ **/ class XmlJsFilter extends XmlParser { - var $version = '0.2.3'; + var $version = '0.2.4'; var $compiled_path = './files/cache/js_filter_compiled/'; ///< 컴파일된 캐시 파일이 놓일 위치 var $xml_file = NULL; ///< 대상 xml 파일 var $js_file = NULL; ///< 컴파일된 js 파일 @@ -220,7 +220,8 @@ $name = trim($attrs->name); $target = trim($attrs->target); - if($name && $target && ($name != $target)) $js_doc[] = "\t\tparams['{$name}'] = params['{$target}']; delete params['{$target}'];"; + //if($name && $target && ($name != $target)) $js_doc[] = "\t\tparams['{$name}'] = params['{$target}']; delete params['{$target}'];"; + if($name && $target && ($name != $target)) $js_doc[] = "\t\tif(params['{$target}']) { params['{$name}'] = params['{$target}']; delete params['{$target}']; }"; if($name && !in_array($name, $target_list)) $target_list[] = $name; } diff --git a/common/js/js_app.js b/common/js/js_app.js index 0a376e711..9da0076a1 100644 --- a/common/js/js_app.js +++ b/common/js/js_app.js @@ -1,9 +1,9 @@ /** * @file js_app.js - * @author zero (zero@nzeo.com) + * @author taggon (gonom9@gmail.com) * @brief XE JavaScript Application Framework (JAF) * @namespace xe - * @update 20091120 + * @update 20100701 */ (function($){ @@ -60,7 +60,7 @@ _xe_base = { */ getApp : function(indexOrName) { indexOrName = (indexOrName||'').toLowerCase(); - if (typeof _apps[indexOrName] != 'undefined') { + if(typeof _apps[indexOrName] != 'undefined') { return _apps[indexOrName]; } else { return null; @@ -80,6 +80,8 @@ _xe_base = { _apps[sName].push(oApp); oApp.parent = this; + + // TODO : register event }, /** @@ -95,16 +97,23 @@ _xe_base = { nIndex = $.inArray(oApp, _apps[sName]); if (nIndex >= 0) _apps[sName].splice(nIndex, 1); } + + // TODO : unregister event }, /** * @brief overrides broadcast method */ - broadcast : function(sender, msg, params) { + broadcast : function(msg, params) { + this._broadcast(this, msg, params); + }, + + _broadcast : function(sender, msg, params) { for(var i=0; i < _apps.length; i++) { _apps[i]._cast(sender, msg, params); } + // cast to child plugins this._cast(sender, msg, params); } @@ -112,14 +121,25 @@ _xe_base = { _app_base = { _plugins : [], - _messages : [], + _messages : {}, - _fn_level : [], + /** + * @brief get plugin + */ + getPlugin : function(sPluginName) { + sPluginName = sPluginsName.toLowerCase(); + if ($.isArray(this._plugins[sPluginName])) { + return this._plugins[sPluginName]; + } else { + return []; + } + }, /** * @brief register a plugin instance */ registerPlugin : function(oPlugin) { + var self = this; var sName = oPlugin.getName().toLowerCase(); // check if the plugin is already registered @@ -128,75 +148,27 @@ _app_base = { // push the plugin into the _plugins array this._plugins.push(oPlugin); - if (!$.isArray(this._plugins[sName])) { - this._plugins[sName] = []; - } + if (!$.isArray(this._plugins[sName])) this._plugins[sName] = []; this._plugins[sName].push(oPlugin); // register method pool - var msgs = this._messages; - $.each(oPlugin, function(key, val){ - if (!$.isFunction(val)) return true; - if (!/^API_((BEFORE_|AFTER_)?[A-Z0-9_]+)$/.test(key)) return true; - var fn = function(s,p){ return oPlugin[key](s,p) }; - fn._fn = val; - - if (!$.isArray(msgs[RegExp.$1])) msgs[RegExp.$1] = []; - msgs[RegExp.$1].push(fn); - }); - - // set the application - oPlugin.oApp = this; + $.each(oPlugin._binded_fn, function(api, fn){ self.registerHandler(api, fn); }); // binding - oPlugin.cast = function(msg, params) { - return oPlugin._cast(msg, params); - }; + oPlugin.oApp = this; - oPlugin.broadcast = function(msg, params) { - oPlugin._broadcast(msg, params); - }; + // TODO : registered event return true; }, /** - * @brief unregister a plugin instance + * @brief register api message handler */ - unregisterPlugin : function(oPlugin) { - var sName = oPlugin.getName().toLowerCase(); - - // remove from _plugins array - var nIndex = $.inArray(oPlugin, this._plugins); - if (nIndex >= 0) this._plugins.splice(nIndex, 1); - - if ($.isArray(this._plugins[sName])) { - nIndex = $.inArray(oPlugin, this._plugins); - if (nIndex >= 0) this._plugins[sName].splice(nIndex, 1); - } - - // unregister method pool - var msgs = this._messages; - $.each(oPlugin, function(key, val){ - if (!$.isFunction(val)) return true; - if (!/^API_([A-Z0-9_]+)$/.test(key)) return true; - if (typeof msgs[RegExp.$1] == 'undefined') return true; - - if ($.isArray(msgs[RegExp.$1])) { - msgs[RegExp.$1] = $.grep(msgs[RegExp.$1], function(fn,i){ return (fn._fn != val); }); - if (!msgs[RegExp.$1].length) { - delete msgs[RegExp.$1]; - } - } else { - if (msgs[RegExp.$1]._fn == val) { - delete msgs[RegExp.$1]; - } - - } - }); - - // unset the application - oPlugin.oApp = null; + registerHandler : function(api, func) { + var msgs = this._messages; api = api.toUpperCase(); + if (!$.isArray(msgs[api])) msgs[api] = []; + msgs[api].push(func); }, cast : function(msg, params) { @@ -204,8 +176,8 @@ _app_base = { }, broadcast : function(sender, msg, params) { - if (this.parent && this.parent.broadcast) { - this.parent.broadcast(sender, msg, params); + if (this.parent && this.parent._broadcast) { + this.parent._broadcast(sender, msg, params); } }, @@ -223,9 +195,7 @@ _app_base = { // main api function var vRet = [], sFn = 'API_'+msg; - if ($.isFunction(this[sFn])) vRet.push( this[sFn](sender, params) ); - if ($.isFunction(aMsg[msg])) vRet.push( aMsg[msg](sender, params) ); - else if ($.isArray(aMsg[msg])) { + if ($.isArray(aMsg[msg])) { for(i=0; i < aMsg[msg].length; i++) { vRet.push( aMsg[msg][i](sender, params) ); } @@ -237,7 +207,7 @@ _app_base = { this._cast(sender, 'AFTER_'+msg, params); } - if (!/^(?:AFTER_|BEFORE_)/.test(msg)) { // top level function + if (!/^(?:AFTER|BEFORE)_/.test(msg)) { // top level function return vRet; } else { return $.isArray(vRet)?($.inArray(false, vRet)<0):((typeof vRet=='undefined')?true:!!vRet); @@ -247,14 +217,14 @@ _app_base = { _plugin_base = { oApp : null, - _binded_fn : [], - _cast : function(msg, params) { + cast : function(msg, params) { if (this.oApp && this.oApp._cast) { return this.oApp._cast(this, msg, params || []); } }, - _broadcast : function(msg, params) { + + broadcast : function(msg, params) { if (this.oApp && this.oApp.broadcast) { this.oApp.broadcast(this, mag, params || []); } @@ -269,13 +239,26 @@ _plugin_base = { function getTypeBase() { var _base = function() { + var self = this; + var pool = null; + if ($.isArray(this._plugins)) this._plugins = []; - if ($.isArray(this._messages)) this._messages = []; - if ($.isArray(this._binded_fn)) this._binded_fn = []; + if (this._messages) this._messages = {}; + else this._binded_fn = {}; + + // bind functions + $.each(this, function(key, val){ + if (!$.isFunction(val)) return true; + if (!/^API_([A-Z0-9_]+)$/.test(key)) return true; - if ($.isFunction(this.init)) { - this.init.apply(this, arguments); - } + var api = RegExp.$1; + var fn = function(sender, params){ return self[key](sender, params) }; + + if (self._messages) self._messages[api] = [fn]; + else self._binded_fn[api] = fn; + }); + + if ($.isFunction(this.init)) this.init.apply(this, arguments); }; return _base; @@ -285,9 +268,9 @@ window.xe = $.extend(_app_base, _xe_base); window.xe.lang = {}; // language repository // domready event -$(function(){ xe.broadcast(xe, 'ONREADY'); }); +$(function(){ xe.broadcast('ONREADY'); }); // load event -$(window).load(function(){ xe.broadcast(xe, 'ONLOAD'); }); +$(window).load(function(){ xe.broadcast('ONLOAD'); }); -})(jQuery); +})(jQuery); \ No newline at end of file diff --git a/common/lang/en.lang.php b/common/lang/en.lang.php index 23c644441..5736f5efe 100644 --- a/common/lang/en.lang.php +++ b/common/lang/en.lang.php @@ -126,6 +126,7 @@ $lang->mid = 'Module Name'; $lang->sid = 'Site Name'; $lang->layout = 'Layout'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Widget'; $lang->module = 'Module'; $lang->skin = 'Theme'; diff --git a/common/lang/es.lang.php b/common/lang/es.lang.php index ca7d1097f..1ca5445c4 100644 --- a/common/lang/es.lang.php +++ b/common/lang/es.lang.php @@ -125,6 +125,7 @@ $lang->mid = 'ID del Módulo'; $lang->sid = 'Site Name'; $lang->layout = 'Composición'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Widget'; $lang->module = 'Módulo'; $lang->skin = 'Tema'; //máscara, diff --git a/common/lang/fr.lang.php b/common/lang/fr.lang.php index 36ef4156d..997d66622 100644 --- a/common/lang/fr.lang.php +++ b/common/lang/fr.lang.php @@ -126,6 +126,7 @@ $lang->mid = 'Nom'; $lang->sid = 'Site Name'; $lang->layout = 'Mise en Page'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Gadget'; $lang->module = 'Module'; $lang->skin = 'Habillage'; diff --git a/common/lang/ge.lang.php b/common/lang/ge.lang.php index efd7ba0ce..bffb8cd15 100644 --- a/common/lang/ge.lang.php +++ b/common/lang/ge.lang.php @@ -126,6 +126,7 @@ $lang->mid = 'Module Name'; $lang->sid = 'Site Name'; $lang->layout = 'Layout'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Widget'; $lang->module = 'Modul'; $lang->skin = 'Thema'; diff --git a/common/lang/jp.lang.php b/common/lang/jp.lang.php index abd577118..b2639f8cc 100644 --- a/common/lang/jp.lang.php +++ b/common/lang/jp.lang.php @@ -126,6 +126,7 @@ $lang->mid = 'モジュール名'; $lang->sid = 'バーチャル(Virtual)サイト名'; $lang->layout = 'レイアウト'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'ウィジェット'; $lang->module = 'モジュール'; $lang->skin = 'スキン'; diff --git a/common/lang/ko.lang.php b/common/lang/ko.lang.php index e89ed48ff..95d347053 100644 --- a/common/lang/ko.lang.php +++ b/common/lang/ko.lang.php @@ -126,6 +126,7 @@ $lang->mid = '모듈 이름'; $lang->sid = '가상 사이트 이름'; $lang->layout = '레이아웃'; + $lang->mobile_layout = '모바일 레이아웃'; $lang->widget = '위젯 '; $lang->module = '모듈'; $lang->skin = '스킨'; diff --git a/common/lang/mn.lang.php b/common/lang/mn.lang.php index d89485058..4d1f821f2 100644 --- a/common/lang/mn.lang.php +++ b/common/lang/mn.lang.php @@ -128,6 +128,7 @@ $lang->mid = 'Модиул нэр'; $lang->sid = 'Тvр сайтын нэр'; $lang->layout = 'Лэйаут'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Вижет '; $lang->module = 'Модиул'; $lang->skin = 'Скин'; diff --git a/common/lang/ru.lang.php b/common/lang/ru.lang.php index b1c1589d7..4ea99f324 100644 --- a/common/lang/ru.lang.php +++ b/common/lang/ru.lang.php @@ -126,6 +126,7 @@ $lang->mid = 'Имя Модуля'; $lang->sid = 'Site Name'; $lang->layout = 'Лейаут'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Виджет'; $lang->module = 'Модуль'; $lang->skin = 'Тема'; diff --git a/common/lang/vi.lang.php b/common/lang/vi.lang.php index 4d6661cd3..aee73bdd0 100644 --- a/common/lang/vi.lang.php +++ b/common/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ // words for action, which is basically used $lang->cmd_write = 'Gửi bài mới'; @@ -84,7 +85,7 @@ $lang->password1 = 'Mật khẩu'; $lang->password2 = 'Nhập lại mật khẩu'; $lang->admin_id = 'Admin ID'; - $lang->writer = 'Người viết'; + $lang->writer = 'Người gửi'; $lang->user_name = 'Tên thật'; $lang->nick_name = 'NickName'; $lang->email_address = 'Email'; @@ -117,11 +118,12 @@ $lang->notify = 'Thông báo'; $lang->order_target = 'Đường dẫn đích'; $lang->order_type = 'Phân loại theo định dạng'; - $lang->order_asc = 'Tăng'; - $lang->order_desc = 'Không tăng'; + $lang->order_asc = 'Tăng dần'; + $lang->order_desc = 'Giảm dần'; $lang->mid = 'Tên Module'; $lang->layout = 'Giao diện'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Widget'; $lang->module = 'Module'; $lang->skin = 'Skin'; @@ -210,7 +212,7 @@ $lang->msg_invalid_queryid = 'Giá trị ID không hợp lệ'; $lang->msg_not_permitted = 'Bạn không được phép truy cập tại đây!'; $lang->msg_input_password = 'Xin vui lòng nhập mật khẩu!'; - $lang->msg_invalid_document = 'Số bài viết không đúng'; + $lang->msg_invalid_document = 'Bài viết không tồn tại'; $lang->msg_invalid_request = 'Yêu cầu không hợp lệ'; $lang->msg_invalid_password = 'Mật khẩu không đúng'; $lang->msg_error_occured = 'Đã có lỗi xảy ra.'; @@ -223,15 +225,15 @@ $lang->success_registed = 'Chúc mừng bạn đã đăng kí thành công!'; $lang->success_declared = 'Đã báo cáo.'; - $lang->success_updated = 'Đã cập nhật xong.'; - $lang->success_deleted = 'Đã xóa.'; + $lang->success_updated = 'Đã cập nhật thành công.'; + $lang->success_deleted = 'Đã xóa thành công.'; $lang->success_voted = 'Đã bình chọn.'; $lang->success_blamed = 'Đã phê bình.'; $lang->success_moved = 'Đã chuyển.'; - $lang->success_sended = 'Đã gửi.'; - $lang->success_reset = 'Đã thiết lập lại.'; - $lang->success_leaved = 'Tất cả các thành viên đã được xóa.'; - $lang->success_saved = 'Đã lưu.'; + $lang->success_sended = 'Đã gửi thành công.'; + $lang->success_reset = 'Đã thiết lập lại thành công.'; + $lang->success_leaved = 'Đã xóa tất cả các thành viên.'; + $lang->success_saved = 'Đã lưu thành công.'; $lang->fail_to_delete = 'Không thể xóa.'; $lang->fail_to_move = 'Không thể chuyển.'; @@ -248,7 +250,7 @@ $lang->confirm_move = 'Bạn chắc chắn muốn chuyển?'; $lang->confirm_reset = 'Bạn chắc chắn muốn thiết lập lại?'; $lang->confirm_leave = 'Bạn chắc chắn muốn từ bỏ?'; - $lang->confirm_update = 'Are you sure to update?'; + $lang->confirm_update = 'Bạn chắc chắn muốn Update?'; $lang->column_type = 'Định dạng cột'; $lang->column_type_list['text'] = 'Ô nhập liệu'; @@ -258,7 +260,7 @@ $lang->column_type_list['textarea'] = 'Khu vực nội dung'; $lang->column_type_list['checkbox'] = 'Ô chọn (Nhiều lựa chọn)'; $lang->column_type_list['select'] = 'Ô chọn (Một lựa chọn)'; - $lang->column_type_list['kr_zip'] = 'Zip Code (Korean)'; + $lang->column_type_list['kr_zip'] = 'Mã số bưu điện (Korean)'; $lang->column_type_list['date'] = 'Ngày (yyyy/mm/dd)'; //$lang->column_type_list['jp_zip'] = 'zip code (Japanese)'; $lang->column_name = 'Tên cột'; @@ -270,9 +272,9 @@ // ftp 관련 $lang->ftp_form_title = 'Thông tin FTP'; $lang->ftp = 'FTP'; - $lang->ftp_host = 'FTP hostname'; - $lang->ftp_port = 'Cổng kết nối:'; - $lang->about_ftp_password = 'FTP password will not be stored'; + $lang->ftp_host = 'Tên Host FTP'; + $lang->ftp_port = 'Cổng kết nối'; + $lang->about_ftp_password = 'Mật khẩu của FTP sẽ không lưu lại'; $lang->cmd_check_ftp_connect = 'Kiểm tra kết nối bằng FTP'; $lang->about_ftp_info = " Thông tin tài khoản FTP có thể được sử dụng trong các trường hợp sau:
@@ -281,16 +283,16 @@ Thông tin tài khoản FTP này sẽ được lưu giữ tại: 'files/config/ftp.config.php'
Sau khi cài đặt bạn có thể xóa hoặc thay đổi thông tin tại Bảng điều khiển của Administrator.
"; - $lang->msg_safe_mode_ftp_needed = "Nếu safe_mode của PHP mở, bạn nên nhập thông tin của FTP để cài đặt XE."; - $lang->msg_ftp_not_connected = "Kết nối bằng FTP không thành công. Xin vui lòng kiểm tra tài khoản và cổng kết nối!"; - $lang->msg_ftp_invalid_auth_info = "Xác nhận không thành công. Xin vui lòng kiểm tra lại tên sử dụng và mật khẩu."; + $lang->msg_safe_mode_ftp_needed = "Nếu safe_mode của PHP mở, bạn có thể cài đặt các thành phần bổ xung cho XE một cách tự động qua FTP."; + $lang->msg_ftp_not_connected = "Kết nối bằng FTP không thành công. Xin vui lòng kiểm tra lại thông tin tài khoản và cổng kết nối!"; + $lang->msg_ftp_invalid_auth_info = "Xác nhận thất bại. Xin vui lòng kiểm tra lại tên sử dụng và mật khẩu."; $lang->msg_ftp_mkdir_fail = "Lỗi khi tạo thư mục. Xin vui lòng kiểm tra lại quyền truy cập FTP."; - $lang->msg_ftp_chmod_fail = "CHMOD không thành công. Xin vui lòng kiểm tra lại."; + $lang->msg_ftp_chmod_fail = "CHMOD thất bại. Xin vui lòng kiểm tra lại."; $lang->msg_ftp_connect_success = "Đã xác nhận và kết nối thành công tới máy chủ bằng FTP."; - $lang->ftp_path_title = 'FTP 경로 정보 입력'; - $lang->msg_ftp_installed_realpath = '설치된 XE의 절대경로'; - $lang->msg_ftp_installed_ftp_realpath = '설치된 XE의 FTP 절대경로 설정'; + $lang->ftp_path_title = 'Hãy nhập thông tin đường dẫn của FTP.'; + $lang->msg_ftp_installed_realpath = 'Đường dẫn thư mục đã cài đặt XE'; + $lang->msg_ftp_installed_ftp_realpath = 'Đường dẫn tuyệt đối của thư mục cài đặt XE trên FTP'; // Alert messages for Javascript using by XML filter @@ -299,12 +301,12 @@ $lang->filter->equalto = "Giá trị của %s không hợp lệ"; $lang->filter->invalid_email = "Định dạng của %s không hợp lệ. Ví dụ: emailname@yahoo.com"; $lang->filter->invalid_user_id = $lang->filter->invalid_userid = "Định dạng của %s Không hợp lệ.\\nGiá trị hợp lệ bao gồm các kí tự từ a-z, các chữ số và dấu gạch dưới (_)."; - $lang->filter->invalid_homepage = "Định dạng của %s không hợp lệ. Đúng sẽ là: http://vietxe.net hoặc http://www.vietxe.net"; + $lang->filter->invalid_homepage = "Định dạng của %s không hợp lệ. Đúng sẽ là: http://xpressengine.vn hoặc http://www.xpressengine.vn"; $lang->filter->invalid_korean = "Định dạng của %s không hợp lệ. Nội dung này bắt buộc phải sử dụng tiếng Hàn Quốc"; $lang->filter->invalid_korean_number = "Định dạng của %s không hợp lệ. Nội dung này bắt buộc phải sử dụng tiếng Hàn Quốc hoặc các chữ số"; $lang->filter->invalid_alpha = "Định dạng của %s không hợp lệ. Chỉ sử dụng các kí tự từ a-z"; $lang->filter->invalid_alpha_number = "Định dạng của %s không hợp lệ. Chỉ sử dụng các kí tự từ a-z và các chữ số"; $lang->filter->invalid_number = "Định dạng của %s không hợp lệ. Chỉ sử dụng các chữ số"; - $lang->security_warning_embed = "Due to security concern, administrators are not allowed to view embedded items.
To view them, please use another non-administrator ID."; + $lang->security_warning_embed = "Vì vấn đề bảo mật, nên Administrator không được phép xem các mục đã nhúng mã.
Để xem được chúng, hãy sử dụng một tên truy cập khác không có quyền quản trị."; ?> diff --git a/common/lang/zh-CN.lang.php b/common/lang/zh-CN.lang.php index d12a087af..0dfc1ae96 100644 --- a/common/lang/zh-CN.lang.php +++ b/common/lang/zh-CN.lang.php @@ -126,6 +126,7 @@ $lang->mid = '模块名称'; $lang->sid = '站点名称'; $lang->layout = '布局'; + $lang->mobile_layout = '移动版布局'; $lang->widget = '控件 '; $lang->module = '模块'; $lang->skin = '皮肤'; @@ -257,7 +258,7 @@ $lang->confirm_move = '确定要移动吗?'; $lang->confirm_reset = '确定要初始化吗?'; $lang->confirm_leave = '确定要注销吗?'; - $lang->confirm_update = 'Are you sure to update?'; + $lang->confirm_update = '确定要更新吗?'; $lang->column_type = '格式'; $lang->column_type_list['text'] = '单行文本输入区(text)'; @@ -281,9 +282,9 @@ // ftp 相关 $lang->ftp_form_title = '设置FTP信息'; $lang->ftp = 'FTP'; - $lang->ftp_host = 'FTP hostname'; - $lang->ftp_port = 'FTP port'; - $lang->about_ftp_password = 'FTP password will not be stored'; + $lang->ftp_host = 'FTP服务器名'; + $lang->ftp_port = 'FTP端口'; + $lang->about_ftp_password = 'FTP密码不会被保存。'; $lang->cmd_check_ftp_connect = '测试FTP连接'; $lang->about_ftp_info = " 相关FTP信息,应用于如下几种状况:
@@ -300,9 +301,9 @@ $lang->msg_ftp_chmod_fail = "修改文件夹属性失败。请确认 FTP服务器设置。"; $lang->msg_ftp_connect_success = "FTP连接成功。"; - $lang->ftp_path_title = 'FTP 경로 정보 입력'; - $lang->msg_ftp_installed_realpath = '설치된 XE의 절대경로'; - $lang->msg_ftp_installed_ftp_realpath = '설치된 XE의 FTP 절대경로 설정'; + $lang->ftp_path_title = '输入FTP路径信息'; + $lang->msg_ftp_installed_realpath = 'XE绝对路径'; + $lang->msg_ftp_installed_ftp_realpath = 'FTP绝对路径设置'; // 在xml filter使用的 javascript用 alert msg $lang->filter->isnull = '请输入%s'; @@ -317,5 +318,5 @@ $lang->filter->invalid_alpha_number = '%s只能输入英文或数字'; $lang->filter->invalid_number = '%s只能输入数字'; - $lang->security_warning_embed = "Due to security concern, administrators are not allowed to view embedded items.
To view them, please use another non-administrator ID."; + $lang->security_warning_embed = "由于安全问题,不允许用系统管理员ID操作embed对象,请使用其他拥有管理权限的ID操作。"; ?> diff --git a/common/lang/zh-TW.lang.php b/common/lang/zh-TW.lang.php index 85069784b..b62f7f05a 100644 --- a/common/lang/zh-TW.lang.php +++ b/common/lang/zh-TW.lang.php @@ -126,6 +126,7 @@ $lang->mid = '模組名稱'; $lang->sid = '網站名稱'; $lang->layout = '版面'; + $lang->mobile_layout = 'Mobile Layout'; $lang->widget = 'Widget'; $lang->module = '模組'; $lang->skin = '面板'; diff --git a/common/tpl/mobile_layout.html b/common/tpl/mobile_layout.html new file mode 100644 index 000000000..5e2d62278 --- /dev/null +++ b/common/tpl/mobile_layout.html @@ -0,0 +1,57 @@ + + + + + +{Context::getBrowserTitle()} +{@ $css_files = Context::getCssFile() } + + + + + + + + +{@ $js_files = Context::getJsFile() } + + + + + + + + + + + + + + + + +{@ $ssl_actions = Context::getSSLActions() } + + {Context::getHtmlHeader()} + + + {Context::getBodyHeader()} + + {$content} + + {Context::getHtmlFooter()} + + diff --git a/config/config.inc.php b/config/config.inc.php index c43cba6b8..209f042a6 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -13,7 +13,7 @@ * @brief XE의 전체 버전 표기 * 이 파일의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함 **/ - define('__ZBXE_VERSION__', '1.4.2.3'); + define('__ZBXE_VERSION__', '1.4.3'); /** * @brief zbXE가 설치된 장소의 base path를 구함 @@ -145,6 +145,7 @@ require(_XE_PATH_.'classes/template/TemplateHandler.class.php'); require(_XE_PATH_.'classes/mail/Mail.class.php'); require(_XE_PATH_.'classes/page/PageHandler.class.php'); + require(_XE_PATH_.'classes/mobile/Mobile.class.php'); if(__DEBUG__) $GLOBALS['__elapsed_class_load__'] = getMicroTime() - __ClassLoadStartTime__; } ?> diff --git a/config/func.inc.php b/config/func.inc.php index 6223e9e4a..5dc9c75ae 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -677,8 +677,13 @@ function _isHackedSrc($src) { if(!$src) return false; if($src) { + $target = trim($src); + if(preg_match('/(\s|(\&\#)|(script:))/i', $target)) return true; + if(preg_match('/data:/i', $target)) return true; + $url_info = parse_url($src); $query = $url_info['query']; + if(!trim($query)) return false; $query = str_replace("&","&",$query); $queries = explode('&', $query); $cnt = count($queries); @@ -690,9 +695,6 @@ $val = strtolower(trim(substr($tmp_str,$pos+1))); if( ($key=='module'&&$val=='admin') || ($key=='act'&&preg_match('/admin/i',$val)) ) return true; } - - $target = trim($src); - if(preg_match('/(\s|(\&\#)|(script:))/i', $target)) return true; } return false; } @@ -850,7 +852,7 @@ function isCrawler($agent = null) { if(!$agent) $agent = $_SERVER['HTTP_USER_AGENT']; - $check_agent = array('bot', 'spider', 'google', 'yahoo', 'daum', 'teoma', 'fish', 'hanrss'); + $check_agent = array('bot', 'spider', 'google', 'yahoo', 'daum', 'teoma', 'fish', 'hanrss', 'facebook'); $check_ip = array( '211.245.21.11*' /* mixsh */ ); diff --git a/layouts/xe_official/conf/info.xml b/layouts/xe_official/conf/info.xml index df30a2523..5625c6177 100644 --- a/layouts/xe_official/conf/info.xml +++ b/layouts/xe_official/conf/info.xml @@ -76,7 +76,7 @@ zero zero zero - zero + zero @@ -89,7 +89,7 @@ Colorset Colorset Set de colores - Màu sắc + Màu sắc 원하시는 컬러셋을 선택해주세요. 希望するカラーセットを選択して下さい。 请选择颜色。 @@ -98,7 +98,7 @@ Bitte wählen Sie ein colorset Sie wollen. Выберите colorset хотите. Seleccione set de colores que desea. - Hãy chọn màu sắc bạn muốn. + Hãy chọn màu sắc bạn muốn. 기본 デフォルト @@ -108,7 +108,7 @@ Básico 默认 預設 - Cơ bản + Cơ bản 검은색 @@ -119,7 +119,7 @@ Negro 黑色 黑色 - Black + Black 하얀색 @@ -130,7 +130,7 @@ Blanco 白色 白色 - White + White @@ -142,7 +142,7 @@ Logobildes Изображения логотипа Imagen del logotipo - Hình Logo + Hình Logo 레이아웃의 상단에 표시될 로고이미지를 입력하세요. (세로길이가 23px인 투명이미지가 가장 어울립니다) レイアウトの上段に表示されるロゴイメージを入力して下さい。 (縦幅が23pxである透明イメージをお勧めします。。) 请输入显示在布局顶部的LOGO图片(高度为23px的透明图片为适)。 @@ -151,7 +151,7 @@ Bitte geben Sie ein Logo das Bild wird auf dem oberen Layout. (Transparent Bild mit einer Höhe von 23px wird empfohlen). Введите логотип изображение, которое будет отображаться в верхней части формы. (Прозрачный изображение с высотой 23px рекомендуется.) Ingresar una imagen para logotipo. ( Se recomienda una imagen de fondo transparente con una altura de 23px. - Hãy chọn Logo hiển thị phía trên cùng của giao diện. (Đề nghị: Hình ảnh có nền trong suốt và kích thước 23px.) + Hãy chọn Logo hiển thị phía trên cùng của giao diện. (Đề nghị: Hình ảnh có nền trong suốt và kích thước 23px.) 홈 페이지 URL @@ -162,7 +162,7 @@ Homepage URL Домашняя страница URL URL de la página web - URL Trang chủ + URL Trang chủ 로고를 클릭시에 이동할 홈 페이지 URL을 입력해 주세요. ロゴをクリックした時に移動するホームページのURLを入力して下さい。 点击网站LOGO时要移动的页面URL。 @@ -171,7 +171,7 @@ Bitte geben Sie die URL umzuleiten, wenn Benutzer klickt das Logo Пожалуйста, введите URL для перенаправления, когда пользователь нажимает логотип Ingresar el URL de la página web para redireccionar al pulsar el logotipo - Hãy nhập địa chỉ bạn muốn chuyển đến khi bấm vào Logo + Hãy nhập địa chỉ bạn muốn chuyển đến khi bấm vào Logo 배경 이미지 @@ -182,7 +182,7 @@ Hintergrundbild Фоновое изображение Imagen de fondo - Hình nền + Hình nền 배경 이미지를 사용하시려면 등록해주세요. 背景イメージを使う場合は、登録して下さい。 要想使用背景图片请在这里上传。 @@ -191,7 +191,7 @@ Bitte geben Sie, wenn Sie verwenden wollen Hintergrundbild. Введите, если вы хотите использовать фоновое изображение. Ingresar imagen de fondo si desea usar. - Hãy nhập hình nền nếu bạn muốn sử dụng. + Hãy nhập hình nền nếu bạn muốn sử dụng. @@ -205,7 +205,7 @@ Top Menü Верхнее меню Menú Principal - Menu trên + Menu trên 하단 메뉴 @@ -216,7 +216,7 @@ Bottom-Menü Внизу меню Menú Inferior - Menu dưới + Menu dưới diff --git a/m.layouts/default/conf/info.xml b/m.layouts/default/conf/info.xml new file mode 100644 index 000000000..bdf55f3f6 --- /dev/null +++ b/m.layouts/default/conf/info.xml @@ -0,0 +1,78 @@ + + + XE 공식 사이트 모바일 레이아웃 + XE Official Mobile layout + 官方移动版布局 + XE Mobile 官方版面 + + XE 공식 모바일 레이아웃입니다. + 디자인, 퍼블리싱 : 정찬명 + 레이아웃 제작 : haneul + + + This layout is the XE Official website layout. + Design, HTML/CSS : Chan-Myung Jeong + Layout producer : haneul + + + 官方移动版布局。 + Design, HTML/CSS : Chan-Myung Jeong + Layout producer : haneul + + + 這是 XE 官方網站版面。 + Design, HTML/CSS : Chan-Myung Jeong + Layout producer : haneul + + 0.1 + 2010-06-10 + http://xpressengine.com + + + XE + XE + XE + XE + + + + 홈페이지 Title + Homepage Title + 网站标题 + 首頁標題 + + + 홈 페이지 URL + ホームページURL + 主页地址 + 主頁網址 + Homepage URL + Homepage URL + Домашняя страница URL + URL de la página web + URL Trang chủ + 로고를 클릭시에 이동할 홈 페이지 URL을 입력해 주세요. + ロゴをクリックした時に移動するホームページのURLを入力して下さい。 + 点击网站LOGO时要移动的页面URL。 + 請輸入當用戶按了網站 Logo 後,要前往的頁面網址。 + Please input the URL to redirect when user clicks the logo + Bitte geben Sie die URL umzuleiten, wenn Benutzer klickt das Logo + Пожалуйста, введите URL для перенаправления, когда пользователь нажимает логотип + Ingresar el URL de la página web para redireccionar al pulsar el logotipo + Hãy nhập địa chỉ bạn muốn chuyển đến khi bấm vào Logo + + + + + 상단 메뉴 + 上段用メニュー + 主菜单 + 主選單 + Top menu + Top Menü + Верхнее меню + Menú Principal + Menu trên + + + diff --git a/m.layouts/default/layout.html b/m.layouts/default/layout.html new file mode 100644 index 000000000..9f9c593e2 --- /dev/null +++ b/m.layouts/default/layout.html @@ -0,0 +1,18 @@ + + +{$content} + +

{$layout_info->index_title}

diff --git a/m.layouts/default/mx.css b/m.layouts/default/mx.css new file mode 100644 index 000000000..188b12fe7 --- /dev/null +++ b/m.layouts/default/mx.css @@ -0,0 +1,36 @@ +@charset "utf-8"; +/* Mobile XE */ +body{margin:0;background:#fff;color:#000;word-wrap:break-word} +body,input,textarea,select,button,table{font-family:Tahoma, Geneva, sans-serif} +/* Common Class */ +.fl{float:left} +.fr{float:right} +.cb{clear:both} +/* Edge = Header/Footer */ +.eg{position:relative;background:#666;*zoom:1} +.eg:after{content:"";display:block;clear:both} +.eg a{text-decoration:none} +/* Header */ +.hd{padding:10px;border-top:3px solid #444} +.hd .h1{float:left;display:inline;color:#fff;font-size:24px;margin:0;font-weight:bold;text-shadow:0 0 3px #000} +.hd .h1 a{color:#fff} +.hd .bn{font-size:12px} +/* Footer */ +.ft{padding:0 5px;margin:0;list-style:none} +.ft a{display:inline-block;padding:10px;color:#fff;text-shadow:0 0 2px #000;font-size:14px;font-weight:bold} +/* Copyright */ +.cr{margin:0;padding:5px 15px;text-align:center;background:#444;color:#ccc;text-shadow:0 0 2px #000;font-size:12px;font-weight:bold} +/* Search */ +.sh{position:relative;text-align:center} +.sh .itx{width:80%;background:none;border:5px solid #333;margin:10px} +/* Definition */ +.dl{margin:10px} +.dl dt{margin:0;padding:0;font-weight:bold} +.dl dd{margin:0 0 10px 0;padding:0;color:#666} +/* Graph Horizontal */ +.gh{list-style:none;margin:10px;padding:0} +.gh li{position:relative;margin:5px 0} +.gh .bar{position:absolute;z-index:-1;height:100%;width:0;background:#ddd} +.gh em{color:#f60} +/* Button */ +.bn{display:inline-block;padding:5px 10px;font-weight:normal;font-size:14px;border:1px solid #333;background:#eee;color:#000;text-shadow:1px 1px 0 #fff;box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;-webkit-box-shadow:0 0 3px #333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;text-decoration:none} diff --git a/modules/addon/addon.admin.controller.php b/modules/addon/addon.admin.controller.php index 184540af5..05196a4dd 100644 --- a/modules/addon/addon.admin.controller.php +++ b/modules/addon/addon.admin.controller.php @@ -24,15 +24,17 @@ // addon값을 받아옴 $addon = Context::get('addon'); + $type = Context::get('type'); + if(!$type) $type = "pc"; if($addon) { // 활성화 되어 있으면 비활성화 시킴 - if($oAddonModel->isActivatedAddon($addon, $site_module_info->site_srl)) $this->doDeactivate($addon, $site_module_info->site_srl); + if($oAddonModel->isActivatedAddon($addon, $site_module_info->site_srl, $type)) $this->doDeactivate($addon, $site_module_info->site_srl, $type); // 비활성화 되어 있으면 활성화 시킴 - else $this->doActivate($addon, $site_module_info->site_srl); + else $this->doActivate($addon, $site_module_info->site_srl, $type); } - $this->makeCacheFile($site_module_info->site_srl); + $this->makeCacheFile($site_module_info->site_srl, $type); } /** @@ -50,7 +52,8 @@ $this->doSetup($addon_name, $args, $site_module_info->site_srl); - $this->makeCacheFile($site_module_info->site_srl); + $this->makeCacheFile($site_module_info->site_srl, "pc"); + $this->makeCacheFile($site_module_info->site_srl, "mobile"); } @@ -71,9 +74,10 @@ * @brief 애드온 활성화 * addons라는 테이블에 애드온의 활성화 상태를 on 시켜줌 **/ - function doActivate($addon, $site_srl = 0) { + function doActivate($addon, $site_srl = 0, $type = "pc") { $args->addon = $addon; - $args->is_used = 'Y'; + if($type == "pc") $args->is_used = 'Y'; + else $args->is_used_m = "Y"; if(!$site_srl) return executeQuery('addon.updateAddon', $args); $args->site_srl = $site_srl; return executeQuery('addon.updateSiteAddon', $args); @@ -84,9 +88,10 @@ * * addons라는 테이블에 애드온의 이름을 제거하는 것으로 비활성화를 시키게 된다 **/ - function doDeactivate($addon, $site_srl = 0) { + function doDeactivate($addon, $site_srl = 0, $type = "pc") { $args->addon = $addon; - $args->is_used = 'N'; + if($type == "pc") $args->is_used = 'N'; + else $args->is_used_m = 'N'; if(!$site_srl) return executeQuery('addon.updateAddon', $args); $args->site_srl = $site_srl; return executeQuery('addon.updateSiteAddon', $args); diff --git a/modules/addon/addon.admin.model.php b/modules/addon/addon.admin.model.php index 7d4efe229..5e9d4b8e7 100644 --- a/modules/addon/addon.admin.model.php +++ b/modules/addon/addon.admin.model.php @@ -38,6 +38,7 @@ for($i=0;$i<$searched_count;$i++) { // 애드온의 이름 $addon_name = $searched_list[$i]; + if($addon_name == "smartphone") continue; // 애드온의 경로 (files/addons가 우선) $path = $this->getAddonPath($addon_name); @@ -49,6 +50,7 @@ $info->addon = $addon_name; $info->path = $path; $info->activated = false; + $info->mactivated = false; // DB에 입력되어 있는지 확인 if(!in_array($addon_name, array_keys($inserted_addons))) { @@ -59,6 +61,7 @@ // 활성화 되어 있는지 확인 } else { if($inserted_addons[$addon_name]->is_used=='Y') $info->activated = true; + if($inserted_addons[$addon_name]->is_used_m=='Y') $info->mactivated = true; } $list[] = $info; @@ -291,12 +294,16 @@ /** * @brief 애드온이 활성화 되어 있는지 체크 **/ - function isActivatedAddon($addon, $site_srl = 0) { + function isActivatedAddon($addon, $site_srl = 0, $type = "pc") { $args->addon = $addon; - if(!$site_srl) $output = executeQuery('addon.getAddonIsActivated', $args); + if(!$site_srl) { + if($type == "pc") $output = executeQuery('addon.getAddonIsActivated', $args); + else $output = executeQuery('addon.getMAddonIsActivated', $args); + } else { $args->site_srl = $site_srl; - $output = executeQuery('addon.getSiteAddonIsActivated', $args); + if($type == "pc") $output = executeQuery('addon.getSiteAddonIsActivated', $args); + else $output = executeQuery('addon.getSiteMAddonIsActivated', $args); } if($output->data->count>0) return true; return false; diff --git a/modules/addon/addon.class.php b/modules/addon/addon.class.php index c98060f78..4a11eff07 100644 --- a/modules/addon/addon.class.php +++ b/modules/addon/addon.class.php @@ -7,8 +7,6 @@ class addon extends ModuleObject { - var $cache_file = "./files/cache/activated_addons.cache.php"; - /** * @brief 설치시 추가 작업이 필요할시 구현 **/ @@ -42,7 +40,9 @@ * @brief 설치가 이상이 없는지 체크하는 method **/ function checkUpdate() { - if(file_exists($this->cache_file)) FileHandler::removeFile($this->cache_file); + $oDB = &DB::getInstance(); + if(!$oDB->isColumnExists("addons", "is_used_m")) return true; + if(!$oDB->isColumnExists("addons_site", "is_used_m")) return true; return false; } @@ -50,6 +50,13 @@ * @brief 업데이트 실행 **/ function moduleUpdate() { + $oDB = &DB::getInstance(); + if(!$oDB->isColumnExists("addons", "is_used_m")) { + $oDB->addColumn("addons", "is_used_m", "char", 1, "N", true); + } + if(!$oDB->isColumnExists("addons_site", "is_used_m")) { + $oDB->addColumn("addons_site", "is_used_m", "char", 1, "N", true); + } return new Object(); } diff --git a/modules/addon/addon.controller.php b/modules/addon/addon.controller.php index bae6af4f0..ed689ee7d 100644 --- a/modules/addon/addon.controller.php +++ b/modules/addon/addon.controller.php @@ -17,20 +17,20 @@ /** * @brief 메인/ 가상 사이트별 애드온 캐시 파일의 위치를 구함 **/ - function getCacheFilePath() { + function getCacheFilePath($type = "pc") { $site_module_info = Context::get('site_module_info'); $site_srl = $site_module_info->site_srl; $addon_path = _XE_PATH_.'files/cache/addons/'; - if($site_srl) $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php'; - else $addon_file = $addon_path.'acivated_addons.cache.php'; + if($site_srl) $addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php'; + else $addon_file = $addon_path.$type.'acivated_addons.cache.php'; if($this->addon_file_called) return $addon_file; $this->addon_file_called = true; if(!is_dir($addon_path)) FileHandler::makeDir($addon_path); - if(!file_exists($addon_file)) $this->makeCacheFile($site_srl); + if(!file_exists($addon_file)) $this->makeCacheFile($site_srl, $type); return $addon_file; } @@ -120,13 +120,15 @@ /** * @brief 캐시 파일 생성 **/ - function makeCacheFile($site_srl = 0) { + function makeCacheFile($site_srl = 0, $type = "pc") { // 모듈에서 애드온을 사용하기 위한 캐시 파일 생성 $buff = ""; $oAddonModel = &getAdminModel('addon'); - $addon_list = $oAddonModel->getInsertedAddons($site_srl); + $addon_list = $oAddonModel->getInsertedAddons($site_srl, $type); foreach($addon_list as $addon => $val) { - if($val->is_used != 'Y' || !is_dir(_XE_PATH_.'addons/'.$addon) ) continue; + if($val->addon == "smartphone") continue; + if(!is_dir(_XE_PATH_.'addons/'.$addon)) continue; + if(($type == "pc" && $val->is_used != 'Y') || ($type == "mobile" && $val->is_used_m != 'Y')) continue; $extra_vars = unserialize($val->extra_vars); $mid_list = $extra_vars->mid_list; @@ -146,8 +148,8 @@ $addon_path = _XE_PATH_.'files/cache/addons/'; if(!is_dir($addon_path)) FileHandler::makeDir($addon_path); - if($site_srl) $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php'; - else $addon_file = $addon_path.'acivated_addons.cache.php'; + if($site_srl) $addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php'; + else $addon_file = $addon_path.$type.'acivated_addons.cache.php'; FileHandler::writeFile($addon_file, $buff); } diff --git a/modules/addon/queries/getMAddonIsActivated.xml b/modules/addon/queries/getMAddonIsActivated.xml new file mode 100644 index 000000000..debf9224e --- /dev/null +++ b/modules/addon/queries/getMAddonIsActivated.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/modules/addon/queries/getSiteAddonIsActivated.xml b/modules/addon/queries/getSiteAddonIsActivated.xml index b4bc83c89..2fc016b3c 100644 --- a/modules/addon/queries/getSiteAddonIsActivated.xml +++ b/modules/addon/queries/getSiteAddonIsActivated.xml @@ -1,4 +1,4 @@ - +
diff --git a/modules/addon/queries/getSiteMAddonIsActivated.xml b/modules/addon/queries/getSiteMAddonIsActivated.xml new file mode 100644 index 000000000..432f3aa0a --- /dev/null +++ b/modules/addon/queries/getSiteMAddonIsActivated.xml @@ -0,0 +1,13 @@ + + +
+ + + + + + + + + + diff --git a/modules/addon/queries/updateAddon.xml b/modules/addon/queries/updateAddon.xml index 469cfa9fd..433f65d8d 100644 --- a/modules/addon/queries/updateAddon.xml +++ b/modules/addon/queries/updateAddon.xml @@ -4,6 +4,7 @@ + diff --git a/modules/addon/queries/updateSiteAddon.xml b/modules/addon/queries/updateSiteAddon.xml index 344c220d9..3020aa255 100644 --- a/modules/addon/queries/updateSiteAddon.xml +++ b/modules/addon/queries/updateSiteAddon.xml @@ -4,6 +4,7 @@ + diff --git a/modules/addon/schemas/addons.xml b/modules/addon/schemas/addons.xml index 566bc989f..60c547497 100644 --- a/modules/addon/schemas/addons.xml +++ b/modules/addon/schemas/addons.xml @@ -1,6 +1,7 @@
+
diff --git a/modules/addon/schemas/addons_site.xml b/modules/addon/schemas/addons_site.xml index 550ef3bfa..317629190 100644 --- a/modules/addon/schemas/addons_site.xml +++ b/modules/addon/schemas/addons_site.xml @@ -2,6 +2,7 @@ + diff --git a/modules/addon/tpl/js/addon.js b/modules/addon/tpl/js/addon.js index 782702afa..f8d5dd1cf 100644 --- a/modules/addon/tpl/js/addon.js +++ b/modules/addon/tpl/js/addon.js @@ -9,8 +9,10 @@ function doToggleAddon(addon) { } // 관리자 제어판 페이지용 -function doToggleAddonInAdmin(obj, addon) { +function doToggleAddonInAdmin(obj, addon, type) { var params = new Array(); params['addon'] = addon; + if(typeof(type) == "undefined") type = "pc"; + params['type'] = type; exec_xml('addon','procAddonAdminToggleActivate',params,function() { if(/Active/.test(obj.className)) obj.className = "buttonSet buttonDisable"; else obj.className = "buttonSet buttonActive"; } ); } diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 2d715a8f5..fcfe61936 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -7,23 +7,8 @@ class adminAdminView extends admin { - /** - * @brief Initilization - * @return none - **/ - function init() { - $this->setTemplatePath($this->module_path.'tpl'); - - // forbit access if the user is not an administrator - $oMemberModel = &getModel('member'); - $logged_info = $oMemberModel->getLoggedInfo(); - if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator"); - - // change into administration layout - $this->setLayoutPath($this->getTemplatePath()); - $this->setLayoutFile('layout.html'); - - // Retrieve the list of installed modules + function loadSideBar() + { $oModuleModel = &getModel('module'); $installed_module_list = $oModuleModel->getModulesXmlInfo(); @@ -64,6 +49,32 @@ if(count($package_modules)) $package_modules[count($package_modules)-1]->position = 'end'; Context::set('package_modules', $package_modules); Context::set('installed_modules', $installed_modules); + Context::setBrowserTitle("XE Admin Page"); + + // add javascript tooltip plugin - gony + Context::loadJavascriptPlugin('qtip'); + Context::loadJavascriptPlugin('watchinput'); + } + + /** + * @brief Initilization + * @return none + **/ + function init() { + + // forbit access if the user is not an administrator + $oMemberModel = &getModel('member'); + $logged_info = $oMemberModel->getLoggedInfo(); + if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator"); + + // change into administration layout + $this->setTemplatePath($this->module_path.'tpl'); + $this->setLayoutPath($this->getTemplatePath()); + $this->setLayoutFile('layout.html'); + + $this->loadSideBar(); + + // Retrieve the list of installed modules $db_info = Context::getDBInfo(); @@ -78,11 +89,6 @@ if($db_info->http_port) Context::set('http_port', $db_info->http_port); if($db_info->https_port) Context::set('https_port', $db_info->https_port); - Context::setBrowserTitle("XE Admin Page"); - - // add javascript tooltip plugin - gony - Context::loadJavascriptPlugin('qtip'); - Context::loadJavascriptPlugin('watchinput'); } /** @@ -268,6 +274,8 @@ Context::set('langs', Context::loadLangSupported()); Context::set('lang_selected', Context::loadLangSelected()); + + Context::set('use_mobile_view', $db_info->use_mobile_view=="Y"?'Y':'N'); $ftp_info = Context::getFTPInfo(); Context::set('ftp_info', $ftp_info); diff --git a/modules/admin/conf/info.xml b/modules/admin/conf/info.xml index 41dc82a2b..5e34dddde 100644 --- a/modules/admin/conf/info.xml +++ b/modules/admin/conf/info.xml @@ -10,7 +10,7 @@ 管理員模組 각 모듈들의 기능을 나열하고 관리자용 레이아웃을 적용하여 관리 기능을 사용할 수 있도록 하는 모듈입니다. This module shows a list of features of each module, and enables you to use a quite few of managers by applying layout for administrator. - Module này hiển thị những đặc tính của những Module, và cho phép bạn sử dụng một chút quyền của Administrator bở việc áp dụng giao diện cho Administrator. + Module này hiển thị thông tin của những Module đã được cài đặt, và cho phép bạn sử dụng quyền của Administrator để thiết lập giao diện. Este módulo muestra una lista de características de cada módulo, en donde puede activar la función de la administracion aplicando el diseño del administrador. 列出各模块的功能并使用管理员布局,可以让其使用管理功能的模块。 各モジュールの機能を表示し、かつ管理者用のレイアウトを適用させて、管理機能が使用出来るようにします。 diff --git a/modules/admin/lang/en.lang.php b/modules/admin/lang/en.lang.php index e7b5f9ae6..fb379f1af 100644 --- a/modules/admin/lang/en.lang.php +++ b/modules/admin/lang/en.lang.php @@ -82,5 +82,8 @@ $lang->ftp_get_list = "Get List"; $lang->ftp_remove_info = 'Remove FTP Info.'; $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->msg_self_restart_cache_engine = 'Please restart Memcached or cache daemon.'; + $lang->mobile_view = 'Mobile View'; + $lang->about_mobile_view = 'Mobile View will display the best layout when accessing with smartphones.'; + $lang->autoinstall = 'EasyInstall'; ?> diff --git a/modules/admin/lang/es.lang.php b/modules/admin/lang/es.lang.php index 1c1119d72..c19ce16b9 100644 --- a/modules/admin/lang/es.lang.php +++ b/modules/admin/lang/es.lang.php @@ -84,5 +84,8 @@ $lang->ftp_get_list = "Get List"; $lang->ftp_remove_info = 'Remove FTP Info.'; $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->msg_self_restart_cache_engine = 'Please restart Memcached or cache daemon.'; + $lang->mobile_view = 'Use Mobile View'; + $lang->about_mobile_view = 'If accessing with a smartphone, display content with mobile layout.'; + $lang->autoinstall = 'EasyInstall'; ?> diff --git a/modules/admin/lang/fr.lang.php b/modules/admin/lang/fr.lang.php index 5793d68ca..500b892ae 100644 --- a/modules/admin/lang/fr.lang.php +++ b/modules/admin/lang/fr.lang.php @@ -83,5 +83,8 @@ $lang->ftp_get_list = "Get List"; $lang->ftp_remove_info = 'Remove FTP Info.'; $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->msg_self_restart_cache_engine = 'Please restart Memcached or cache daemon.'; + $lang->mobile_view = 'Use Mobile View'; + $lang->about_mobile_view = 'If accessing with a smartphone, display content with mobile layout.'; + $lang->autoinstall = 'EasyInstall'; ?> diff --git a/modules/admin/lang/jp.lang.php b/modules/admin/lang/jp.lang.php index 96c4e4f0e..bb933ca53 100644 --- a/modules/admin/lang/jp.lang.php +++ b/modules/admin/lang/jp.lang.php @@ -82,5 +82,8 @@ $lang->ftp_get_list = "Get List"; $lang->ftp_remove_info = 'Remove FTP Info.'; $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->msg_self_restart_cache_engine = 'Please restart Memcached or cache daemon.'; + $lang->mobile_view = 'Use Mobile View'; + $lang->about_mobile_view = 'If accessing with a smartphone, display content with mobile layout.'; + $lang->autoinstall = 'イージーインストール'; ?> diff --git a/modules/admin/lang/ko.lang.php b/modules/admin/lang/ko.lang.php index 60d56353f..15a56750a 100644 --- a/modules/admin/lang/ko.lang.php +++ b/modules/admin/lang/ko.lang.php @@ -83,4 +83,8 @@ $lang->ftp_remove_info = 'FTP 정보 삭제'; $lang->msg_ftp_invalid_path = 'FTP Path를 읽을 수 없습니다.'; $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->mobile_view = '모바일 뷰 사용'; + $lang->about_mobile_view = '스마트폰 등을 이용하여 접속할 때 모바일 화면에 최적화된 레이아웃을 이용하도록 합니다.'; + + $lang->autoinstall = '쉬운 설치'; ?> diff --git a/modules/admin/lang/ru.lang.php b/modules/admin/lang/ru.lang.php index c3c82dceb..9ff345217 100644 --- a/modules/admin/lang/ru.lang.php +++ b/modules/admin/lang/ru.lang.php @@ -81,5 +81,8 @@ $lang->ftp_get_list = 'Get List'; $lang->ftp_remove_info = 'Remove FTP Info'; $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->msg_self_restart_cache_engine = 'Please restart Memcached or cache daemon.'; + $lang->mobile_view = 'Use Mobile View'; + $lang->about_mobile_view = 'If accessing with a smartphone, display content with mobile layout.'; + $lang->autoinstall = 'EasyInstall'; ?> diff --git a/modules/admin/lang/vi.lang.php b/modules/admin/lang/vi.lang.php index 57c85f25b..51a01f412 100644 --- a/modules/admin/lang/vi.lang.php +++ b/modules/admin/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ $lang->admin_info = 'Thông tin Administrator'; $lang->admin_index = 'Trang chủ Admin'; @@ -36,7 +37,7 @@ $lang->current_version = "Phiên bản"; $lang->current_path = "Thư mục cài đặt"; $lang->released_version = "Phiên bản mới nhất"; - $lang->about_download_link = "Đã có phiên bản mới nhất của Zerboard XE.\n hãy bấm vào Link để Download."; + $lang->about_download_link = "Đã có phiên bản mới nhất của XE.\n Hãy bấm vào Link để Download."; $lang->item_module = "Danh sách Module"; $lang->item_addon = "Danh sách Addon"; @@ -57,7 +58,7 @@ $lang->msg_default_act_is_null = 'Phím tắt đã không được tạo, bởi vì bạn không được đặt quyền là quản lý toàn diện.'; $lang->welcome_to_xe = 'Chào mừng bạn đến với trang quản lý của XE!'; - $lang->about_admin_page = "Trang Admin này vẫn đang được phát triển,\nChúng tôi sẽ thêm vào những nội dung chủ yếu từ những ý kiến của người sử dụng."; + $lang->about_admin_page = "Trang Admin này vẫn đang được phát triển,\n Chúng tôi sẽ thêm vào những nội dung chủ yếu từ những ý kiến của người sử dụng."; $lang->about_lang_env = "Để hiển thị ngôn ngữ đã chọn là mặc định. Hãy bấm [Lưu] phía dưới để lưu lại."; $lang->xe_license = 'XE sử dụng giấy phép GPL'; @@ -80,9 +81,12 @@ $lang->about_server_ports = "Nếu Host của bạn sử dụng cổng khác cổng mặc định 80 cho HTTP, 443 cho HTTPS, bạn nên xác định và nhập chính xác cổng kết nối."; $lang->use_db_session = 'Xác nhận Database'; $lang->about_db_session = 'PHP sẽ xác nhận với Database. Có thể cải thiện được tốc độ của Website.'; - $lang->sftp = "Use SFTP"; - $lang->ftp_get_list = "Get List"; - $lang->ftp_remove_info = 'Remove FTP Info.'; - $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->sftp = "Sử dụng SFTP"; + $lang->ftp_get_list = "Nhận danh sách"; + $lang->ftp_remove_info = 'Xóa thông tin FTP.'; + $lang->msg_ftp_invalid_path = 'Không tìm thấy thông tin của thư mục bạn đã nhập trên FTP.'; + $lang->msg_self_restart_cache_engine = 'Hãy thiết lập lại bộ nhớ Cache hoặc Deamon Cache.'; + $lang->mobile_view = 'Xem bằng di động'; + $lang->about_mobile_view = 'Nếu truy cập bằng thiết bị di động, nội dung sẽ được bố trí theo từng loại thiết bị.'; + $lang->autoinstall = 'Cập nhật tự động'; ?> diff --git a/modules/admin/lang/zh-CN.lang.php b/modules/admin/lang/zh-CN.lang.php index 9c443acc0..28a561616 100644 --- a/modules/admin/lang/zh-CN.lang.php +++ b/modules/admin/lang/zh-CN.lang.php @@ -2,7 +2,7 @@ /** * @file zh-CN.lang.php * @author zero (zero@nzeo.com) - * @brief 简体中文语言包 (只收录基本内容) + * @brief 简体中文语言包 **/ $lang->admin_info = '管理员信息'; @@ -78,9 +78,12 @@ $lang->about_server_ports = "使用除HTTP(80), HTTPS(443)以外的端口时,必须得指定该服务器端口号。"; $lang->use_db_session = 'DB储存认证会话'; $lang->about_db_session = '用DB储存认证时的PHP会话。
服务器使用率较少的网站建议不要勾选此项(可提高网站访问速度)。
只是无法统计在线会员。'; - $lang->sftp = "Use SFTP"; - $lang->ftp_get_list = "Get List"; - $lang->ftp_remove_info = 'Remove FTP Info.'; - $lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.'; - $lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.'; + $lang->sftp = '使用sSFTP'; + $lang->ftp_get_list = '载入列表'; + $lang->ftp_remove_info = '删除FTP信息'; + $lang->msg_ftp_invalid_path = '无法读取FTP路径。'; + $lang->msg_self_restart_cache_engine = '请重新启动Memcached或CacheDaemon。'; + $lang->mobile_view = '开启移动版'; + $lang->about_mobile_view = '为智能手机访问网站,提供最佳视觉效果。'; + $lang->autoinstall = '安装·更新'; ?> diff --git a/modules/admin/lang/zh-TW.lang.php b/modules/admin/lang/zh-TW.lang.php index 6a5b2f3f0..6df11a74f 100644 --- a/modules/admin/lang/zh-TW.lang.php +++ b/modules/admin/lang/zh-TW.lang.php @@ -83,4 +83,7 @@ $lang->ftp_remove_info = '移除 FTP 資料'; $lang->msg_ftp_invalid_path = '指定的 FTP 路徑讀取失敗。'; $lang->msg_self_restart_cache_engine = '請重新啟動 Memcached 快取程式。'; + $lang->mobile_view = '手機瀏覽'; + $lang->about_mobile_view = '使用手機瀏覽時將會顯示最適當的畫面。'; + $lang->autoinstall = '自動安裝'; ?> diff --git a/modules/admin/tpl/_header.html b/modules/admin/tpl/_header.html index 994a098ba..65eff01a3 100644 --- a/modules/admin/tpl/_header.html +++ b/modules/admin/tpl/_header.html @@ -15,7 +15,8 @@
    -
  • {$lang->control_panel}
  • +
  • {$lang->control_panel}
  • +
  • {$lang->autoinstall}
  • {$val->title}
  • diff --git a/modules/admin/tpl/config.html b/modules/admin/tpl/config.html index 5f50a0d16..3ae6ba4a5 100644 --- a/modules/admin/tpl/config.html +++ b/modules/admin/tpl/config.html @@ -114,6 +114,13 @@

    {$lang->about_server_ports}

    + +
    {$lang->mobile_view}
    + + checked="checked" /> +

    {$lang->about_mobile_view}

    + + diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index adbcb6c0c..6818c733c 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -89,7 +89,8 @@
    {$lang->addon}
    {$lang->cmd_setup}
    -
    {$lang->status}
    +
    PC
    +
    Mobile
    @@ -104,6 +105,13 @@ {$lang->notuse} + + + {$lang->use} + + {$lang->notuse} + + diff --git a/modules/autoinstall/autoinstall.admin.controller.php b/modules/autoinstall/autoinstall.admin.controller.php index 318b65433..d9e16ebd8 100644 --- a/modules/autoinstall/autoinstall.admin.controller.php +++ b/modules/autoinstall/autoinstall.admin.controller.php @@ -67,16 +67,19 @@ $config_file = null; switch($type) { - case "module": - case "addon": - case "layout": - case "widget": + case "m.layout": + $type = "layout"; + case "module": + case "addon": + case "layout": + case "widget": $config_file = "/conf/info.xml"; break; case "component": $config_file = "/info.xml"; break; case "style": + case "m.skin": $type = "skin"; case "skin": case "widgetstyle": diff --git a/modules/autoinstall/autoinstall.admin.view.php b/modules/autoinstall/autoinstall.admin.view.php index 8349e5f63..c56322ef4 100644 --- a/modules/autoinstall/autoinstall.admin.view.php +++ b/modules/autoinstall/autoinstall.admin.view.php @@ -91,6 +91,8 @@ $xmlDoc = $xml->loadXmlFile(FileHandler::getRealPath($path).$config_file); if(!$xmlDoc) continue; if($type == "drcomponent") $type = "component"; + if($type == "style" || $type == "m.skin") $type = "skin"; + if($type == "m.layout") $type = "layout"; $title = $xmlDoc->{$type}->title->body; $installed[$key]->title = $title; } diff --git a/modules/autoinstall/autoinstall.model.php b/modules/autoinstall/autoinstall.model.php index caabc45d7..5aab8ceba 100644 --- a/modules/autoinstall/autoinstall.model.php +++ b/modules/autoinstall/autoinstall.model.php @@ -148,6 +148,7 @@ $config_file = null; switch($type) { + case "m.layout": case "module": case "addon": case "layout": @@ -157,6 +158,7 @@ case "component": $config_file = "/info.xml"; break; + case "m.skin": case "skin": case "widgetstyle": case "style": diff --git a/modules/autoinstall/conf/info.xml b/modules/autoinstall/conf/info.xml index f3c28fa4d..c70ab497c 100644 --- a/modules/autoinstall/conf/info.xml +++ b/modules/autoinstall/conf/info.xml @@ -2,33 +2,33 @@ 쉬운 설치 EasyInstaller - Cài đặt tự động + Cài đặt tự động 自動安裝 - 在线安装 - イージーインストール + 安装·更新 + イージーインストール 관리자 모드에서 클릭으로 모듈/스킨/레이아웃/위젯/위젯스타일 등을 설치하는 모듈입니다. With this module, you can install and upgrade your programs including modules, skins, layouts, etc., from www.xpressengine.com by one-click. - Với Module này, bạn có thể cập nhật và cài đặt các phiên bản một cách tự động. Bao gồm Module, Layout, Widget, Addon, ... từ trang chủ XE bằng một bấm chuột. - 可以藉由此模組安裝、更新程式包括模組、面板、版面等。 - 很方便的在管理页面一键安装XE相关模块(模块/皮肤/布局/控件/控件样式等)。 - 管理者モードにてクリックだけで、モジュール/スキン/レイアウト/ウィジェット/ウィジェットスタイルのインストールを可能にするモジュールです。 + Với Module này, bạn có thể cập nhật và cài đặt các phiên bản một cách tự động. Bao gồm Module, Layout, Widget, Addon, ... từ trang chủ XE bằng một bấm chuột. + 可以藉由此模組安裝、更新程式包括模組、面板、版面等。 + 很方便的在线安装/更新XE相关模块(模块/皮肤/布局/控件/控件样式等)。 + 管理者モードにてクリックだけで、モジュール/スキン/レイアウト/ウィジェット/ウィジェットスタイルのインストールを可能にするモジュールです。 0.3 2009-11-11 system haneul haneul - haneul + haneul haneul haneul - haneul + haneul sol sol - sol + sol sol sol - sol + sol diff --git a/modules/autoinstall/lang/vi.lang.php b/modules/autoinstall/lang/vi.lang.php index 301636a54..777de6032 100644 --- a/modules/autoinstall/lang/vi.lang.php +++ b/modules/autoinstall/lang/vi.lang.php @@ -28,8 +28,8 @@ $lang->description_download = "Khi FTP không được mở, bạn nên tải về và giả nén, sau đó Upload theo đường dẫn. (Nếu đường dẫn là ./modules/board, thì giải nén vào ./modules)"; $lang->path = "Đường dẫn"; $lang->cmd_download = "Download"; - $lang->view_installed_packages = "Installed Packages"; - $lang->msg_ftp_password_input = "Please input FTP password."; - $lang->dependant_list = "이 패키지에 의존하는 패키지 목록"; - $lang->description_uninstall = "패키지를 삭제합니다. 모듈의 경우 모든 데이터가 사라집니다."; + $lang->view_installed_packages = "Những gói đã cài đặt"; + $lang->msg_ftp_password_input = "Hãy nhập mật khẩu của FTP."; + $lang->dependant_list = "Gói cài đặt này phụ thuộc vào các gói khác trong danh sách"; + $lang->description_uninstall = "Loại bỏ gói cài đặt. Tất cả dữ liệu của các gói sẽ đồng thời bị xóa."; ?> diff --git a/modules/autoinstall/lang/zh-CN.lang.php b/modules/autoinstall/lang/zh-CN.lang.php index 9aa92385a..9852c5533 100644 --- a/modules/autoinstall/lang/zh-CN.lang.php +++ b/modules/autoinstall/lang/zh-CN.lang.php @@ -2,11 +2,11 @@ /** * @file zh-CN.lang.php * @author sol (sol@ngleader.com) 翻译:guny(space.china@gmail.com) - * @brief 自动安装(autoinstall)模块语言包 + * @brief 在线安装/更新(autoinstall)模块语言包 **/ - $lang->autoinstall = 'Autoinstall'; - $lang->about_autoinstall = 'Autoinstall是XpressEngine的自动安装模块。'; + $lang->autoinstall = '安装·更新'; + $lang->about_autoinstall = 'Autoinstall是XpressEngine的在线安装/更新模块。'; $lang->package_update = '最新更新'; $lang->package_downloaded_count = '总下载'; $lang->need_update = "有新的更新。"; @@ -18,18 +18,18 @@ $lang->view_all_package = "查看全部"; $lang->description_ftp_note = "请务必完成FTP设置,否则将无法在线安装(更新)相关模块。"; $lang->description_update = "新安装(更新)模块的版本信息,点击Update按钮后才能正常显示。"; - $lang->install = "Install"; - $lang->update = "Update"; - $lang->depending_programs = "This program depends on "; - $lang->require_update = "Update is required."; - $lang->require_installation = "Installation is required."; - $lang->description_install = "Installation process also install/update programs which this program depends on"; - $lang->current_version = "Installed version"; - $lang->description_download = "When FTP is disabled, you should download it and extract it into target path. (if target path is ./modules/board, extract it at ./modules)"; - $lang->path = "Path"; - $lang->cmd_download = "Download"; - $lang->view_installed_packages = "Installed Packages"; - $lang->msg_ftp_password_input = "Please input FTP password."; - $lang->dependant_list = "이 패키지에 의존하는 패키지 목록"; - $lang->description_uninstall = "패키지를 삭제합니다. 모듈의 경우 모든 데이터가 사라집니다."; + $lang->install = "安装"; + $lang->update = "更新"; + $lang->current_version = "现用版本"; + $lang->depending_programs = "联动插件/控件"; + $lang->require_update = "需要更新"; + $lang->require_installation = "需要安装"; + $lang->description_install = "安装时,与其联动的插件/控件也会同时被安装(更新)。"; + $lang->description_download = "无法使用FTP时,需得自行下载安装到指定路径。"; + $lang->path = "安装路径"; + $lang->cmd_download = "下载"; + $lang->view_installed_packages = "已安装的数据包"; + $lang->msg_ftp_password_input = "请输入FTP密码。"; + $lang->dependant_list = "联动数据包列表"; + $lang->description_uninstall = "确定要删除此数据包吗?如果此数据包为模块,模块中的数据将会全部消失。"; ?> diff --git a/modules/autoinstall/tpl/css/autoinstall.css b/modules/autoinstall/tpl/css/autoinstall.css index 492b9772c..cbda13ee7 100644 --- a/modules/autoinstall/tpl/css/autoinstall.css +++ b/modules/autoinstall/tpl/css/autoinstall.css @@ -55,3 +55,5 @@ ul.listOrder.desc li.arrow { background:url(../img/arrDown.gif) no-repeat right ul.listOrder li { position:relative; left:-1px; display:inline; margin:0; padding:0 5px 0 9px; border-left:1px solid #ddd;} ul.listOrder li.arrow a { text-decoration:none; font-weight:bold; color:#2893BB; } ul.listOrder li a { text-decoration:none; color:#7B7575; } + +p.caution strong { font-size: 1.2em; font-weight: bold; color: red; } diff --git a/modules/autoinstall/tpl/uninstall.html b/modules/autoinstall/tpl/uninstall.html index 1ed2bb27c..ce81be326 100644 --- a/modules/autoinstall/tpl/uninstall.html +++ b/modules/autoinstall/tpl/uninstall.html @@ -3,7 +3,7 @@

    {$package->title} [{$package->type}] - {$package->path}

    -

    {$lang->description_uninstall}

    +

    {$lang->description_uninstall}

    diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index d4b93cbd4..50f162c54 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -129,6 +129,10 @@ // 내용에서 XE만의 태그를 삭제 $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); + if(Mobile::isFromMobilePhone()) + { + $obj->content = nl2br(htmlspecialchars($obj->content)); + } if(!$obj->regdate) $obj->regdate = date("YmdHis"); // 세션에서 최고 관리자가 아니면 iframe, script 제거 diff --git a/modules/communication/conf/info.xml b/modules/communication/conf/info.xml index 52c67b5a8..ee7cb778a 100644 --- a/modules/communication/conf/info.xml +++ b/modules/communication/conf/info.xml @@ -4,7 +4,7 @@ コミュニケーション 会员交流 Communication - Communication + Communication Liên lạc 交流 회원들간의 쪽지, 친구기능을 담당하는 모듈입니다. @@ -12,7 +12,7 @@ 管理在线会员间短信息及好友功能的模块。 This module is for managing message, friend functions. Module quản lý tin nhắn và bạn bè. - This module is for managing message, friend functions. + This module is for managing message, friend functions. 管理線上會員間短訊及好友功能的模組。 0.1 2008-05-30 @@ -25,6 +25,6 @@ zero zero zero - zero + zero diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php index 341b7b85d..a59c71af8 100644 --- a/modules/document/document.admin.controller.php +++ b/modules/document/document.admin.controller.php @@ -529,6 +529,15 @@ executeQuery('file.updateFileValid', $args); } + // trigger 호출 (after) + if($output->toBool()) { + $trigger_output = ModuleHandler::triggerCall('document.restoreTrash', 'after', $document_args); + if(!$trigger_output->toBool()) { + $oDB->rollback(); + return $trigger_output; + } + } + // commit $oDB->commit(); return $output; diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 890f53004..947b5e88f 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -185,6 +185,10 @@ // 내용에서 XE만의 태그를 삭제 $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); + if(Mobile::isFromMobilePhone()) + { + $obj->content = nl2br(htmlspecialchars($obj->content)); + } // 세션에서 최고 관리자가 아니면 iframe, script 제거 if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -481,6 +485,7 @@ $oDocument = $oDocumentModel->getDocument($obj->document_srl); $trash_args->module_srl = $oDocument->get('module_srl'); + $obj->module_srl = $oDocument->get('module_srl'); // 휴지통 문서를 두번 휴지통에 버릴 수 없음. if($trash_args->module_srl == 0) return false; @@ -531,7 +536,16 @@ executeQuery('file.updateFileValid', $args); } - // commit + // trigger 호출 (after) + if($output->toBool()) { + $trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj); + if(!$trigger_output->toBool()) { + $oDB->rollback(); + return $trigger_output; + } + } + + // commit $oDB->commit(); return $output; @@ -1621,7 +1635,7 @@ $document_config = null; $document_config->use_history = Context::get('use_history'); - if(!$document_config->use_history) $document_config->user_history = 'N'; + if(!$document_config->use_history) $document_config->use_history = 'N'; $oModuleController = &getController('module'); for($i=0;$iis_admin == 'Y') return true; + $grant = Context::get('grant'); + if($grant->manager) return 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; diff --git a/modules/document/lang/vi.lang.php b/modules/document/lang/vi.lang.php index 67329363c..f7c27fc0f 100644 --- a/modules/document/lang/vi.lang.php +++ b/modules/document/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ $lang->document_list = 'Danh sách bài viết'; $lang->thumbnail_type = 'Định dạng hình nhỏ'; @@ -96,5 +97,5 @@ 'trash_ipaddress' => 'IP Người xóa', ); - $lang->success_trashed = "Successfully moved to trashcan"; + $lang->success_trashed = "Đã chuyển tới thùng rác thành công."; ?> diff --git a/modules/document/lang/zh-CN.lang.php b/modules/document/lang/zh-CN.lang.php index 21c697e46..7c0261c3c 100644 --- a/modules/document/lang/zh-CN.lang.php +++ b/modules/document/lang/zh-CN.lang.php @@ -67,8 +67,8 @@ ); $lang->alias = "Alias"; - $lang->history = "编辑记录"; - $lang->about_use_history = "设置启用编辑记录与否。启用将记录修改主题版本,并可以复原。"; + $lang->history = "历史版本功能"; + $lang->about_use_history = "启用历史版本功能它将记录主题修改版本,并还可以复原到之前版本。"; $lang->trace_only = "只留痕迹"; $lang->cmd_trash = "回收箱"; @@ -95,5 +95,6 @@ 'trash_ipaddress' => '操作人IP地址', ); - $lang->success_trashed = "Successfully moved to trashcan"; + $lang->success_trashed = '已成功移除到回收箱。'; + ?> diff --git a/modules/editor/components/image_gallery/tpl/slide_gallery.js b/modules/editor/components/image_gallery/tpl/slide_gallery.js index 3cab52970..22190d208 100644 --- a/modules/editor/components/image_gallery/tpl/slide_gallery.js +++ b/modules/editor/components/image_gallery/tpl/slide_gallery.js @@ -159,7 +159,7 @@ function display_gallery_image(obj, is_first_display) { var source_filename = obj.image_url; var tmp_arr = source_filename.split('/'); var filename = tmp_arr[tmp_arr.length-1]; - xInnerHtml("zone_gallery_image_filename_"+obj.srl, ""+unescape(filename)+""); + xInnerHtml("zone_gallery_image_filename_"+obj.srl, ""+decodeURI(filename)+""); // 네이게이션 영역의 숫자 변경 var zone_navigator = xGetElementById("zone_gallery_navigator_status_"+obj.srl); diff --git a/modules/editor/editor.controller.php b/modules/editor/editor.controller.php index 0d66ffaa8..8b4c0162a 100644 --- a/modules/editor/editor.controller.php +++ b/modules/editor/editor.controller.php @@ -153,6 +153,7 @@ **/ function triggerEditorComponentCompile(&$content) { if(Context::getResponseMethod()!='HTML') return new Object(); + if(Mobile::isFromMobilePhone()) return new Object(); $module_info = Context::get('module_info'); $module_srl = $module_info->module_srl; @@ -184,6 +185,7 @@ } $content = $this->transComponent($content); + return new Object(); } /** diff --git a/modules/editor/lang/vi.lang.php b/modules/editor/lang/vi.lang.php index 339e23955..3dd04be94 100644 --- a/modules/editor/lang/vi.lang.php +++ b/modules/editor/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ $lang->editor = 'WYSIWYG toàn diện'; $lang->component_name = 'Thành phần'; @@ -120,7 +121,7 @@ $lang->edit->help_align_left = 'Căn trái'; $lang->edit->help_align_center = 'Căn giữa'; $lang->edit->help_align_right = 'Căn phải'; - $lang->edit->help_align_justify = 'Align justity'; + $lang->edit->help_align_justify = 'Đều hai bên'; $lang->edit->help_add_indent = 'Thụt vào'; $lang->edit->help_remove_indent = 'Giãn ra'; $lang->edit->help_list_number = 'Thứ tự số'; @@ -213,7 +214,7 @@ $lang->edit->minimize_list = 'Thu nhỏ'; $lang->edit->move = 'Di chuyển'; - $lang->edit->refresh = 'Refresh'; + $lang->edit->refresh = 'Làm mới'; $lang->edit->materials = 'Vật liệu'; $lang->edit->temporary_savings = 'Danh sách lưu tạm thời'; @@ -223,10 +224,10 @@ $lang->edit->paging_next_help = 'Chuyển tới trang tiếp.'; $lang->edit->toc = 'Board của nội dung'; - $lang->edit->close_help = '도움말 닫기'; + $lang->edit->close_help = 'Đóng hướng dẫn'; - $lang->edit->confirm_submit_without_saving = '저장하지 않은 단락이 있습니다.\\n그냥 전송하시겠습니까?'; + $lang->edit->confirm_submit_without_saving = 'Nội dung chưa được lưu.\\nBạn có chắc chắn muốn gửi không?'; - $lang->edit->image_align = '이미지 정렬'; - $lang->edit->attached_files = '첨부 파일'; + $lang->edit->image_align = 'Sắp xếp hình ảnh'; + $lang->edit->attached_files = 'File đính kèm'; ?> \ No newline at end of file diff --git a/modules/editor/lang/zh-CN.lang.php b/modules/editor/lang/zh-CN.lang.php index 3cabadf8a..582fa8232 100644 --- a/modules/editor/lang/zh-CN.lang.php +++ b/modules/editor/lang/zh-CN.lang.php @@ -227,6 +227,6 @@ $lang->edit->confirm_submit_without_saving = '尚有未保存的段落。\\n确定要提交吗?'; - $lang->edit->image_align = '이미지 정렬'; - $lang->edit->attached_files = '첨부 파일'; + $lang->edit->image_align = '图片对齐'; + $lang->edit->attached_files = '附件'; ?> diff --git a/modules/editor/skins/xpresseditor/skin.xml b/modules/editor/skins/xpresseditor/skin.xml index 72b14f803..fd7c894fb 100644 --- a/modules/editor/skins/xpresseditor/skin.xml +++ b/modules/editor/skins/xpresseditor/skin.xml @@ -1,8 +1,8 @@ XpressEditor Skin - XpressEditor Skin - XpressEditor Skin + XpressEditor Skin + XpressEditor Skin XpressEditor Skin XpressEditorスキン XpressEditor皮肤 @@ -32,11 +32,11 @@ 2009-03-22 행복한고니 - gony - gony + gony + gony gony gony - gony + gony gony diff --git a/modules/editor/styles/default/skin.xml b/modules/editor/styles/default/skin.xml index ca7789220..383680a69 100644 --- a/modules/editor/styles/default/skin.xml +++ b/modules/editor/styles/default/skin.xml @@ -34,8 +34,8 @@ 2009-05-23 정찬명 - Chan-Myung Jeong - Chan-Myung Jeong + Chan-Myung Jeong + Chan-Myung Jeong Chan-Myung Jeong Chan-Myung Jeong Chan-Myung Jeong diff --git a/modules/editor/styles/xeStyle/skin.xml b/modules/editor/styles/xeStyle/skin.xml index ef150b566..41a7bbb76 100644 --- a/modules/editor/styles/xeStyle/skin.xml +++ b/modules/editor/styles/xeStyle/skin.xml @@ -33,7 +33,7 @@ 2009-04-17 정찬명 - Chan-Myung Jeong + Chan-Myung Jeong Chan-Myung Jeong Chan-Myung Jeong Chan-Myung Jeong diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index e5472fbcc..7745f3801 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -417,7 +417,7 @@ } // 디렉토리 생성 - if(!FileHandler::makeDir($path)) return false; + if(!FileHandler::makeDir($path)) return new Object(-1,'msg_not_permitted_create'); // 파일 이동 if($manual_insert) { @@ -431,7 +431,7 @@ if(!@move_uploaded_file($file_info['tmp_name'], $filename)) { $ext = substr(strrchr($file_info['name'],'.'),1); $filename = $path. md5(crypt(rand(1000000,900000).$file_info['name'])).'.'.$ext; - if(!@move_uploaded_file($file_info['tmp_name'], $filename)) return false; + if(!@move_uploaded_file($file_info['tmp_name'], $filename)) return new Object(-1,'msg_file_upload_error'); } } diff --git a/modules/file/lang/en.lang.php b/modules/file/lang/en.lang.php index cdcb3a6f3..1b72dfaf2 100644 --- a/modules/file/lang/en.lang.php +++ b/modules/file/lang/en.lang.php @@ -53,4 +53,7 @@ 'ipaddress' => 'IP Address', ); $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/es.lang.php b/modules/file/lang/es.lang.php index b378ba4fd..52029040e 100644 --- a/modules/file/lang/es.lang.php +++ b/modules/file/lang/es.lang.php @@ -50,4 +50,7 @@ 'ipaddress' => 'Dirección IP', ); $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/fr.lang.php b/modules/file/lang/fr.lang.php index 695177b2c..0db76d239 100644 --- a/modules/file/lang/fr.lang.php +++ b/modules/file/lang/fr.lang.php @@ -50,4 +50,7 @@ 'ipaddress' => 'Adresse IP', ); $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/jp.lang.php b/modules/file/lang/jp.lang.php index dc733fc92..e8b5979f3 100644 --- a/modules/file/lang/jp.lang.php +++ b/modules/file/lang/jp.lang.php @@ -52,4 +52,7 @@ 'ipaddress' => 'IPアドレス', ); $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/ko.lang.php b/modules/file/lang/ko.lang.php index 14746eb17..5a4e2b69c 100644 --- a/modules/file/lang/ko.lang.php +++ b/modules/file/lang/ko.lang.php @@ -52,4 +52,6 @@ 'ipaddress' => 'IP 주소', ); $lang->msg_not_allowed_outlink = '외부링크에서 다운로드 할 수 없습니다.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; ?> diff --git a/modules/file/lang/ru.lang.php b/modules/file/lang/ru.lang.php index 5fba0b748..b73db339e 100644 --- a/modules/file/lang/ru.lang.php +++ b/modules/file/lang/ru.lang.php @@ -52,4 +52,7 @@ 'ipaddress' => 'IP-Адрес', ); $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/vi.lang.php b/modules/file/lang/vi.lang.php index 6f66c09aa..7d072e656 100644 --- a/modules/file/lang/vi.lang.php +++ b/modules/file/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ $lang->file = 'Đính kèm'; $lang->file_name = 'Tên File'; @@ -13,7 +14,7 @@ $lang->download_count = 'Lượt Download'; $lang->status = 'Trạng thái'; $lang->is_valid = 'Hợp lệ'; - $lang->is_stand_by = 'Chờ'; + $lang->is_stand_by = 'Chờ duyệt'; $lang->file_list = 'Danh sách đính kèm'; $lang->allow_outlink = 'Link từ bên ngoài'; $lang->allow_outlink_format = 'Những định dạng cho phép'; @@ -24,7 +25,7 @@ $lang->enable_download_group = 'Nhóm được phép Download'; $lang->about_allow_outlink = 'Những định dạng Link File từ bên ngoài được phép đính kèm.(Ngoại trừ định dạng Media *.wmv, *.mp3)'; - $lang->about_allow_outlink_format = 'Những định dạng này sẽ được phép liên kết. Hãy sử dụng dấu (,) để thêm nhiều định dạng .
    Ví dụ: hwp,doc,zip,pdf'; + $lang->about_allow_outlink_format = 'Những định dạng này sẽ được phép liên kết. Hãy sử dụng dấu (,) để thêm nhiều định dạng .
    Ví dụ: .hwp, .doc, .zip, .pdf'; $lang->about_allow_outlink_site = 'Những Website được phép liên kết. Hãy nhập địa chỉ của những Website được phép.
    Ví dụ: http://www.zeroboard.com'; $lang->about_allowed_filesize = 'Giới hạn dung lượng mỗi File đính kèm. (Ngoại trừ Administrators)'; $lang->about_allowed_attach_size = 'Giới hạn dung lượng tối đa cho tất cả các File đính kèm trong một bài viết. (Ngoại trừ Administrators)'; @@ -54,5 +55,8 @@ 'nick_name' => 'Nickname', 'ipaddress' => 'IP', ); - $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_allowed_outlink = 'Không cho phép tải file từ những trang khác ngoài trang này.'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/file/lang/zh-CN.lang.php b/modules/file/lang/zh-CN.lang.php index ccbfa9d41..ef46c733e 100644 --- a/modules/file/lang/zh-CN.lang.php +++ b/modules/file/lang/zh-CN.lang.php @@ -49,5 +49,8 @@ 'regdate' => '登录日期', 'ipaddress' => 'IP地址', ); - $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; + $lang->msg_not_allowed_outlink = '此站不允许外链下载。'; + $lang->msg_not_permitted_create = '无法生成文件或文件夹。'; + $lang->msg_file_upload_error = '上传文件发生出错。'; + ?> diff --git a/modules/file/lang/zh-TW.lang.php b/modules/file/lang/zh-TW.lang.php index 1fef19d27..41ddb9724 100644 --- a/modules/file/lang/zh-TW.lang.php +++ b/modules/file/lang/zh-TW.lang.php @@ -52,4 +52,7 @@ 'ipaddress' => 'IP位址', ); $lang->msg_not_allowed_outlink = '無法從網站下載檔案。'; + $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; + $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; + ?> diff --git a/modules/importer/ttimport.class.php b/modules/importer/ttimport.class.php index 5c9f84d26..2304ce4f5 100644 --- a/modules/importer/ttimport.class.php +++ b/modules/importer/ttimport.class.php @@ -220,6 +220,11 @@ } if($module_name == 'textyle') { + $args->document_srl = $obj->document_srl; + $args->module_srl = $obj->module_srl; + $args->logs = serialize(null); + $output = executeQuery('textyle.insertPublishLog', $args); + // 발행 상태의 visibility 값 $status_published = array('public', 'syndicated'); // 발행이 아닌 것들은 저장상태로 diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index b29ea3c14..b3164967f 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -65,6 +65,9 @@ $http_port = Context::get('http_port'); $https_port = Context::get('https_port'); + $use_mobile_view = Context::get('use_mobile_view'); + if($use_mobile_view!='Y') $use_mobile_view = 'N'; + $db_info = Context::getDBInfo(); $db_info->default_url = Context::get('default_url'); if($db_info->default_url && !preg_match('/^(http|https):\/\//i', $db_info->default_url)) $db_info->default_url = 'http://'.$db_info->default_url; @@ -74,6 +77,7 @@ $db_info->use_rewrite = $use_rewrite; $db_info->use_optimizer = $use_optimizer; $db_info->use_ssl = $use_ssl; + $db_info->use_mobile_view = $use_mobile_view; if($http_port) $db_info->http_port = (int) $http_port; else if($db_info->http_port) unset($db_info->http_port); diff --git a/modules/install/lang/vi.lang.php b/modules/install/lang/vi.lang.php index c7cac4226..e795a859d 100644 --- a/modules/install/lang/vi.lang.php +++ b/modules/install/lang/vi.lang.php @@ -2,10 +2,11 @@ /* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ * @File : common/lang/vi.lang.php ░░ ░░ * @Author : zero (zero@nzeo.com) ░░ - ░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░ - ░░ * @Website: http://vietxe.net ░░ + ░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░ + ░░ * @Website: http://xpressengine.vn ░░ ░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░ - ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +*/ $lang->introduce_title = 'Cài đặt XE'; $lang->license = <<install_checklist_desc = array( - 'php_version' => '[Đề nghị] If PHP version is 5.2.2, XE will not be installed because of bug', - 'permission' => '[Đề nghị] XE installation path or ./files directory\'s permission must be 707', - 'xml' => '[Đề nghị] XML Library cần thiết cho việc truyền thông File XML.', - 'session' => '[Required] PHP setting file\'s (php.ini) \'Session.auto_start\' must equal to zero in order for XE to use the session', + 'php_version' => '[Bắt buộc] Nếu phiên bản của PHP là 5.2.2, XE sẽ không thể cài đặt vì có lỗi.', + 'permission' => '[Bắt buộc] Thư mục cài đặt của XE hay ./files directory\ phải CHMOD thành 707', + 'xml' => '[Bắt buộc] XML Library cần thiết cho việc truyền thông File XML.', + 'session' => '[Bắt buộc] File thiết lập của PHP (php.ini) \'Session.auto_start\' phải là 0 theo thứ tự số cho phiên làm việc của XE hoạt động.', 'iconv' => 'Iconv cần phải được cài đặt cho việc chuyển đổi ngôn ngữ thàng UTFF-8 của những ngôn ngữ khác.', 'gd' => 'GD Library cần phải được cài đặt cho việc chuyển đổi hình ảnh.', ); @@ -543,14 +544,14 @@ EndOfLicense; $lang->about_database_file = 'Sqlite lưu trữ dữ liệu trong một File, vì vậy cần tới sự truy cập đến nó trong Database.
    Hãy CHMOD thành 707.'; - $lang->success_installed = 'Bạn đã cài đặt XE thành công!'; + $lang->success_installed = 'Chúc mừng bạn đã cài đặt XE thành công!'; $lang->msg_cannot_proc = 'Môi trường cài đặt không thích hợp.'; $lang->msg_already_installed = 'Một phiên bản nào đó của XE đã được cài đặt từ trước.
    Xin hãy kiểm tra lại!'; $lang->msg_dbconnect_failed = "Đã có lỗi xảy ra khi kết nối tới Database.\nXin vui lòng kiểm tra lại thông tin!"; $lang->msg_table_is_exists = "Table đã có sẵn trên Database.\nFile Config đã đuwọc thiết lập lại."; - $lang->msg_install_completed = "Đã cài đặt thành công!.\nXin cảm ơn đã sử dụng XE!"; + $lang->msg_install_completed = "Đã cài đặt XE thành công!.\nXin cảm ơn đã sử dụng XE!"; $lang->msg_install_failed = "Đã có lỗi xảy ra khi tạo File cài đặt."; - $lang->ftp_get_list = "Get List"; + $lang->ftp_get_list = "Nhận danh sách"; ?> diff --git a/modules/install/lang/zh-CN.lang.php b/modules/install/lang/zh-CN.lang.php index c6d6d9cc5..d42d62c5b 100644 --- a/modules/install/lang/zh-CN.lang.php +++ b/modules/install/lang/zh-CN.lang.php @@ -1,476 +1,169 @@ introduce_title = 'XE GNU通用许可协议'; + $lang->introduce_title = '安装XE'; $lang->license = <<GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU 较宽松公共许可证 + 1999.2, 第 2.1 版 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 版权所有 (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. + 允许每个人复制和发布本授权文件的完整副本, +但不允许对它进行任何修改。 -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] +[这是第一次发表的较宽松公共许可证 (Lesser GPL) 版本。它同时也可视为 GNU 函数库公共许可证 (GNU Library Public License) 第 2 版的后继者,故称为 2.1 版] - Preamble + 导言 - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. + 大多数软体许可证决意剥夺您共享和修改软体的自由。相反的,GNU 通用公共许可证力图保证您共享和修改自由软体的自由 —— 保证自由软体对所有使用者都是自由的。 - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. + 这个许可证,较宽松公共许可证,适用于一些由自由软体基金会与其他决定使用此许可证的软体作者,所特殊设计的软体套件 —— 象是函数库。您也可以使用它,但我们建议您事先仔细考虑,基于以下的说明是否此许可证或原来的通用公共许可证在任何特殊情况下均为较好的方案。 - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. + 当我们谈到自由软体时,我们所指的是自由,而不是价格。我们的 GNU 通用公共许可证是设计用以确保使您有发布自由软体备份的自由(如果您愿意,您可以对此项服务收取一定的费用);确保您能收到程式原始码或者在您需要时能得到它;确保您能修改软体或将它的一部分用于新的自由软体;而且还确保您知道您可以做上述的这些事情。 - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. + 为了保护您的权利,我们需要作出限制:禁止任何人否认您上述的权利,或者要求您放弃这些权利。如果您发布软件的副本,或者对之加以修改,这些规定就转化为您的责任。 - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. + 例如,如果您发布此函数库的副本,不管是免费还是收取费用,您必须将您享有的一切权利给予接受者;您必须确保他们也能收到或得到原始程式码;如果您将此函数库与其他的程式码连结,您必须提供完整的目的对象文件和程序(object file)给接受者,则当他们修改此函数库并重新编译过后,可以重新与目的档连结。您并且要将这些条款给他们看,使他们知道他们有这样的权利。 - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. + 我们采取两项措施来保护您的权利: (1)用版权来保护函数库。并且,(2)我们提供您这份许可证,赋予您复制,发布和(或)修改这些函数库的法律许可。 - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. + 为了保护每个发布者,我们需要非常清楚地让每个人明白,自由函数库是没有担保责任的。如果由于某人修改了函数库,并继续加以传播,我们需要它的接受者明白:他们所得到的并不是原始的版本。故由其他人引入的任何问题,对原作者的声誉将不会有任何的影响。 - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. + 最后,由于软体专利不断地威胁自由软体的存在,我们希望商业公司无法藉由自专利持有者取得一个受限的许可证,而有效地限制自由软体的使用者。因此,我们坚持一个函数库所能取得的任何专利,必须与本许可证所声明的“完全自由使用”一致。 - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. + 大部分的 GNU 软体,包括一些函数库,是受到原来的 GNU 通用公共许可证的保护。本许可证, GNU 较宽松通用公共许可证,适用于特殊设计的函数库,且与原来的通用公共许可证有很大的不同。我们在特定的函数库中使用它,以准许非自由的程式可以与这些函数库连结。 - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. + 当一个程式与一个函数库连结,不论是静态连结或使用共享函数库,二者的结合可以合理地说是结合的作品,一个原来的函数库的衍生品。因此,原来的通用公共许可证只有在整个结合品满足其自由的标准时,才予许连结。较宽松通用公共许可证则以更宽松的标准允许其他程式码与本函数库连结。 - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. + 我们称此许可证 "较宽松" 通用公共许可证,是因为它比起原来的通用公共许可证对使用者的自由做到较少的保护。在与非自由软体竞争时,它也提供其他自由软体的写作者较少的优势。这些不利之处正是我们使用原来的通用公共许可证于许多函数库的理由。然而,较宽松的许可证可在某些特殊场合下带来好处。 - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. + 例如,在少数情况下,可能会有特殊的需要而鼓励大家尽可能广泛地使用特定的函数库,因而使它成为实际上的标准。为了达到此目标,必须允许非自由的程式使用此函数库。一个较常发生的情况是一个自由的函数库与一个被广泛使用的非自由函数库做相同的工作,在此情况下,限制只有自由软体可以使用此自由函数库不会有多少好处,故我们如用了较宽松通用公共许可证。 - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. + 在其他情况下,允许非自由程式使用特定的函数库,可以让更多的人们使用自由软体的大部分。例如,允许非自由程式使用 GNU C 函数库可以让更多的人们使用整个 GNU 作业系统,以及它的变形,GNU/Linux 作业系统。 - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. + 尽管较宽松通用共公许可证对使用者的自由是较少的保护的,它却能确保与此函数库连结的程式的使用者拥有自由,而且具有使用修改过的函数库版本来执行该程式的必要方法。 - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. + 以下是复制、发布、以及修改的精确条款与条件。请注意 "基于函数库的作品" 以及 "使用函数库的作品" 之间的差异:前者包含来自函数库修改过的原始码;而后者则必须与函数库结合才能执行。 - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + GNU 较宽松公共许可证 + 有关复制,发布和修改的条款和条件 - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". + 0. 本许可证适用于任何软体函数库,或其他包含了由版权所有者加入的注意事项的程式,或其他有公信力的团体宣称其程式可以在较宽松通用公共许可证 (也称之为 "本许可证") 的条款下发布。每一位许可证接受者以 "您" 来称呼。 - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. + 一个 "函数库" 意指一些软体函数的集合,以及或准备好的资料以方便与应用程式 (其使用了其中某些函数与资料) 连结形成可执行的程式。 - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) + 以下,"函数库" 一词指的是任何在本条款下发布的这一类软体函数库或作品,一个 "基于本函数库的作品" 意指函数库或任何在版权法下的衍生作品:也就是说,一个包含了本函数库或其一部分的作品,可以是原封不动的,或经过修改的,和/或直接翻译成其他语言的。(在下文中,翻译是不受限地包含在 "修改" 的条款中。) - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. + 作品的 "原始码" 意指对作品进行修改最优先择取的形式。对函数库而言,完整的原始码意指所有模组的所有原始程式,加上有关的介面的定义,加上控制函数库的安装和编译的 script。 - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. + 本许可证条款不适用于复制,发布和修改以外的活动。这些活动超出这些条款的范围。使用本函数库来执行本程式的动作不受条款的限制,而程式的输出只有在其内容所构成的作品是基于本函数库时 (与在什么样的工具中使用本函数库来输出无关) ,这一条款才适用。以上是否为真则取决于本函数库具体用来做什么。 - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. + 1. 只要您在每一程式副本上明显和恰当地宣告版权声明和不承担担保的声明,并保持此许可证的声明和没有担保的声明完整无损,并和程式一起给其他每位程式接受者一份许可证的副本,您就可以用任何媒体复制和发布您收到的函数库的完整原始码。 - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. + 您可以为转让副本的实际行动收取一定费用。您也可以选择提供担保以换取一定的费用。 - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + 2. 只要您同时满足下面的所有条件,您就可以按前面第一款的要求修改函数库的一个或几个副本或它的任何部分,以此形成基于此函数库的作品,并且复制和发布这一经过修改的程式或作品: - a) The modified work must itself be a software library. + a) 被修改的作品本身必须是一个软体函数库。 - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. + b) 必须在修改过的档案中附有明确的说明:您修改了此一档案及任何修改的日期。 - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. + c) 您必须让整个作品允许第三方在此许可证条款下可以免费使用。 - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. + d)果修改过的函数库其某个设备使用到了「使用本函数库的应用程式」所提供的函数或资料表格,却不是当此设备被呼叫时以参数列传入时,则您必须确实做到,当应用程式不提供这样的函数或表格时,则此设备依旧能工作,且其执行的任何目的仍然有意义。 - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) + (例如,一个函数库的函数用来计算平方根,其目的是有完整的定义且与应用程式是无关的。因此, 2d 小节要求任何本函数会使用的,由应用程式所提供的函数或表格必须是选择性的:如果应用程式不提供的话,则计算平方根的函数必须依旧能计算平方根) -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. +这些要求适用于整个修改过的作品。如果能够确定作品的一部分并非本函数库的衍生产品,且可以合理地单独考虑并将它与原作品分开的话,则当您将它作为独立的作品发布时,它不受此许可证和其条款的约束。但是当您将这部分与基于本函数库的作品一同发布时,则整个套件将受到本许可证条款约束,其对于其他许可证持有人的使用范围扩大到整个产品,也就是套件的每个部分,不管它是谁写的。 -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. +因此,本条款的意图不在于索取权利,或剥夺完全由您完成的作品的权利,而是履行权利来控制基于本函数库的集体作品或衍生作品的发布。 -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. +此外,将与本函数库无关的作品和本函数库 (或基于本函数库的作品) 一起放在贮存媒体或发布媒体的同一卷上,并不导致将其他作品置于此许可证的约束范围之内。 - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. + 3.于一个函数库的副本,您可以选择性地使用原来的 GNU 通用公共许可证上的条款来取代本许可证上的条款。如果您要这么做,您必须修改所有的参考到本许可证的注意事项,使它们指向原来的 GNU 通用公共许可证,第二版,以取代本许可证(如果有比第二版的原来的 GNU 通用公共许可证更新的版本出现的话,则如果您愿意的话可以特别指明使用新版)。请不要对这些注意事项做出其他的改变。 - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. + 一旦在一个副本上做了这样的改变,则该副本就无法撤回这样的改变,故原来的 GNU 通用公共许可证将适用于所有后续的副本以及由此副本衍生出来的作品。 - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. + 此一选择性适用于当您想要将一部分的函数库原始码复制到一个非函数库的程式使用时。 - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. + 4. 您可以以目标码或可执行形式复制或发布本函数库 (或符合第 2 款,基于本函数库的作品),只要您遵守前面的第 1、2 款,并同时提供完整的相关机器可读的原始码,而这些原始码必须在前面的第 1 与第 2 款条件下,在一般习惯上用来做软体交换的媒体上发布。 - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. + 如果所发布的目标码是由指定的地点提供拷贝索取,那么由同一地点所提供等价的原始码拷贝索取可以算作原始码的发布,即使第三方不强求与目标码一起复制原始码。 - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. + 5. 一个程式若包含不经任何部分修改的函数库,但却是设计经由编译或连结的方式与本函数库一同工作者,称之为 "使用函数库的作品"。这样的一个作品,严格地说,并非本函数库的衍生作品,因而不在本许可证的范围之内。 - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. + 然而,将 "使用函数库的作品" 与本函数库连结而产生可执行程式,则是本函数库的衍生品 (因为它包函了本函数库的一部分),而不是 "使用函数库的作品",因此其可执行程式包含在本许可证的范围内。第 6 款说明了发布此可执行程式的条款。 - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. + 当 "使用函数库的作品" 使用了函数库部分的标头档内容时,则此作品即使其原始码不属于本函数库的衍生品,但其目标码仍然是。这一点是否为真特别在是否本作品可以在不需要本函数库即可连结,或者是否该作品本身也是一个函数库时特别明显。 - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) + 如果这样的目标档只使用数字参数、资料结构层级与附属品、以及小巨集和小内□式 (小于或等于十行) ,则此目标档的使用是不受限的,不论是否它是合法的衍生作品。 (但可执行程式若包函此目标档以及一部分的函数库,仍然将在第 6 款的规定下) - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. + 否则的话,如果本作品是本函数库的衍生品,您必须在第 6 款的规定下发布该作品的目标码。任何包含该作品的可执行程式也在第 6 款的范围内,不论它们是否直接与本函数库连结。 - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. + 6. 做为上述条款的例外情况,您也可以将 "使用函数库的作品" 与本函数库结合或连结,以产生包含部分本函数库的作品,并在允许使用者自身使用时可以修改该作品,以及在对修改进行反组译除错的情况下,您可以依照您的选择发布该作品。 - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: + 您必须在每个作品的副本突显出如下的注意事项:本函数库在作品中被使用,以及本函数库以及它的使用是在本许可证的规定下。您必须提供本许可证的副本。如果该作品在执行时显示版权声明,您必须在其中包含本函数库的版权声明,以及指引使用者取得本许可证的副本。同时,您必须做到以下其中一件事: - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) + a) 必须将完整的机器可读的函数库原始码包含在该作品中,包括任何该作品使用到的改变 (这些改变必须在前述第 1 与第 2 款的要求下发布);而且,如果该作品是一个与函数库连结的「完整的、机器可□的 "使用函数库的作品"」,则要有目标码和/或原始码,如此使用者可以修改本函数库且可以重新连结,以产生包函修改过的函数库的修改过的可执行程式。 (理所当然的若使用者修改了函数库的档案定义内容时,则该作品不必然可以重新编译以使用修改过的定义。) - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. + b) 在与函数库连结时使用适当的分享函数库连结机制。一个适当的机制是: (1) 在执行时使用已存在于使用者的电脑中的函数库副本,而不是将函数库的函数复制到可执行程式里,以及 (2) 如果使用者安装了一份修改过的函数库,只要修改过的版本在介面上与该作品在编译连结时所用的版本是相容的,则该执行程式可以与修改过的函数库运作良好。 - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. + c) 在该作品内提供书面报价,有效期不少于三年,以提供同样的使用者上述第 6a 款中的内容,费用不得超过该程式发布的实际成本。 - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. + d)如果所发布的作品是由指定的地点提供拷贝索取,则由同一地点提供上述内容的等价拷贝索取。 - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. + e) 确定使用者已经收到该作品的一份复制,或是您已经寄给该使用者一份复制品。 - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. + 对于一个可执行程式,其所需的 "使用函数库的作品" 的形式必须包括任何要从中再产生可执行程式时所需的资料与工具程式。然而,有一个特殊例外,其所发布的内容不需要包括任何一般与「可执行本程式的作业系统」的主要部分 (如编译器、核心等) 一起发布的部分 (不论是原始码或可执行码),除非这些组成部分和可执行作品结合在一起。 - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. + 一个可能情况是,这些要求与其他通常不与作业系统在一起的私有函数库的版权限制相抵触,这样的抵触表示您不能将它们与本函数库一起用于您发布的可执行程式中。 - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: + 7. 您可以将使用本函数库的函数库设备,以及其他不在本许可证范围内的函数库,对等地放入一个单独的函数库中,并在基于本函数库的作品以及其他函数库在其他状态下同意可以个别发布,以及您做到以下两点的情况下,您可以发布此结合的函数库: - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. + a) 将基于本函数库的作品单独不与其他函数库设备结合地,与此结合的函数库一同发布。该作品必须在上述条款的规定下发布。 - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. + b) 在此结合的函数库中明显地指出其中一部分的作品是基于本函数库,并且说明那里可以找到同样不具结合形式的作品。 - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. + 8. 非您明确按许可证提出的要求去做,否则您不能复制、修改、转发许可证、与本函数库连结、和发布本函数库。任何试图用其他方式复制、修改、转发许可证、与本函数库连结、和发布本函数库是无效的,而且将自动结束许可证赋予您的权利。然而,对那些从您那里按许可证条款得到副本和权利的人们,只要他们继续全面履行条款,许可证赋予他们的权利仍然有效。 - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. + 9. 您没有在许可证上签字,因而您没有必要一定接受此一许可证。然而,没有任何其他东西赋予您修改和发布本函数库及其衍生作品的权利。如果您不接受许可证,这些行为是法律禁止的。因此,如果您修改或发布函数库 (或任何基于函数库的作品) ,您就表明您接受这一许可证以及它的所有有关复制、发布和修改本函数库或基于它的作品的条款和条件。 - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. + 10. 每当您重新发布函数库 (或任何基于函数库的作品) 时,接受者自动从原始许可证颁发者那里接到受这些条款和条件支配的复制、发布、连结或修改本函数库的许可。您不可以强迫接受者履行除了这里赋予他们的权利之外的其他限制。您也没有强求第三方履行许可证条款的义务。 - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. + 11. 如果由于法院判决或违反专利的指控或任何其他原因 (不限于专利问题) 的结果,使得强加于您的条件 (不管是法院判决,协议书或其他) 和许可证的条件有冲突时,他们也不能令您背离许可证的条款。在您不能同时满足本许可证规定的义务及其他相关的义务来发布函数库时,则结果您只能够根本不发布函数库。例如,如果某一专利许可证不允许所有直接或间接从您那里接受副本的人们,在不付专利费的情况下重新发布函数库,唯一能同时满足两方面要求的办法是停止发布函数库。 -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +如果本条款的任何部分在特定的环境下无效或无法实施,就使用条款的其余部分,并将这部分条款作为整体用于其他环境。 -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. +本条款的目的不在于引诱您侵犯专利或其他财产权的要求,或争论这种要求的有效性。本条款的主要目的在于保护自由软体发布系统的完整性。它是通过公共许可证的应用来实现的。许多人已依赖同是出自此系统的应用程式,经由此系统发布大量自由软体而做出慷慨的供献。作者/捐献者有权决定他/她是否通过任何其他系统发布软体,许可证持有人不能强加这种选择。 -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. +本节的目的在于明确说明许可证其余部分可能产生的结果。 - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. + 12.如果由于专利或者由于有版权的介面问题使函数库在某些国家的发布和使用受到限制,则在许可证约束下的原始版权拥有者可以增加发布地区的限制条款,将这些国家明确排除在外,并在这些国家以外的地区发布函数库。在这种情况下,许可证套件含的限制条款和许可证正文一样有效。 - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. + 13. 自由软体基金会可能随时出版较宽松通用公共许可证的修改版或新版。新版和当前的版本在原则上保持一致,但在提到新问题时或有关事项时,在细节上可能出现差别。 -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. +每一版本都有不同的版本号。如果函数库指定可适用的许可证版本号以及 "任何更新的版本" ,您有权选择遵循指定的版本或自由软体基金会以后出版的新版本。如果函数库未指定许可证版本,您可选择自由软体基金会已经出版的任何版本。 - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. + 14. 如果您愿意将函数库的一部分结合到其他自由程式中,而它们的发布条件不同,请写信给作者,要求准予使用。如果是自由软体基金会加以版权保护的软体,写信给自由软体基金会,我们有时会作为例外的情况处理。我们的决定受两个主要目标的指导,这两个主要目标是:我们的自由软体的衍生作品继续保持自由状态,以及从整体上促进软体的共享和重复利用。 - NO WARRANTY + 没有担保 - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 15. 由于函数库准予免费使用,在适用法准许的范围内,对函数库没有担保。除非另有书面说明,版权所有者和/或其他提供函数库的人们 "一样" 不提供任何类型的担保,不论是明确的,还是隐含的,包括但不限于可销售和适合特定用途的隐含保证。全部的风险,如函数库的质量和性能问题都由您来承担。如果函数库出现缺陷,您应当承担所有必要的服务、修复和改正的费用。 - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. + 16.非适用法或书面协议的要求,在任何情况下,任何版权所有者或任何按许可证条款修改和发布函数库的人们都不对您的损失负有任何责任。包括由于使用或不能使用函数库引起的任何一般的、特殊的、偶然发生的或重大的损失 (包括但不限于数据的损失,或者数据变得不精确,或者您或第三方的持续的损失,或者函数库不能和其他软体协调运行等) 。即使版权所有者和其他人提到这种损失的可能性也不例外。 - END OF TERMS AND CONDITIONS + -条文结束- EndOfLicense; + $lang->install_condition_title = "检测运行环境"; $lang->install_checklist_title = array( 'php_version' => 'PHP版本', - 'permission' => '属性', + 'permission' => '权限', 'xml' => 'XML库', 'iconv' => 'ICONV库', 'gd' => 'GD库', @@ -547,5 +240,5 @@ EndOfLicense; $lang->msg_install_completed = "安装完成。\n非常感谢。"; $lang->msg_install_failed = "生成安装文件时发生错误。"; - $lang->ftp_get_list = "Get List"; + $lang->ftp_get_list = '载入FTP列表'; ?> diff --git a/modules/layout/conf/module.xml b/modules/layout/conf/module.xml index 445f5d725..cb4ad7377 100644 --- a/modules/layout/conf/module.xml +++ b/modules/layout/conf/module.xml @@ -14,6 +14,9 @@ + + + diff --git a/modules/layout/lang/en.lang.php b/modules/layout/lang/en.lang.php index 53c8f0c00..3460a18c3 100644 --- a/modules/layout/lang/en.lang.php +++ b/modules/layout/lang/en.lang.php @@ -110,4 +110,9 @@ 'attribute' => 'You can set background color/image to every area except widget, and font color(include tag).', ); + + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/es.lang.php b/modules/layout/lang/es.lang.php index 311da99cf..0e5b05e1a 100644 --- a/modules/layout/lang/es.lang.php +++ b/modules/layout/lang/es.lang.php @@ -109,4 +109,8 @@ 'attribute' => '위젯을 제외한 각 영역들은 모두 배경 색/ 이미지를 지정할 수 있고 글자색(a 태그 포함됨)을 정할 수 있습니다.', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/fr.lang.php b/modules/layout/lang/fr.lang.php index 8671c98dc..d59025224 100644 --- a/modules/layout/lang/fr.lang.php +++ b/modules/layout/lang/fr.lang.php @@ -109,4 +109,8 @@ 'attribute' => '위젯을 제외한 각 영역들은 모두 배경 색/ 이미지를 지정할 수 있고 글자색(a 태그 포함됨)을 정할 수 있습니다.', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/jp.lang.php b/modules/layout/lang/jp.lang.php index 0a4db3d45..9f2edf56d 100644 --- a/modules/layout/lang/jp.lang.php +++ b/modules/layout/lang/jp.lang.php @@ -110,4 +110,8 @@ 'attribute' => 'ウィジェットを除いた各領域はすべて背景の色・イメージ・文字のテキスト色(「a」タグを含む)の指定が可能です。', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/ko.lang.php b/modules/layout/lang/ko.lang.php index a47bc3d5d..bc21a77d4 100644 --- a/modules/layout/lang/ko.lang.php +++ b/modules/layout/lang/ko.lang.php @@ -110,4 +110,10 @@ 'attribute' => '위젯을 제외한 각 영역들은 모두 배경 색/ 이미지를 지정할 수 있고 글자색(a 태그 포함됨)을 정할 수 있습니다.', ); + + $lang->mobile_layout_list = "모바일 레이아웃 목록"; + $lang->mobile_downloaded_list = "모바일 다운로드 목록"; + $lang->apply_mobile_view = "모바일 뷰 일괄 적용"; + $lang->about_apply_mobile_view = "체크하시면 연결된 모든 메뉴에서 모바일 뷰를 사용합니다."; + ?> diff --git a/modules/layout/lang/ru.lang.php b/modules/layout/lang/ru.lang.php index 0b06297a1..a0e1d2133 100644 --- a/modules/layout/lang/ru.lang.php +++ b/modules/layout/lang/ru.lang.php @@ -110,4 +110,8 @@ 'attribute' => 'You can set background color/image to every area except widget, and font color(include tag).', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/vi.lang.php b/modules/layout/lang/vi.lang.php index 833b44282..55bfda8be 100644 --- a/modules/layout/lang/vi.lang.php +++ b/modules/layout/lang/vi.lang.php @@ -112,4 +112,8 @@ 'attribute' => 'Bạn có thể đặt màu nền / hình nền tới mọi khu vực trừ Widget, và màu chữ (bao gồm cả Tag).', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/lang/zh-CN.lang.php b/modules/layout/lang/zh-CN.lang.php index 92251592f..846eb8ad1 100644 --- a/modules/layout/lang/zh-CN.lang.php +++ b/modules/layout/lang/zh-CN.lang.php @@ -23,7 +23,7 @@ $lang->about_downloaded_layouts = "已下载的布局目录"; $lang->about_title = '请输入连接模块时容易区分的标题。'; - $lang->about_not_apply_menu = '更新所有被连接到菜单的模块布局。'; + $lang->about_not_apply_menu = '勾选表示连接到此布局的菜单项全部采用此布局。'; $lang->about_layout = "布局模块使网站制作变得更简单。
    通过布局设置及菜单的链接,可以轻松制作以多种模块组成的完整网站。
    - 无法删除和修改的布局可能是博客或其他模块自带的模板,因此应到相关模块进行设置。"; $lang->about_layout_code = @@ -110,4 +110,8 @@ 'attribute' => '除控件之外的各个区域都可以对其指定背景色/背景图片及字体颜色(包括a标签)。', ); + $lang->mobile_layout_list = "移动版布局目录"; + $lang->mobile_downloaded_list = "移动版布局下载目录"; + $lang->apply_mobile_view = "移动版布局共享"; + $lang->about_apply_mobile_view = "勾选表示连接到此布局的所有菜单项全部采用此移动版布局。"; ?> diff --git a/modules/layout/lang/zh-TW.lang.php b/modules/layout/lang/zh-TW.lang.php index d847b1727..37047c022 100644 --- a/modules/layout/lang/zh-TW.lang.php +++ b/modules/layout/lang/zh-TW.lang.php @@ -110,4 +110,8 @@ 'attribute' => '除了Widget以外的各個區域都可以指定背景顏色/圖片及文字顏色(包含a標籤)。', ); + $lang->mobile_layout_list = "Mobile Layout List"; + $lang->mobile_downloaded_list = "Downloaded Mobile Layouts"; + $lang->apply_mobile_view = "Apply Mobile View"; + $lang->about_apply_mobile_view = "All connected module use mobile view to display when accessing with mobile device."; ?> diff --git a/modules/layout/layout.admin.controller.php b/modules/layout/layout.admin.controller.php index 4fd92bae9..2cdc577ba 100644 --- a/modules/layout/layout.admin.controller.php +++ b/modules/layout/layout.admin.controller.php @@ -24,6 +24,8 @@ $args->layout_srl = getNextSequence(); $args->layout = Context::get('layout'); $args->title = Context::get('title'); + $args->layout_type = Context::get('layout_type'); + if(!$args->layout_type) $args->layout_type = "P"; // DB 입력 $output = $this->insertLayout($args); @@ -68,6 +70,7 @@ unset($extra_vars->layout); unset($extra_vars->title); unset($extra_vars->apply_layout); + unset($extra_vars->apply_mobile_view); $args = Context::gets('layout_srl','title'); @@ -85,7 +88,10 @@ $menu_srl_list[] = $menu_srl; $menu_name_list[$menu_srl] = $output->title; - if(Context::get('apply_layout')=='Y') { + $apply_layout = Context::get('apply_layout'); + $apply_mobile_view = Context::get('apply_mobile_view'); + + if($apply_layout=='Y' || $apply_mobile_view=='Y') { $menu_args = null; $menu_args->menu_srl = $menu_srl; $menu_args->site_srl = $layout_info->site_srl; @@ -98,8 +104,21 @@ if(count($modules)) { $update_args->module_srls = implode(',',$modules); - $update_args->layout_srl = $args->layout_srl; - $output = executeQuery('layout.updateModuleLayout', $update_args); + if($apply_layout == "Y") { + $update_args->layout_srl = $args->layout_srl; + } + if($layout_info->layout_type == "M") + { + if(Context::get('apply_mobile_view') == "Y") + { + $update_args->use_mobile = "Y"; + } + $output = executeQuery('layout.updateModuleMLayout', $update_args); + } + else + { + $output = executeQuery('layout.updateModuleLayout', $update_args); + } } } } diff --git a/modules/layout/layout.admin.view.php b/modules/layout/layout.admin.view.php index fa1e82c31..4acc3b52e 100644 --- a/modules/layout/layout.admin.view.php +++ b/modules/layout/layout.admin.view.php @@ -25,6 +25,15 @@ $this->setTemplateFile('index'); } + function dispLayoutAdminMobileContent() { + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getLayoutList(0, "M"); + Context::set('layout_list', $layout_list); + + $this->setTemplateFile('mindex'); + + } + /** * @brief 레이아웃 등록 페이지 * 1차적으로 레이아웃만 선택한 후 DB 에 빈 값을 넣고 그 후 상세 값 설정하는 단계를 거침 @@ -32,7 +41,8 @@ function dispLayoutAdminInsert() { // 레이아웃 목록을 세팅 $oLayoutModel = &getModel('layout'); - $layout_list = $oLayoutModel->getDownloadedLayoutList(); + $layout_type = Context::get('layout_type'); + $layout_list = $oLayoutModel->getDownloadedLayoutList($layout_type); Context::set('layout_list', $layout_list); $this->setTemplateFile('insert_layout'); @@ -128,6 +138,15 @@ $this->setTemplateFile('downloaded_layout_list'); } + function dispLayoutAdminDownloadedMobileList() { + // 레이아웃 목록을 세팅 + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getDownloadedLayoutList(0, "M"); + Context::set('layout_list', $layout_list); + + $this->setTemplateFile('downloaded_mlayout_list'); + } + /** * @brief 레이아웃 미리 보기 **/ diff --git a/modules/layout/layout.class.php b/modules/layout/layout.class.php index 1e9a808ce..c7659b91d 100644 --- a/modules/layout/layout.class.php +++ b/modules/layout/layout.class.php @@ -33,6 +33,8 @@ if(preg_match('/([0-9]+)\.html/i',$filename)) return true; } + if(!$oDB->isColumnExists('layouts', 'layout_type')) return true; + return false; } @@ -61,6 +63,10 @@ @unlink('./files/cache/layout/'.$filename); } + if(!$oDB->isColumnExists('layouts', 'layout_type')) { + $oDB->addColumn('layouts','layout_type','char',1,'P',true); + } + return new Object(0, 'success_updated'); } diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 9508018e0..2630720ce 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -19,12 +19,13 @@ * @brief DB 에 생성된 레이아웃의 목록을 구함 * 생성되었다는 것은 DB에 등록이 되었다는 것을 의미 **/ - function getLayoutList($site_srl = 0) { + function getLayoutList($site_srl = 0, $layout_type="P") { if(!$site_srl) { $site_module_info = Context::get('site_module_info'); $site_srl = (int)$site_module_info->site_srl; } $args->site_srl = $site_srl; + $args->layout_type = $layout_type; $output = executeQuery('layout.getLayoutList', $args); if(!$output->data) return; if(is_array($output->data)) return $output->data; @@ -42,17 +43,21 @@ if(!$output->data) return; // layout, extra_vars를 정리한 후 xml 파일 정보를 정리해서 return - $layout_info = $this->getLayoutInfo($layout, $output->data); + $layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type); return $layout_info; } /** * @brief 레이아웃의 경로를 구함 **/ - function getLayoutPath($layout_name) { + function getLayoutPath($layout_name, $layout_type = "P") { if($layout_name == 'faceoff'){ $class_path = './modules/layout/faceoff/'; - }else{ + }else if($layout_type == "M") { + $class_path = sprintf("./m.layouts/%s/", $layout_name); + } + else + { $class_path = sprintf('./layouts/%s/', $layout_name); } if(is_dir($class_path)) return $class_path; @@ -63,9 +68,18 @@ * @brief 레이아웃의 종류와 정보를 구함 * 다운로드되어 있는 레이아웃의 종류 (생성과 다른 의미) **/ - function getDownloadedLayoutList() { + function getDownloadedLayoutList($layout_type = "P") { // 다운받은 레이아웃과 설치된 레이아웃의 목록을 구함 - $searched_list = FileHandler::readDir('./layouts'); + if($layout_type == "M") + { + $directory = "./m.layouts"; + } + else + { + $directory = "./layouts"; + } + + $searched_list = FileHandler::readDir($directory); $searched_count = count($searched_list); if(!$searched_count) return; @@ -75,7 +89,7 @@ $layout = $searched_list[$i]; // 해당 레이아웃의 정보를 구함 - $layout_info = $this->getLayoutInfo($layout); + $layout_info = $this->getLayoutInfo($layout, null, $layout_type); $list[] = $layout_info; } @@ -86,7 +100,7 @@ * @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함 * 이것 역시 캐싱을 통해서 xml parsing 시간을 줄인다.. **/ - function getLayoutInfo($layout, $info = null) { + function getLayoutInfo($layout, $info = null, $layout_type = "P") { if($info) { $layout_title = $info->title; $layout = $info->layout; @@ -101,7 +115,7 @@ } // 요청된 모듈의 경로를 구한다. 없으면 return - if(!$layout_path) $layout_path = $this->getLayoutPath($layout); + if(!$layout_path) $layout_path = $this->getLayoutPath($layout, $layout_type); if(!is_dir($layout_path)) return; // 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음 @@ -110,6 +124,8 @@ $layout_info->layout = $layout; $layout_info->path = $layout_path; $layout_info->layout_title = $layout_title; + if(!$layout_info->layout_type) + $layout_info->layout_type = $layout_type; return $layout_info; } @@ -119,7 +135,6 @@ }else{ $cache_file = $this->getUserLayoutCache($layout_srl, Context::getLangType()); } - if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file)) { @include($cache_file); @@ -160,6 +175,7 @@ $buff .= sprintf('$layout_info->layout_title = $layout_title;'); $buff .= sprintf('$layout_info->license = "%s";', $xml_obj->license->body); $buff .= sprintf('$layout_info->license_link = "%s";', $xml_obj->license->attrs->link); + $buff .= sprintf('$layout_info->layout_type = "%s";', $layout_type); // 작성자 정보 if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author; diff --git a/modules/layout/queries/getLayoutList.xml b/modules/layout/queries/getLayoutList.xml index 97d8d161a..047a476b4 100644 --- a/modules/layout/queries/getLayoutList.xml +++ b/modules/layout/queries/getLayoutList.xml @@ -7,6 +7,7 @@ + diff --git a/modules/layout/queries/insertLayout.xml b/modules/layout/queries/insertLayout.xml index b4c983a97..20a229beb 100644 --- a/modules/layout/queries/insertLayout.xml +++ b/modules/layout/queries/insertLayout.xml @@ -10,5 +10,6 @@ + diff --git a/modules/layout/queries/updateModuleMLayout.xml b/modules/layout/queries/updateModuleMLayout.xml new file mode 100644 index 000000000..85665e1d9 --- /dev/null +++ b/modules/layout/queries/updateModuleMLayout.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/modules/layout/schemas/layouts.xml b/modules/layout/schemas/layouts.xml index 3b2ebc12b..1e6be0121 100644 --- a/modules/layout/schemas/layouts.xml +++ b/modules/layout/schemas/layouts.xml @@ -7,4 +7,5 @@ +
    diff --git a/modules/layout/tpl/downloaded_mlayout_list.html b/modules/layout/tpl/downloaded_mlayout_list.html new file mode 100644 index 000000000..878070d19 --- /dev/null +++ b/modules/layout/tpl/downloaded_mlayout_list.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang->layout_name}
    {$lang->version}
    {$lang->author}
    {$lang->menu_count}
    {$lang->date}
    {$lang->path}
    {$lang->cmd_make}
    +
    + {$val->title}
    + ({$val->layout}) +
    +
    {$val->version} + + {$author->name} + + {$val->menu_count}{zdate($val->date, 'Y-m-d')}{$val->path}{$lang->cmd_make}
    + {nl2br(trim($val->description))} +
    {$val->layout}{$val->path}{$lang->cmd_make}
    diff --git a/modules/layout/tpl/filter/insert_layout.xml b/modules/layout/tpl/filter/insert_layout.xml index 9b5b52c1a..01f5035cd 100644 --- a/modules/layout/tpl/filter/insert_layout.xml +++ b/modules/layout/tpl/filter/insert_layout.xml @@ -5,6 +5,7 @@ + diff --git a/modules/layout/tpl/header.html b/modules/layout/tpl/header.html index a8013c439..ae908cba0 100644 --- a/modules/layout/tpl/header.html +++ b/modules/layout/tpl/header.html @@ -8,8 +8,10 @@
    diff --git a/modules/layout/tpl/insert_layout.html b/modules/layout/tpl/insert_layout.html index 2e8097c33..e3ed8e83a 100644 --- a/modules/layout/tpl/insert_layout.html +++ b/modules/layout/tpl/insert_layout.html @@ -3,6 +3,7 @@ + diff --git a/modules/layout/tpl/layout_modify.html b/modules/layout/tpl/layout_modify.html index 5c09294f5..f612ea77c 100644 --- a/modules/layout/tpl/layout_modify.html +++ b/modules/layout/tpl/layout_modify.html @@ -3,7 +3,6 @@

    {$selected_layout->layout_title}

    -
    + + + + + + +
    {$lang->apply_mobile_view}
    + + {$lang->about_apply_mobile_view} +
    diff --git a/modules/layout/tpl/mindex.html b/modules/layout/tpl/mindex.html new file mode 100644 index 000000000..fe2d64b86 --- /dev/null +++ b/modules/layout/tpl/mindex.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang->no}
    {$lang->layout}
    {$lang->title}
    {$lang->regdate}
     
    {$no+1} + {$val->layout} + + (module) + + {htmlspecialchars($val->title)}{zdate($val->regdate,"Y-m-d")} + + {$lang->cmd_layout_management} + +   + + {$lang->cmd_layout_edit}{$lang->cmd_delete}
    + {$lang->cmd_make} +
    diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 8d404a624..6c5dabe31 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -17,6 +17,7 @@ * @brief 사용자 추가 (관리자용) **/ function procMemberAdminInsert() { + if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request"); // 필수 정보들을 미리 추출 $args = Context::gets('member_srl','user_id','user_name','nick_name','homepage','blog','birthday','email_address','password','allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date'); diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 607b2168d..97498a193 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -36,6 +36,12 @@ $config = $oModuleModel->getModuleConfig('member'); if($config->after_login_url) $this->setRedirectUrl($config->after_login_url); + $redirect_url = Context::get('redirect_url'); + if($output->toBool() && Context::getRequestMethod() == "POST" && $redirect_url) + { + header("location:" . $redirect_url); + } + return $output; } @@ -505,6 +511,7 @@ * @brief 회원 가입 **/ function procMemberInsert() { + if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request"); $oMemberModel = &getModel('member'); $config = $oMemberModel->getMemberConfig(); diff --git a/modules/member/member.mobile.php b/modules/member/member.mobile.php new file mode 100644 index 000000000..2a441e66b --- /dev/null +++ b/modules/member/member.mobile.php @@ -0,0 +1,24 @@ +setTemplatePath($this->module_path.'tpl'); + } + + function dispMemberLoginForm() { + if(Context::get('is_logged')) { + Context::set('redirect_url', getUrl('act','')); + $this->setTemplatePath($this->module_path.'tpl'); + $this->setTemplateFile('redirect.html'); + return; + } + + // 템플릿 파일 지정 + + Context::set('referer_url', $_SERVER['HTTP_REFERER']); + $this->setTemplateFile('login_form'); + } +} +?> diff --git a/modules/member/tpl/css/mlogin.css b/modules/member/tpl/css/mlogin.css new file mode 100644 index 000000000..4c5fec05c --- /dev/null +++ b/modules/member/tpl/css/mlogin.css @@ -0,0 +1,33 @@ +/* Mobile XE */ +body{margin:0;background:#fff;color:#000;word-wrap:break-word} +body,input,textarea,select,button,table{font-family:Tahoma, Geneva, sans-serif} +form{margin:0;padding:0} +form ul{margin:0;padding:0;list-style:none} +form li{margin:0 0 10px 0;padding:0 0 10px 0;border-bottom:1px dashed #999} +form li:last-child{border:0} +form p{margin:0} +form p.help{color:#666} +fieldset{border:0;margin:0;padding:0} +input,textarea,select{font-size:16px} +button{font-size:12px;cursor:pointer;background:#eee;border:1px solid #666;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;overflow:visible;padding:3px;text-shadow:1px 1px 0 #fff;box-shadow:0 0 2px #666;-moz-box-shadow:0 0 2px #666;-webkit-box-shadow:0 0 2px #666;text-decoration:none;font-weight:normal} +select{width:90%} +/* Common Class */ +.al{text-align:left} +.db{display:block} +.fb{font-weight:bold} +.itx{border:1px solid #ccc;width:90%;font-size:20px;height:30px;padding:5px 10px} +.sn{margin:10px;*zoom:1} +.sn:after{content:"";display:block;clear:both} +/* Body */ +.bd{position:relative;overflow:hidden;clear:both} +.bd .h2{font-size:20px;background:#ccc;border:1px solid #aaa} +.bd .h3{font-size:16px;background:#eee;border:1px solid #ccc} +.bd .h2,.bd .h3{position:relative;margin:-1px 0;padding:10px;border:1px solid #aaa;border-left:0;border-right:0;text-shadow:1px 1px #fff} +.bd .h2 em,.bd .h3 em{font-weight:normal;color:#f60;font-size:12px} +.bd .h2 a,.bd .h3 a{color:#000} +.bd .h2 .bn{position:absolute;top:8px;right:10px;font-size:12px;margin:0} +/* Context */ +.cm{margin:0;padding:10px;background:#777;color:#fff;text-align:center;list-style:none;border-top:1px solid #555;*zoom:1} +.cm:after{content:"";display:block;clear:both} +.cm .fl{margin:0 5px 0 0} +.cm .fr{margin:0 0 0 5px} diff --git a/modules/member/tpl/login_form.html b/modules/member/tpl/login_form.html new file mode 100644 index 000000000..52912e990 --- /dev/null +++ b/modules/member/tpl/login_form.html @@ -0,0 +1,16 @@ + +
    +

    {$lang->cmd_login}

    +
    + + + +
      +
    • +
    • +
    +
    +
    +
    +
    +
    diff --git a/modules/menu/conf/module.xml b/modules/menu/conf/module.xml index c940f7f52..f9311eb0f 100644 --- a/modules/menu/conf/module.xml +++ b/modules/menu/conf/module.xml @@ -20,5 +20,7 @@ + + diff --git a/modules/menu/menu.mobile.php b/modules/menu/menu.mobile.php new file mode 100644 index 000000000..17be5375a --- /dev/null +++ b/modules/menu/menu.mobile.php @@ -0,0 +1,37 @@ +href = $menu_item['href']; + $obj->depth = $depth; + $obj->link = $menu_item['link']; + $this->result[] = $obj; + if(!$menu_item['list']) return; + foreach($menu_item['list'] as $item) + { + $this->straightenMenu($item, $depth+1); + } + } + + function dispMenuMenu() { + $menu_srl = Context::get('menu_srl'); + $oAdminModel =& getAdminModel('menu'); + $menu_info = $oAdminModel->getMenu($menu_srl); + if(file_exists($menu_info->php_file)) @include($menu_info->php_file); + foreach($menu->list as $menu_item) + { + $this->straightenMenu($menu_item, 0); + } + + Context::set('menu', $this->result); + + $this->setTemplatePath(sprintf("%stpl/",$this->module_path)); + $this->setTemplateFile('menu.html'); + + } +} +?> diff --git a/modules/menu/tpl/css/mmenu.css b/modules/menu/tpl/css/mmenu.css new file mode 100644 index 000000000..2f52eb5d8 --- /dev/null +++ b/modules/menu/tpl/css/mmenu.css @@ -0,0 +1,11 @@ +/* Body */ +.bd{position:relative;overflow:hidden;clear:both} +/* GNB */ +.gn,.gn ul{margin:0;padding:0;list-style:none} +.gn li{margin:-1px 0;border:1px solid #999;border-left:0;border-right:0;vertical-align:top} +.gn li a{display:block;text-decoration:none;height:45px;line-height:45px;padding:0 10px;color:#000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} +.gn li a em{font-weight:normal;color:#f60;font-size:12px} +.gn li a:visited{color:#666} +.gn li li a{padding:0 10px 0 20px} +.gn li li li a{padding:0 10px 0 30px} +.gn li li li li a{padding:0 10px 0 50px} diff --git a/modules/menu/tpl/menu.html b/modules/menu/tpl/menu.html new file mode 100644 index 000000000..6a5bff6d3 --- /dev/null +++ b/modules/menu/tpl/menu.html @@ -0,0 +1,30 @@ + +
    +
      + {@ $start = true } + {@ $depth = 0 } + + + + + +
        + + + +
      + {@ $depth -= 1} + + +
    • » {$val->link} + {@ $start = false } + {@ $depth = $val->depth } + + +
    • +
    + {@ $depth -= 1} + + + +
    diff --git a/modules/module/conf/module.xml b/modules/module/conf/module.xml index c41689d70..94ff1e4a1 100644 --- a/modules/module/conf/module.xml +++ b/modules/module/conf/module.xml @@ -37,5 +37,7 @@ + + diff --git a/modules/module/module.class.php b/modules/module/module.class.php index dbfa17c25..a2a628c0b 100644 --- a/modules/module/module.class.php +++ b/modules/module/module.class.php @@ -74,6 +74,11 @@ if($oDB->isIndexExists('sites', 'idx_domain')) return true; if(!$oDB->isIndexExists('sites','unique_domain')) return true; + if(!$oDB->isColumnExists("modules", "use_mobile")) return true; + if(!$oDB->isColumnExists("modules", "mlayout_srl")) return true; + if(!$oDB->isColumnExists("modules", "mcontent")) return true; + if(!$oDB->isColumnExists("modules", "mskin")) return true; + return false; } @@ -298,6 +303,19 @@ $oDB->addIndex('sites','unique_domain',array('domain'),true); } + if(!$oDB->isColumnExists("modules", "use_mobile")) { + $oDB->addColumn('modules','use_mobile','char',1,'N'); + } + if(!$oDB->isColumnExists("modules", "mlayout_srl")) { + $oDB->addColumn('modules','mlayout_srl','number',11, 0); + } + if(!$oDB->isColumnExists("modules", "mcontent")) { + $oDB->addColumn('modules','mcontent','bigtext'); + } + if(!$oDB->isColumnExists("modules", "mskin")) { + $oDB->addColumn('modules','mskin','varchar',250); + } + return new Object(0, 'success_updated'); } diff --git a/modules/module/module.controller.php b/modules/module/module.controller.php index fcea72e66..408b85adf 100644 --- a/modules/module/module.controller.php +++ b/modules/module/module.controller.php @@ -164,14 +164,18 @@ unset($extra_vars->module); unset($extra_vars->module_category_srl); unset($extra_vars->layout_srl); + unset($extra_vars->mlayout_srl); + unset($extra_vars->use_mobile); unset($extra_vars->menu_srl); unset($extra_vars->site_srl); unset($extra_vars->mid); unset($extra_vars->skin); + unset($extra_vars->mskin); unset($extra_vars->browser_title); unset($extra_vars->description); unset($extra_vars->is_default); unset($extra_vars->content); + unset($extra_vars->mcontent); unset($extra_vars->open_rss); unset($extra_vars->header_text); unset($extra_vars->footer_text); diff --git a/modules/module/module.mobile.php b/modules/module/module.mobile.php new file mode 100644 index 000000000..64e361f2a --- /dev/null +++ b/modules/module/module.mobile.php @@ -0,0 +1,10 @@ +setTemplatePath(sprintf("%stpl/",$this->module_path)); + $this->setTemplateFile('lang.html'); + } +} + +?> diff --git a/modules/module/module.model.php b/modules/module/module.model.php index fe3d7a758..7218da92f 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -264,9 +264,11 @@ /** * @brief act 값에 의한 forward 값을 구함 **/ - function getActionForward($act) { + function getActionForward($act, $module = "") { $args->act = $act; - $output = executeQuery('module.getActionForward',$args); + $args->module = ($module)?$module:null; + if (strlen ($args->module) > 0) $output = executeQuery ('module.getActionForwardWithModule', $args); + else $output = executeQuery('module.getActionForward',$args); return $output->data; } diff --git a/modules/module/queries/getActionForwardWithModule.xml b/modules/module/queries/getActionForwardWithModule.xml new file mode 100644 index 000000000..008f4a6d3 --- /dev/null +++ b/modules/module/queries/getActionForwardWithModule.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/modules/module/queries/getSiteInfo.xml b/modules/module/queries/getSiteInfo.xml index 15c663ea8..4f7797075 100644 --- a/modules/module/queries/getSiteInfo.xml +++ b/modules/module/queries/getSiteInfo.xml @@ -13,13 +13,17 @@ + + + + diff --git a/modules/module/queries/insertModule.xml b/modules/module/queries/insertModule.xml index 0ef8d8df2..52d781963 100644 --- a/modules/module/queries/insertModule.xml +++ b/modules/module/queries/insertModule.xml @@ -8,10 +8,12 @@ + + @@ -19,5 +21,7 @@ + + diff --git a/modules/module/queries/updateModule.xml b/modules/module/queries/updateModule.xml index 57f52764c..b2d15954e 100644 --- a/modules/module/queries/updateModule.xml +++ b/modules/module/queries/updateModule.xml @@ -7,15 +7,19 @@ + + + + diff --git a/modules/module/schemas/modules.xml b/modules/module/schemas/modules.xml index 943841e42..74e03acec 100644 --- a/modules/module/schemas/modules.xml +++ b/modules/module/schemas/modules.xml @@ -3,14 +3,18 @@ + + + + diff --git a/modules/module/tpl/css/mlang.css b/modules/module/tpl/css/mlang.css new file mode 100644 index 000000000..4c7ce15cf --- /dev/null +++ b/modules/module/tpl/css/mlang.css @@ -0,0 +1,12 @@ +/* Body */ +.bd{position:relative;overflow:hidden;clear:both} +/* GNB */ +.gn,.gn ul{margin:0;padding:0;list-style:none} +.gn li{margin:-1px 0;border:1px solid #999;border-left:0;border-right:0;vertical-align:top} +.gn li a{display:block;text-decoration:none;height:45px;line-height:45px;padding:0 10px;color:#000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} +.gn li strong{display:block;text-decoration:none;height:45px;line-height:45px;padding:0 10px;color:#000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} +.gn li a em{font-weight:normal;color:#f60;font-size:12px} +.gn li a:visited{color:#666} +.gn li li a{padding:0 10px 0 20px} +.gn li li li a{padding:0 10px 0 30px} +.gn li li li li a{padding:0 10px 0 50px} diff --git a/modules/module/tpl/lang.html b/modules/module/tpl/lang.html new file mode 100644 index 000000000..d53522374 --- /dev/null +++ b/modules/module/tpl/lang.html @@ -0,0 +1,12 @@ + +
    +
      + + +
    • {$val}
    • + +
    • {$val}
    • + + +
    +
    diff --git a/modules/opage/lang/en.lang.php b/modules/opage/lang/en.lang.php index e600e73db..38f220996 100644 --- a/modules/opage/lang/en.lang.php +++ b/modules/opage/lang/en.lang.php @@ -12,4 +12,7 @@ $lang->about_opage = "This module enables usage of external html or php files in XE.
    It allows absolute or relative path, and if the url starts with 'http://' , it can display the external page of the server."; $lang->about_opage_path= "Please input the location of external document.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; $lang->about_opage_caching_interval = "The unit is minute, and it displays temporary saved data for assigned time.
    It is recommended to cache for proper time if a lot of resources are needed when displaying other servers' data or information.
    A value of 0 will not cache."; + + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/es.lang.php b/modules/opage/lang/es.lang.php index 88bd461c3..9e2798103 100644 --- a/modules/opage/lang/es.lang.php +++ b/modules/opage/lang/es.lang.php @@ -12,4 +12,6 @@ $lang->about_opage = 'Este modulo permite el uso externo de archivos html o php en XE.
    Permite ruta absoluta o relativa, y si la URL comienza con "http://", se puede mostrar la pagina externa del servidor.'; $lang->about_opage_path= "Por favor ingrese la ubicacion del documento externos.
    Ambos ruta absoluta como '/ path1/path2/sample.php' o ruta relativa como \"../path2/sample.php\" puede ser utilizado.
    Si la via de entrada, como \"http://url/sample.php\", el resultado sera recibido y, a continuacion se muestran.
    Esta es la actual XE ruta absoluta.
    "; $lang->about_opage_caching_interval = "La unidad es minuto, y se muestra temporal de los datos guardados por el tiempo asignado.
    Se recomienda a la cache para una buena vez si una gran cantidad de recursos se necesitan otros servidores cuando se muestran los datos o la informacion.
    Un valor de 0 no cache."; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/fr.lang.php b/modules/opage/lang/fr.lang.php index d1382afa2..e138bf155 100644 --- a/modules/opage/lang/fr.lang.php +++ b/modules/opage/lang/fr.lang.php @@ -12,4 +12,6 @@ $lang->about_opage = "Ce module vous fait pouvoir utiliser des documents extérieurs en html ou en php dans XE.
    Il est possible d'utiliser le chemin absolu ou relatif, et si l'URL commence avec 'http://' , il est possible de représenter des pages extérieurs du serveur."; $lang->about_opage_path= "Entrez la localisation du document extérieur.
    Non seulement le chemin absolu comme '/path1/path2/sample.php' mais aussi le chemin relatif comme '../path2/sample.php' peuvent être utilisés.
    Si vous entrez le chemin comme 'http://url/sample.php', le résultat sera reçu et puis exposé
    Le chemin suivant, c'est le chemin absolu de XE.
    "; $lang->about_opage_caching_interval = "L'unité est minute, et ça exposera des données conservées temporairement pendant le temps assigné.
    Il est recommandé d'utiliser l'antémémoire pendant le temps convenable si beaucoup de ressource est nécessaire pour représenter les données ou l'information d'autre serveur.
    La valeur 0 signifie de ne pas utiliser antémémoire."; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/jp.lang.php b/modules/opage/lang/jp.lang.php index a7bee04ad..b9cdeac72 100644 --- a/modules/opage/lang/jp.lang.php +++ b/modules/opage/lang/jp.lang.php @@ -12,4 +12,6 @@ $lang->about_opage = '外部のHTMLまたはPHPファイルをXE内部で使用出来るようにするモジュールです。
    絶対パス、相対パスで指定出来、「http://」で始まるサーバの外部ページも表示出来ます。'; $lang->about_opage_path= '外部ドキュメントの場所を入力して下さい。
    「/path1/path2/sample.php」のような絶対パス、「../path2/sample.php」のような相対パスが使用出来ます。
    「http://URL/sample.php」のように使用すると結果を読み込んで表示します。
    現在XEがインストールされている絶対パスは次のようになっています。
    '; $lang->about_opage_caching_interval = '分単位で指定出来、設定された時間の間は、臨時保存されたデータを出力します。
    他のサーバの情報を出力したり、データを出力する際、リソースが多く使われるため、数分単位でキャッシングすることをお勧めします。
    「0」に指定するとキャッシングされません。'; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/ko.lang.php b/modules/opage/lang/ko.lang.php index fbd00c440..d9e8b79fe 100644 --- a/modules/opage/lang/ko.lang.php +++ b/modules/opage/lang/ko.lang.php @@ -12,4 +12,7 @@ $lang->about_opage = 'XE가 아닌 외부 HTML 또는 PHP파일을 XE에서 사용할 수 있도록 하는 모듈입니다.
    절대경로, 상대경로를 이용할 수 있으며 http:// 로 시작할 경우 서버 외부의 페이지도 표시할 수 있습니다'; $lang->about_opage_path= '외부문서의 위치를 입력해주세요.
    /path1/path2/sample.php 와 같이 절대경로나 ../path2/sample.php와 같은 상대경로 모두 사용가능합니다.
    http://url/sample.php 와 같이 사용하면 해당 페이지를 웹으로 전송 받아 출력 하게 됩니다.
    현재 XE가 설치된 절대경로는 다음과 같습니다.
    '; $lang->about_opage_caching_interval = '분 단위이며 정해진 시간동안은 임시 저장한 데이터를 출력합니다.
    다른 서버의 정보를 출력하거나, 데이터 출력하는데 많은 자원이 필요한 경우, 원하시는 분 단위 시간 간격으로 캐싱하는 것을 추천합니다.
    0 으로 하시면 캐싱을 하지 않습니다.'; + + $lang->opage_mobile_path = '모바일용 외부 문서 위치'; + $lang->about_opage_mobile_path= '모바일용 외부문서의 위치를 입력해주세요. 입력하지 않으면 위에서 지정한 외부문서 위치의 페이지를 이용합니다.
    /path1/path2/sample.php 와 같이 절대경로나 ../path2/sample.php와 같은 상대경로 모두 사용가능합니다.
    http://url/sample.php 와 같이 사용하면 해당 페이지를 웹으로 전송 받아 출력 하게 됩니다.
    현재 XE가 설치된 절대경로는 다음과 같습니다.
    '; ?> diff --git a/modules/opage/lang/ru.lang.php b/modules/opage/lang/ru.lang.php index 894d92ac3..d7cfa1128 100644 --- a/modules/opage/lang/ru.lang.php +++ b/modules/opage/lang/ru.lang.php @@ -12,4 +12,6 @@ $lang->about_opage = "Этот модуль позволяет использовать внешние HTML или PHP файлы в XE.
    Требует ввода абсолютного или относительного пути. Если URL начинается с 'http://', внешняя страница с другого сервера будет показана."; $lang->about_opage_path= "Пожалуйста, введите размещение внешнего документа.
    Абсолютный путь как '/path1/path2/sample.php', так и относительный как '../path2/sample.php' могут быть использованы.
    Если Вы введете путь как 'http://url/sample.php', результат будет сначала получен и затем показан.
    Это текущий абсолютный путь к XE.
    "; $lang->about_opage_caching_interval = "Единица измерения равна одной минуте. Это отображает временно сохраненные данные для присвоенного времени.
    Рекомендуется устанавливать разумное время кеширования, если множество ресурсов нуждаются в показе данных с других серверов.
    Значение 0 отключает кеширование."; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/vi.lang.php b/modules/opage/lang/vi.lang.php index 0e16d6657..1dc1bca5c 100644 --- a/modules/opage/lang/vi.lang.php +++ b/modules/opage/lang/vi.lang.php @@ -14,4 +14,6 @@ $lang->about_opage = "Module này tạo ra một trang từ bên ngoài tại XE thông qua File HTML hoặc PHP.
    Nó cho phép đường dẫn tuyệt đối hay tương đối, nếu bắt đầu bằng 'http://' , nó sẽ hiển thị một trang từ bên ngoài Server."; $lang->about_opage_path= "Xin hãy nhập đường dẫn của thư mục.
    Có thể sử dụng đường dẫn tuyệt đối dạng '/path1/path2/sample.php' hay tương đối dạng '../path2/sample.php'.
    Nếu nhập đường dẫn dạng 'http://url/sample.php', nó sẽ nhận và hiển thị nội dung của File đó.
    Đây là đường dẫn tuyệt đối thư mục cài đặt XE.
    "; $lang->about_opage_caching_interval = "Đơn vị được tính bằng phút, nó sẽ là thời gian lưu trữ tạm thời.
    Đó là khuyến cáo thời gian lưu trữ tạm thời thích hợp khi cần để hiển thị.
    Nhập 0 nếu không sử dụng tính năng này."; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/lang/zh-CN.lang.php b/modules/opage/lang/zh-CN.lang.php index eaebc0301..857e30a62 100644 --- a/modules/opage/lang/zh-CN.lang.php +++ b/modules/opage/lang/zh-CN.lang.php @@ -1,8 +1,8 @@ opage = "外部页面"; @@ -12,4 +12,7 @@ $lang->about_opage = "此模块是一种可以把外部html或php文件插入到XE内部的模块。
    可以使用绝对路径及相对路径。而且使用以http:// 开头的地址时,可以把外部服务器中的页面插入到XE当中。"; $lang->about_opage_path= "请输入外部文件路径。
    可以使用如同 /path1/path2/sample.php的绝对路径或如 ../path2/sample.php的相对路径。
    如使用http://url/sample.php之类的地址,可以把此页面的输出结果显示到XE内部的指定位置。
    现安装的XE绝对路径如下:
    "; $lang->about_opage_caching_interval = "单位为分。缓冲时间内页面将输出临时储存的数据。
    输出外部服务器信息或数据时,如消耗资源很大,尽量把缓冲时间设置为大一点的相应值。
    0 表示无缓冲。"; + + $lang->opage_mobile_path = '移动版外部页面路径'; + $lang->about_opage_mobile_path= '请输入移动版外部文件路径。留空默认使用上面指定的的普通外部页面。
    可以使用如同 /path1/path2/sample.php的绝对路径或如 ../path2/sample.php的相对路径。
    如使用http://url/sample.php之类的地址,可以把此页面的输出结果显示到XE内部的指定位置。
    现安装的XE绝对路径如下:
    '; ?> diff --git a/modules/opage/lang/zh-TW.lang.php b/modules/opage/lang/zh-TW.lang.php index 033892a68..e4bc8ae47 100644 --- a/modules/opage/lang/zh-TW.lang.php +++ b/modules/opage/lang/zh-TW.lang.php @@ -12,4 +12,6 @@ $lang->about_opage = "此模組可把外部HTML或PHP檔案插入到XE中的模組。
    可以使用絕對路徑及相對路徑。而且使用以『http://』開頭的網址時,可以把外部主機中的頁面插入到XE當中。"; $lang->about_opage_path= "請輸入外部檔案路徑。
    可以使用像『/path1/path2/sample.php』的絕對路徑或是『../path2/sample.php』的相對路徑。
    如果是用『http://url/sample.php』之類的網址,會將此頁面的結果顯示到XE內部的指定位置。
    目前安裝的XE絕對路徑如下:
    "; $lang->about_opage_caching_interval = "單位為分。暫存時間內頁面將輸出臨時儲存的資料。
    輸出外部主機訊息或資料時,如消耗資源很大,盡量把暫存時間設大一點。
    『0』表示不暫存。"; + $lang->opage_mobile_path = 'Location of External Document for Mobile View'; + $lang->about_opage_mobile_path= "Please input the location of external document for mobile view. If not inputted, it uses the the external document specified above.
    Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.
    If you input the path like 'http://url/sample.php' , the result will be received and then displayed.
    This is current XE's absolute path.
    "; ?> diff --git a/modules/opage/opage.admin.view.php b/modules/opage/opage.admin.view.php index 8fa1c1218..6c5eeb17c 100644 --- a/modules/opage/opage.admin.view.php +++ b/modules/opage/opage.admin.view.php @@ -79,10 +79,12 @@ } // 레이아웃 목록을 구해옴 - $oLayoutMode = &getModel('layout'); - $layout_list = $oLayoutMode->getLayoutList(); + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getLayoutList(); Context::set('layout_list', $layout_list); + $mobile_layout_list = $oLayoutModel->getLayoutList(0,"M"); + Context::set('mlayout_list', $mobile_layout_list); // 템플릿 파일 지정 $this->setTemplateFile('opage_insert'); diff --git a/modules/opage/opage.mobile.php b/modules/opage/opage.mobile.php new file mode 100644 index 000000000..c4b86ae80 --- /dev/null +++ b/modules/opage/opage.mobile.php @@ -0,0 +1,22 @@ +setTemplatePath($this->module_path.'tpl'); + + $oOpageModel = &getModel('opage'); + $module_info = $oOpageModel->getOpage($this->module_srl); + Context::set('module_info', $module_info); + + // 외부 페이지에서 명시된 외부 페이지 경로/ 캐싱 간격을 를 구함 + if($module_info->mpath) $this->path = $module_info->mpath; + else $this->path = $module_info->path; + $this->caching_interval = $module_info->caching_interval; + + // 캐시 파일 지정 + $this->cache_file = sprintf("./files/cache/opage/%d.m.cache.php", $module_info->module_srl); + } + +} diff --git a/modules/opage/opage.view.php b/modules/opage/opage.view.php index 3c122c18d..0082ddd93 100644 --- a/modules/opage/opage.view.php +++ b/modules/opage/opage.view.php @@ -7,34 +7,39 @@ class opageView extends opage { + var $path; + var $cache_file; + var $caching_interval; + /** * @brief 초기화 **/ function init() { // 템플릿 경로 구함 (opage의 경우 tpl에 관리자용 템플릿 모아놓음) $this->setTemplatePath($this->module_path.'tpl'); - } - /** - * @brief 일반 요청시 출력 - **/ - function dispOpageIndex() { // 외부 페이지 모듈의 정보를 구함 $oOpageModel = &getModel('opage'); $module_info = $oOpageModel->getOpage($this->module_srl); Context::set('module_info', $module_info); // 외부 페이지에서 명시된 외부 페이지 경로/ 캐싱 간격을 를 구함 - $path = $module_info->path; - $caching_interval = $module_info->caching_interval; + $this->path = $module_info->path; + $this->caching_interval = $module_info->caching_interval; // 캐시 파일 지정 - $cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl); + $this->cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl); + } + + /** + * @brief 일반 요청시 출력 + **/ + function dispOpageIndex() { // http 인지 내부 파일인지 점검 - if($path) { - if(preg_match("/^([a-z]+):\/\//i",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file); - else $content = $this->executeFile($path, $caching_interval, $cache_file); + if($this->path) { + if(preg_match("/^([a-z]+):\/\//i",$this->path)) $content = $this->getHtmlPage($this->path, $this->caching_interval, $this->cache_file); + else $content = $this->executeFile($this->path, $this->caching_interval, $this->cache_file); } Context::set('opage_content', $content); @@ -151,7 +156,7 @@ if(substr($val,0,2)=='./') $val = substr($val,2); //$p = '/'.str_replace(_XE_PATH_,'',$this->path); - $p = Context::pathToUrl($this->path); + $p = Context::pathToUrl($this->path); return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]); } diff --git a/modules/opage/tpl/filter/insert_opage.xml b/modules/opage/tpl/filter/insert_opage.xml index 9b1560158..56533df4d 100644 --- a/modules/opage/tpl/filter/insert_opage.xml +++ b/modules/opage/tpl/filter/insert_opage.xml @@ -12,6 +12,7 @@ + diff --git a/modules/opage/tpl/opage_insert.html b/modules/opage/tpl/opage_insert.html index 5cef1fe31..e8604766f 100644 --- a/modules/opage/tpl/opage_insert.html +++ b/modules/opage/tpl/opage_insert.html @@ -49,6 +49,20 @@

    {$lang->about_layout}

    +
    + + + + + + + + +
    {$lang->mobile_layout}
    + +

    {$lang->about_layout}

    +
    {$lang->opage_caching_interval}
    @@ -63,6 +77,13 @@

    {$lang->about_opage_path}{realpath("./")}

    {$lang->opage_mobile_path}
    + +

    {$lang->about_opage_mobile_path}{realpath("./")}

    +
    diff --git a/modules/page/conf/module.xml b/modules/page/conf/module.xml index 9954e40c5..daa2d2ad7 100644 --- a/modules/page/conf/module.xml +++ b/modules/page/conf/module.xml @@ -17,6 +17,8 @@ + + diff --git a/modules/page/lang/en.lang.php b/modules/page/lang/en.lang.php index e9f6c3d52..0f73eee2b 100644 --- a/modules/page/lang/en.lang.php +++ b/modules/page/lang/en.lang.php @@ -10,4 +10,5 @@ $lang->cmd_page_modify = "Modify"; $lang->page_caching_interval = "Caching Time"; $lang->about_page_caching_interval = "The unit is minute, and it displays temporary saved data for assigned time.
    It is recommended to cache for proper time if a lot of resources are needed when displaying other servers' data or information.
    A value of 0 will not cache."; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/es.lang.php b/modules/page/lang/es.lang.php index 2563166bc..eb27eed56 100644 --- a/modules/page/lang/es.lang.php +++ b/modules/page/lang/es.lang.php @@ -10,4 +10,5 @@ $lang->page_caching_interval = "Establezca el tiempo de cache"; $lang->about_page_caching_interval = "La unidad es minuto, y se muestra temporal de los datos guardados por el tiempo asignado.
    Se recomienda a la cache para una buena vez si una gran cantidad de recursos se necesitan otros servidores cuando se muestran los datos o la informacion.
    Un valor de 0 no cache."; $lang->cmd_page_modify = "Modificar"; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/fr.lang.php b/modules/page/lang/fr.lang.php index 5ed93b018..af7e2cc0b 100644 --- a/modules/page/lang/fr.lang.php +++ b/modules/page/lang/fr.lang.php @@ -10,4 +10,5 @@ $lang->cmd_page_modify = "Modifier"; $lang->page_caching_interval = "Temps de antémémoire"; $lang->about_page_caching_interval = "L'unité est minute, et ça exposera des données conservées temporairement pendant le temps assigné.
    Il est recommandé d'utiliser l'antémémoire pendant le temps convenable si beaucoup de ressource est nécessaire pour représenter les données ou l'information d'autre serveur.
    La valeur 0 signifie de ne pas utiliser antémémoire."; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/jp.lang.php b/modules/page/lang/jp.lang.php index 08b143e3e..686f300fd 100644 --- a/modules/page/lang/jp.lang.php +++ b/modules/page/lang/jp.lang.php @@ -10,4 +10,5 @@ $lang->cmd_page_modify = 'ページ修正'; $lang->page_caching_interval = 'キャッシング時間設定'; $lang->about_page_caching_interval = '分単位で指定出来、設定された時間の間は、臨時保存されたデータを出力します。
    他のサーバの情報を出力したり、データを出力する際、リソースが多く使われるため、数分単位でキャッシングすることをお勧めします。
    「0」に指定するとキャッシングされません。'; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/ko.lang.php b/modules/page/lang/ko.lang.php index e7517384a..e9b7a9372 100644 --- a/modules/page/lang/ko.lang.php +++ b/modules/page/lang/ko.lang.php @@ -10,4 +10,5 @@ $lang->cmd_page_modify = '페이지 수정'; $lang->page_caching_interval = '캐싱 시간 설정'; $lang->about_page_caching_interval = '분 단위이며 정해진 시간동안은 임시 저장한 데이터를 출력합니다.
    다른 서버의 정보를 출력하거나, 데이터 출력하는데 많은 자원이 필요한 경우, 원하시는 분 단위 시간 간격으로 캐싱하는 것을 추천합니다.
    0 으로 하시면 캐싱을 하지 않습니다.'; + $lang->about_mcontent = '모바일에서 보여질 페이지입니다. 만약 작성하지 않으면 기본 페이지 데이터를 재정렬해서 보여줍니다.'; ?> diff --git a/modules/page/lang/ru.lang.php b/modules/page/lang/ru.lang.php index 91dcd49c4..06a905816 100644 --- a/modules/page/lang/ru.lang.php +++ b/modules/page/lang/ru.lang.php @@ -10,4 +10,5 @@ $lang->page_caching_interval = "Установить время кеширования"; $lang->about_page_caching_interval = "Единица измерения равна одной минуте. Это отображает временно сохраненные данные для присвоенного времени.
    Рекомендуется устанавливать разумное время кеширования, если множество ресурсов нуждаются в показе данных с других серверов.
    Значение 0 отключает кеширование."; $lang->cmd_page_modify = "Изменить"; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/vi.lang.php b/modules/page/lang/vi.lang.php index fc07984c0..f9f58c890 100644 --- a/modules/page/lang/vi.lang.php +++ b/modules/page/lang/vi.lang.php @@ -12,4 +12,5 @@ $lang->cmd_page_modify = "Sửa đổi"; $lang->page_caching_interval = "Thời gian lưu trữ"; $lang->about_page_caching_interval = "Đơn vị được tính bằng phút, nó sẽ là thời gian lưu trữ tạm thời.
    Đó là khuyến cáo thời gian lưu trữ tạm thời thích hợp khi cần để hiển thị.
    Nhập 0 nếu không sử dụng tính năng này."; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/lang/zh-CN.lang.php b/modules/page/lang/zh-CN.lang.php index 0da7a2372..2a0ea499f 100644 --- a/modules/page/lang/zh-CN.lang.php +++ b/modules/page/lang/zh-CN.lang.php @@ -1,8 +1,8 @@ page = "页面"; @@ -10,4 +10,5 @@ $lang->cmd_page_modify = "页面编辑"; $lang->page_caching_interval = "缓冲时间设置"; $lang->about_page_caching_interval = "单位为分。缓冲时间间隔内页面将输出临时储存的数据。
    显示外链服务器信息或数据时,如消耗资源很大,尽量把缓冲时间设置为大一点的相应值。
    0 表示无缓冲。"; + $lang->about_mcontent = '此页为移动版页面,如您没有对此页面进行布局,它会自动将PC版页面数据重排序显示。'; ?> diff --git a/modules/page/lang/zh-TW.lang.php b/modules/page/lang/zh-TW.lang.php index 1b5024354..6e35f8db0 100644 --- a/modules/page/lang/zh-TW.lang.php +++ b/modules/page/lang/zh-TW.lang.php @@ -10,4 +10,5 @@ $lang->cmd_page_modify = "頁面編輯"; $lang->page_caching_interval = "暫存時間設置"; $lang->about_page_caching_interval = "單位為分。暫存時間內頁面將輸出臨時儲存的資料。
    輸出外部主機訊息或資料時,如消耗資源很大,盡量把暫存時間設大一點。
    『0』表示不暫存。"; + $lang->about_mcontent = 'This is the page for the mobile view. If you do not write this page, the mobile view display reoragnized PC view\'s page.'; ?> diff --git a/modules/page/page.admin.controller.php b/modules/page/page.admin.controller.php index da970124a..f97088e39 100644 --- a/modules/page/page.admin.controller.php +++ b/modules/page/page.admin.controller.php @@ -30,7 +30,17 @@ // module_srl이 넘어오면 원 모듈이 있는지 확인 if($args->module_srl) { $module_info = $oModuleModel->getModuleInfoByModuleSrl($args->module_srl); - if($module_info->module_srl != $args->module_srl) unset($args->module_srl); + if($module_info->module_srl != $args->module_srl) { + unset($args->module_srl); + } + else + { + foreach($args as $key=>$val) + { + $module_info->{$key} = $val; + } + $args = $module_info; + } } // module_srl의 값에 따라 insert/update @@ -49,6 +59,22 @@ $this->setMessage($msg_code); } + function putDocumentsInPageToArray($target, &$array) + { + if(!$target) return; + preg_match_all('!]+)!is', $target, $matches); + $pattern = '!document_srl="(\d+)"!'; + foreach($matches[1] as $match) + { + $match2 = null; + preg_match($pattern, $match, $match2); + if(count($match2)) + { + $array[(int)$match2[1]] = 1; + } + } + } + /** * @brief 페이지 수정 내용 저장 **/ @@ -56,13 +82,37 @@ $module_srl = Context::get('module_srl'); $content = Context::get('content'); if(!$module_srl) return new Object(-1,'msg_invalid_request'); + $mcontent = Context::get('mcontent'); + $type = Context::get('type'); // 페이지의 원 정보를 구해옴 $oModuleModel = &getModel('module'); $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); - if(!isset($content)) $content =''; - $module_info->content = $content; + if($type == "mobile") { + if(!$mcontent) $mcontent = ''; + $module_info->mcontent = $mcontent; + } + else { + if(!isset($content)) $content =''; + $module_info->content = $content; + } + $document_srls = array(); + $this->putDocumentsInPageToArray($module_info->content, $document_srls); + $this->putDocumentsInPageToArray($module_info->mcontent, $document_srls); + + $oDocumentModel = &getModel('document'); + $oDocumentController = &getController('document'); + $obj->module_srl = $module_srl; + $obj->list_count = 99999999; + $output = $oDocumentModel->getDocumentList($obj); + if(count($output->data)) { + foreach($output->data as $document) + { + if($document_srls[$document->document_srl]) continue; + $oDocumentController->deleteDocument($document->document_srl, true); + } + } // module 모듈의 controller 객체 생성 $oModuleController = &getController('module'); diff --git a/modules/page/page.admin.view.php b/modules/page/page.admin.view.php index dce6f8ead..33934bb8c 100644 --- a/modules/page/page.admin.view.php +++ b/modules/page/page.admin.view.php @@ -87,10 +87,12 @@ } // 레이아웃 목록을 구해옴 - $oLayoutMode = &getModel('layout'); - $layout_list = $oLayoutMode->getLayoutList(); + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getLayoutList(); Context::set('layout_list', $layout_list); + $mobile_layout_list = $oLayoutModel->getLayoutList(0,"M"); + Context::set('mlayout_list', $mobile_layout_list); // 템플릿 파일 지정 $this->setTemplateFile('page_info'); @@ -132,15 +134,67 @@ } // 레이아웃 목록을 구해옴 - $oLayoutMode = &getModel('layout'); - $layout_list = $oLayoutMode->getLayoutList(); + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getLayoutList(); Context::set('layout_list', $layout_list); + $mobile_layout_list = $oLayoutModel->getLayoutList(0,"M"); + Context::set('mlayout_list', $mobile_layout_list); // 템플릿 파일 지정 $this->setTemplateFile('page_insert'); } + function dispPageAdminMobileContent() { + if($this->module_srl) Context::set('module_srl',$this->module_srl); + + // 캐시 파일 지정 + $cache_file = sprintf("%sfiles/cache/page/%d.%s.m.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType()); + $interval = (int)($this->module_info->page_caching_interval); + if($interval>0) { + if(!file_exists($cache_file)) $mtime = 0; + else $mtime = filemtime($cache_file); + + if($mtime + $interval*60 > time()) { + $page_content = FileHandler::readFile($cache_file); + } else { + $oWidgetController = &getController('widget'); + $page_content = $oWidgetController->transWidgetCode($this->module_info->mcontent); + FileHandler::writeFile($cache_file, $page_content); + } + } else { + if(file_exists($cache_file)) FileHandler::removeFile($cache_file); + $page_content = $this->module_info->mcontent; + } + + Context::set('module_info', $this->module_info); + Context::set('page_content', $page_content); + + $this->setTemplateFile('mcontent'); + } + + function dispPageAdminMobileContentModify() { + Context::set('module_info', $this->module_info); + + // 내용을 세팅 + $content = Context::get('mcontent'); + if(!$content) $content = $this->module_info->mcontent; + Context::set('content', $content); + + // 내용중 위젯들을 변환 + $oWidgetController = &getController('widget'); + $content = $oWidgetController->transWidgetCode($content, true); + Context::set('page_content', $content); + + // 위젯 목록을 세팅 + $oWidgetModel = &getModel('widget'); + $widget_list = $oWidgetModel->getDownloadedWidgetList(); + Context::set('widget_list', $widget_list); + + // 템플릿 파일 지정 + $this->setTemplateFile('page_mobile_content_modify'); + } + /** * @brief 페이지 내용 수정 **/ diff --git a/modules/page/page.mobile.php b/modules/page/page.mobile.php new file mode 100644 index 000000000..bcd8d4c1f --- /dev/null +++ b/modules/page/page.mobile.php @@ -0,0 +1,45 @@ +setTemplatePath($this->module_path.'tpl'); + } + + function dispPageIndex() { + // 위젯을 1렬로 정렬 + if($this->module_info->mcontent) + { + $cache_file = sprintf("%sfiles/cache/page/%d.%s.m.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType()); + $interval = (int)($this->module_info->page_caching_interval); + if($interval>0) { + if(!file_exists($cache_file)) $mtime = 0; + else $mtime = filemtime($cache_file); + + if($mtime + $interval*60 > time()) { + $page_content = FileHandler::readFile($cache_file); + } else { + $oWidgetController = &getController('widget'); + $page_content = $oWidgetController->transWidgetCode($this->module_info->mcontent); + FileHandler::writeFile($cache_file, $page_content); + } + } else { + if(file_exists($cache_file)) FileHandler::removeFile($cache_file); + $page_content = $this->module_info->mcontent; + } + Context::set('content', $page_content); + } + else + { + preg_match_all('!(]*)(widget=)([^\>]*?)(\>)!is', $this->module_info->content, $matches); + $content = ''; + for($i=0,$c=count($matches[0]);$i<$c;$i++) { + $content .= preg_replace('/ style\=\"([^\"]+)\" /i',' style="overflow:hidden;clear:both;margin:0 0 20px 0; _margin-right:10px;" ',$matches[0][$i])."\n\n"; + } + Context::set('content', $content); + } + $this->setTemplateFile('mobile'); + } +} + +?> diff --git a/modules/page/page.smartphone.php b/modules/page/page.smartphone.php deleted file mode 100644 index c41c798e0..000000000 --- a/modules/page/page.smartphone.php +++ /dev/null @@ -1,28 +0,0 @@ -grant->access) return $oSmartPhone->setContent(Context::getLang('msg_not_permitted')); - - // 위젯을 1렬로 정렬 - preg_match_all('!(]*)(widget=)([^\>]*?)(\>)!is', $this->module_info->content, $matches); - $content = ''; - for($i=0,$c=count($matches[0]);$i<$c;$i++) { - $content .= preg_replace('/ style\=\"([^\"]+)\" /i',' style="overflow:hidden;clear:both;margin:0 0 20px 0; _margin-right:10px;" ',$matches[0][$i])."\n\n"; - } - Context::set('content', $content); - - $oTemplate = new TemplateHandler(); - $content = $oTemplate->compile($this->module_path.'tpl','smartphone'); - - $oSmartPhone->setContent($content); - } - } -?> diff --git a/modules/page/tpl/content.html b/modules/page/tpl/content.html index 2a9da79b0..56fdea24a 100644 --- a/modules/page/tpl/content.html +++ b/modules/page/tpl/content.html @@ -8,5 +8,8 @@ {$lang->cmd_setup} {$lang->cmd_page_modify} + + Mobile + diff --git a/modules/page/tpl/css/mpage.css b/modules/page/tpl/css/mpage.css new file mode 100644 index 000000000..5b460639c --- /dev/null +++ b/modules/page/tpl/css/mpage.css @@ -0,0 +1,6 @@ +/* Mobile XE */ +body{margin:0;background:#fff;color:#000;word-wrap:break-word} +body,input,textarea,select,button,table{font-family:Tahoma, Geneva, sans-serif} +img{border:0} +em{font-style:normal} +.bd{position:relative;overflow:hidden;clear:both} diff --git a/modules/page/tpl/filter/insert_mpage_content.xml b/modules/page/tpl/filter/insert_mpage_content.xml new file mode 100644 index 000000000..06cbd7d2d --- /dev/null +++ b/modules/page/tpl/filter/insert_mpage_content.xml @@ -0,0 +1,18 @@ + +
    + + + + + + + + + + + + + + + +
    diff --git a/modules/page/tpl/js/page_admin.js b/modules/page/tpl/js/page_admin.js index 9f3966288..8f8c2d71b 100644 --- a/modules/page/tpl/js/page_admin.js +++ b/modules/page/tpl/js/page_admin.js @@ -37,6 +37,17 @@ function completeInsertPageContent(ret_obj) { location.href = current_url.setQuery('mid',mid).setQuery('act',''); } +function completeInsertMobilePageContent(ret_obj) { + var error = ret_obj['error']; + var message = ret_obj['message']; + + var page = ret_obj['page']; + var module_srl = ret_obj['module_srl']; + var mid = ret_obj['mid']; + + location.href = current_url.setQuery('mid',mid).setQuery('act','dispPageAdminMobileContent'); +} + /* 수정한 페이지 컨텐츠를 저장 */ function doSubmitPageContent(fo_obj) { var html = getWidgetContent(); @@ -44,6 +55,12 @@ function doSubmitPageContent(fo_obj) { return procFilter(fo_obj, insert_page_content); } +function doSubmitMPageContent(fo_obj) { + var html = getWidgetContent(); + fo_obj.content.value = html; + return procFilter(fo_obj, insert_mpage_content); +} + /* 모듈 삭제 후 */ function completeDeletePage(ret_obj) { var error = ret_obj['error']; diff --git a/modules/page/tpl/mcontent.html b/modules/page/tpl/mcontent.html new file mode 100644 index 000000000..830520c85 --- /dev/null +++ b/modules/page/tpl/mcontent.html @@ -0,0 +1,14 @@ +
    {$page_content}
    + + + + + diff --git a/modules/page/tpl/mobile.html b/modules/page/tpl/mobile.html new file mode 100644 index 000000000..2f68ed9d4 --- /dev/null +++ b/modules/page/tpl/mobile.html @@ -0,0 +1,4 @@ + +
    +{$content} +
    diff --git a/modules/page/tpl/page_info.html b/modules/page/tpl/page_info.html index a1ca14f8e..9f3fcfafb 100644 --- a/modules/page/tpl/page_info.html +++ b/modules/page/tpl/page_info.html @@ -4,7 +4,6 @@
    - @@ -45,6 +44,25 @@

    {$lang->about_layout}

    + + + + + + + + diff --git a/modules/page/tpl/page_insert.html b/modules/page/tpl/page_insert.html index d75910e4c..a292f583e 100644 --- a/modules/page/tpl/page_insert.html +++ b/modules/page/tpl/page_insert.html @@ -47,6 +47,25 @@

    {$lang->about_layout}

    + + + + + + + + diff --git a/modules/page/tpl/page_mobile_content_modify.html b/modules/page/tpl/page_mobile_content_modify.html new file mode 100644 index 000000000..bcdff88e3 --- /dev/null +++ b/modules/page/tpl/page_mobile_content_modify.html @@ -0,0 +1,62 @@ + + + + + + + +
    +
    {$page_content}
    +
    +
    + + + + + + + + +
    + +
    + +
    +
    + + + +
    +
    +
    + + + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + diff --git a/modules/page/tpl/smartphone.html b/modules/page/tpl/smartphone.html deleted file mode 100644 index d228f8dd5..000000000 --- a/modules/page/tpl/smartphone.html +++ /dev/null @@ -1,4 +0,0 @@ -
    - {$content} -
    - diff --git a/modules/point/point.controller.php b/modules/point/point.controller.php index f0ecf9575..f07f01734 100644 --- a/modules/point/point.controller.php +++ b/modules/point/point.controller.php @@ -358,7 +358,6 @@ **/ function triggerBeforeDownloadFile(&$obj) { $logged_info = Context::get('logged_info'); - if(!$logged_info->member_srl) return new Object(); $member_srl = $logged_info->member_srl; $module_srl = $obj->module_srl; if(!$module_srl) return new Object(); @@ -371,7 +370,11 @@ $module_config = $oModuleModel->getModulePartConfig('point', $module_srl); // 포인트가 없으면 다운로드가 안되도록 하였으면 비로그인 회원일 경우 중지 - if(!Context::get('is_logged') && $config->disable_download == 'Y') return new Object(-1,'msg_not_permitted_download'); + if(!Context::get('is_logged')) + { + if($config->disable_download == 'Y') return new Object(-1,'msg_not_permitted_download'); + else return new Object(); + } // 대상 회원의 포인트를 구함 $oPointModel = &getModel('point'); diff --git a/modules/widget/conf/module.xml b/modules/widget/conf/module.xml index f66c49875..df9aefc57 100644 --- a/modules/widget/conf/module.xml +++ b/modules/widget/conf/module.xml @@ -18,9 +18,8 @@ - - \ No newline at end of file + diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index ad9430a73..dc07d77c7 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -64,10 +64,8 @@ function doStartPageModify(zoneID, module_srl) { // 내용 모두 삭제 function removeAllWidget() { if(!confirm(confirm_delete_msg)) return; - var response_tags = new Array('error','message'); - var params = new Array(); - params['module_srl'] = xGetElementById('pageFo').module_srl.value; - exec_xml('widget',"procWidgetRemoveContents",params,function() { restoreWidgetButtons(); xInnerHtml(zonePageObj,'') }); + restoreWidgetButtons(); + xInnerHtml(zonePageObj,''); } /** @@ -557,16 +555,7 @@ function doCheckWidget(e) { var widget = p_obj.getAttribute("widget"); if(confirm(confirm_delete_msg)) { restoreWidgetButtons(); - - if(p_obj.getAttribute('widget')=='widgetContent') { - var response_tags = new Array('error','message','document_srl'); - var params = new Array(); - params['document_srl'] =p_obj.getAttribute('document_srl'); - exec_xml('widget','procWidgetDeleteDocument', params, completeDeleteWidgetContent, response_tags, params, p_obj); - return; - } else { - p_obj.parentNode.removeChild(p_obj); - } + p_obj.parentNode.removeChild(p_obj); } return; } diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index 15835b611..9c9da86ae 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -223,44 +223,6 @@ if(!$output->toBool()) return $output; } - /** - * @brief 내용 지우기 - **/ - function procWidgetRemoveContents() { - $module_srl = Context::get('module_srl'); - if(!$module_srl) return new Object(-1,'msg_invalid_request'); - - // 대상 페이지 모듈 정보 구함 - $oModuleModel = &getModel('module'); - $page_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); - if(!$page_info->module_srl || $page_info->module != 'page') return new Object(-1,'msg_invalid_request'); - - // 권한 체크 - $is_logged = Context::get('is_logged'); - $logged_info = Context::get('logged_info'); - $user_group = $logged_info->group_list; - $is_admin = false; - if(count($user_group)&&count($page_info->grants['manager'])) { - $manager_group = $page_info->grants['manager']; - foreach($user_group as $group_srl => $group_info) { - if(in_array($group_srl, $manager_group)) $is_admin = true; - } - } - if(!$is_admin && !$is_logged && $logged_info->is_admin != 'Y' && !$oModuleModel->isSiteAdmin($logged_info) && !(is_array($page_info->admin_id) && in_array($logged_infoi->user_id, $page_info->admin_id))) return new Object(-1,'msg_not_permitted'); - - // 등록된 글 목록 구함 - $oDocumentModel = &getModel('document'); - $oDocumentController = &getController('document'); - $obj->module_srl = $module_srl; - $obj->list_count = 99999999; - $output = $oDocumentModel->getDocumentList($obj); - if(!$output->total_count) return new Object(); - for($i=0;$i<$output->data;$i++) { - $oDocumentController->deleteDocument($output->data[$i]->document_srl, true); - } - return new Object(); - } - /** * @brief 위젯 코드를 Javascript로 수정/드래그등을 하기 위한 Javascript 수정 모드로 변환 **/ diff --git a/widgets/content/conf/info.xml b/widgets/content/conf/info.xml index cb9ca98e1..c0cf5773b 100644 --- a/widgets/content/conf/info.xml +++ b/widgets/content/conf/info.xml @@ -3,14 +3,14 @@ Content 위젯 Content Nội dung - Содержание + Содержание 全局内容控件 內容 コンテンツウィジェット 게시판, 코멘트, 첨부파일 등 Content를 출력하는 위젯입니다. This widget displays Content such as articles, comments, or attached files. - Widget này sẽ hiển thị những bài viết, bình luận, File đính kèm. - This widget displays Content such as articles, comments, or attached files. + Widget này sẽ hiển thị những bài viết, bình luận, File đính kèm. + This widget displays Content such as articles, comments, or attached files. 以各种样式显示主题,评论,附件等站内内容的全局控件。 這個 Widget 可輸出討論板、評論,附加檔案等內容。 掲示板の書き込み、コメント、添付ファイルなどコンテンツを出力するウィジェットです。 @@ -33,7 +33,7 @@ select 추출대상 Target - Target + Target Khu vực 对象 目標 @@ -42,10 +42,10 @@ document 게시물 Article - Article + Article Bài viết 主题 - 主題 + 主題 書き込み @@ -53,9 +53,9 @@ 댓글 Comment Bình luận - Comment + Comment 评论 - 評論 + 評論 コメント @@ -63,9 +63,9 @@ 첨부이미지 Attached Image Hình đính kèm - Attached Image + Attached Image 图片 - 圖片 + 圖片 添付イメージ @@ -73,9 +73,9 @@ 트랙백 Trackback Liên kết Web - Trackback + Trackback 引用 - 引用 + 引用 トラックバック @@ -83,9 +83,9 @@ 피드 (RSS/ATOM) Feed (RSS/ATOM) Feed (RSS/ATOM) - Feed (RSS/ATOM) + Feed (RSS/ATOM) Feed (RSS/ATOM) - Feed (RSS/ATOM) + Feed (RSS/ATOM) Feed (RSS/ATOM) @@ -94,7 +94,7 @@ 내용형태 Content Type Kiểu hiển thị - Content Type + Content Type 内容样式 內容樣式 内容のタイプ @@ -103,7 +103,7 @@ 제목 Title Tiêu đề - Title + Title 标题 標題 タイトル @@ -113,7 +113,7 @@ 이미지+제목 Image+Title Hình ảnh+Tiêu đề - Image+Title + Image+Title 图片+标题 圖片+標題 画像+タイトル @@ -123,7 +123,7 @@ 겔러리 Gallery Slide Show - Gallery + Gallery 相册 相簿 ギャラリー @@ -133,7 +133,7 @@ 이미지+제목+내용 Image+Title+Content Hình ảnh+Tiêu đề+Nội dung - Image+Title+Content + Image+Title+Content 图片+标题+内容 圖片+標題+內容 画像+タイトル+内容 @@ -144,7 +144,7 @@ 탭형태 Tab Type Kiểu Tab - Tab Type + Tab Type 选项卡样式 分頁樣式 タブのスタイル @@ -153,7 +153,7 @@ 없음 None Không - None + None なし @@ -163,7 +163,7 @@ 상단 탭형 Upper Tab Type Kiểu Tab trên - Upper Tab Type + Upper Tab Type 顶端选项卡 頂端分頁 上段配置型タブ @@ -173,7 +173,7 @@ 왼쪽 탭형 Left Tab Type Kiểu Tab trái - Left Tab Type + Left Tab Type 左侧选项卡 左側分頁 左側の配置型タブ @@ -193,7 +193,7 @@ 제목 Title Tiêu đề - Title + Title 标题 標題 タイトル @@ -203,7 +203,7 @@ 섬네일 Thumbnail Hình nhỏ - Thumbnail + Thumbnail 缩略图 縮圖 サムネール @@ -213,7 +213,7 @@ 등록일 Regdate Ngày gửi - Regdate + Regdate 发布日期 發表日期 登録日 @@ -223,7 +223,7 @@ 글쓴이 Author Người gửi - Author + Author 发布者 作者 登録者 @@ -232,7 +232,7 @@ content 내용 Content - Content + Content Nội dung 内容 內容 @@ -245,7 +245,7 @@ 게시판 이름 표시 Display Article Name Tên bài viết - Display Article Name + Display Article Name 显示版面名称 討論板名稱 掲示板名の表示 @@ -254,7 +254,7 @@ 출력 Display Hiển thị - Display + Display 显示 顯示 表示 @@ -264,7 +264,7 @@ 출력하지 않음 No Display Không hiển thị - No Display + No Display 不显示 不顯示 表示しない diff --git a/widgets/counter_status/conf/info.xml b/widgets/counter_status/conf/info.xml index 63cba96e5..211ef4c46 100644 --- a/widgets/counter_status/conf/info.xml +++ b/widgets/counter_status/conf/info.xml @@ -55,6 +55,6 @@ zero zero zero - zero + zero diff --git a/widgetstyles/simple/skin.xml b/widgetstyles/simple/skin.xml index ed3c9fa0f..c85a0b1ff 100644 --- a/widgetstyles/simple/skin.xml +++ b/widgetstyles/simple/skin.xml @@ -19,7 +19,7 @@ sol sol - sol + sol sol sol sol @@ -29,20 +29,20 @@ 컬러셋 Colorset - Tạo màu + Tạo màu 颜色 顏色 カラーセット 컬러셋을 지정해주세요 Choose colorset - Lựa chọn màu sắc + Lựa chọn màu sắc 请指定适当的颜色。 請選擇顏色。 カラーセットを指定して下さい。 하얀색 White - White + White 白色 白色 @@ -51,7 +51,7 @@ 검은색 Black - Black + Black 黑色 黑色 @@ -61,13 +61,13 @@ 제목 Title - Tiêu đề + Tiêu đề 栏目名 標題 タイトル 제목 텍스트 Title text - Chữ của tiêu đề + Chữ của tiêu đề 请输入栏目名。 請輸入標題。 「タイトル」のテキスト @@ -75,28 +75,28 @@ 더보기 URL more URL - URL của Xem thêm + URL của Xem thêm 查看更多(链接) more URL 「もっと見る」URL http:// 포함한 URL를 등록합니다. - 请输入包含http://的URL地址。 - 請輸入http://以外的URL網址。 + 请输入包含http://的URL地址。 + 請輸入http://以外的URL網址。 Destination of a link 'more'. Register an URL including http:// - Địa chỉ trang sẽ chuyển đến khi bấm vào Xem thêm (Bao gồm cả http://) + Địa chỉ trang sẽ chuyển đến khi bấm vào Xem thêm (Bao gồm cả http://) 「http://」を含んだURLを登録します。 더보기 텍스트 more Text - Chữ của Xem thêm + Chữ của Xem thêm 查看更多(文本) more TEXT 「もっと見る」テキスト 더보기 텍스트 Text for a link 'more' 文本格式的"查看更多"。 - Có thể dùng những từ khác thay cho từ Xem thêm + Có thể dùng những từ khác thay cho từ Xem thêm 純文字格式。 「もっと見る」テキスト
    {$lang->mobile_view}
    + use_mobile == "Y")-->checked="checked" /> +

    {$lang->about_mobile_view}

    +
    {$lang->mobile_layout}
    + +

    {$lang->about_layout}

    +
    {$lang->page_caching_interval}
    {$lang->mobile_view}
    + use_mobile == "Y")-->checked="checked" /> +

    {$lang->about_mobile_view}

    +
    {$lang->mobile_layout}
    + +

    {$lang->about_layout}

    +
    {$lang->page_caching_interval}