#18958478 : added mobile page for opage module

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7534 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-06-21 11:39:11 +00:00
parent 29eab83101
commit d0e36ff7f3
14 changed files with 85 additions and 14 deletions

View file

@ -12,4 +12,7 @@
$lang->about_opage = "This module enables usage of external html or php files in XE.<br />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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
$lang->about_opage_caching_interval = "The unit is minute, and it displays temporary saved data for assigned time.<br />It is recommended to cache for proper time if a lot of resources are needed when displaying other servers' data or information.<br />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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = 'Este modulo permite el uso externo de archivos html o php en XE. <br /> 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. <br /> Ambos ruta absoluta como '/ path1/path2/sample.php' o ruta relativa como \"../path2/sample.php\" puede ser utilizado. <br /> Si la via de entrada, como \"http://url/sample.php\", el resultado sera recibido y, a continuacion se muestran. <br /> Esta es la actual XE ruta absoluta.<br />";
$lang->about_opage_caching_interval = "La unidad es minuto, y se muestra temporal de los datos guardados por el tiempo asignado. <br /> 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. <br /> 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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = "Ce module vous fait pouvoir utiliser des documents extérieurs en html ou en php dans XE.<br />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.<br />Non seulement le chemin absolu comme '/path1/path2/sample.php' mais aussi le chemin relatif comme '../path2/sample.php' peuvent être utilisés.<br />Si vous entrez le chemin comme 'http://url/sample.php', le résultat sera reçu et puis exposé<br />Le chemin suivant, c'est le chemin absolu de XE.<br />";
$lang->about_opage_caching_interval = "L'unité est minute, et ça exposera des données conservées temporairement pendant le temps assigné.<br />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.<br />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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = '外部のHTMLまたはPHPファイルをXE内部で使用出来るようにするモジュールです。<br />絶対パス、相対パスで指定出来、「http://」で始まるサーバの外部ページも表示出来ます。';
$lang->about_opage_path= '外部ドキュメントの場所を入力して下さい。<br />「/path1/path2/sample.php」のような絶対パス、「../path2/sample.php」のような相対パスが使用出来ます。<br />「http://URL/sample.php」のように使用すると結果を読み込んで表示します。<br />現在XEがインストールされている絶対パスは次のようになっています。<br />';
$lang->about_opage_caching_interval = '分単位で指定出来、設定された時間の間は、臨時保存されたデータを出力します。<br />他のサーバの情報を出力したり、データを出力する際、リソースが多く使われるため、数分単位でキャッシングすることをお勧めします。<br />「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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,7 @@
$lang->about_opage = 'XE가 아닌 외부 HTML 또는 PHP파일을 XE에서 사용할 수 있도록 하는 모듈입니다.<br />절대경로, 상대경로를 이용할 수 있으며 http:// 로 시작할 경우 서버 외부의 페이지도 표시할 수 있습니다';
$lang->about_opage_path= '외부문서의 위치를 입력해주세요.<br />/path1/path2/sample.php 와 같이 절대경로나 ../path2/sample.php와 같은 상대경로 모두 사용가능합니다.<br />http://url/sample.php 와 같이 사용하면 해당 페이지를 웹으로 전송 받아 출력 하게 됩니다.<br />현재 XE가 설치된 절대경로는 다음과 같습니다.<br />';
$lang->about_opage_caching_interval = '분 단위이며 정해진 시간동안은 임시 저장한 데이터를 출력합니다.<br />다른 서버의 정보를 출력하거나, 데이터 출력하는데 많은 자원이 필요한 경우, 원하시는 분 단위 시간 간격으로 캐싱하는 것을 추천합니다.<br />0 으로 하시면 캐싱을 하지 않습니다.';
$lang->opage_mobile_path = '모바일용 외부 문서 위치';
$lang->about_opage_mobile_path= '모바일용 외부문서의 위치를 입력해주세요. 입력하지 않으면 위에서 지정한 외부문서 위치의 페이지를 이용합니다. <br />/path1/path2/sample.php 와 같이 절대경로나 ../path2/sample.php와 같은 상대경로 모두 사용가능합니다.<br />http://url/sample.php 와 같이 사용하면 해당 페이지를 웹으로 전송 받아 출력 하게 됩니다.<br />현재 XE가 설치된 절대경로는 다음과 같습니다.<br />';
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = "Этот модуль позволяет использовать внешние HTML или PHP файлы в XE.<br />Требует ввода абсолютного или относительного пути. Если URL начинается с 'http://', внешняя страница с другого сервера будет показана.";
$lang->about_opage_path= "Пожалуйста, введите размещение внешнего документа.<br />Абсолютный путь как '/path1/path2/sample.php', так и относительный как '../path2/sample.php' могут быть использованы.<br />Если Вы введете путь как 'http://url/sample.php', результат будет сначала получен и затем показан.<br />Это текущий абсолютный путь к XE.<br />";
$lang->about_opage_caching_interval = "Единица измерения равна одной минуте. Это отображает временно сохраненные данные для присвоенного времени.<br />Рекомендуется устанавливать разумное время кеширования, если множество ресурсов нуждаются в показе данных с других серверов.<br />Значение 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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -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.<br />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.<br />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'.<br />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 đó.<br />Đây là đường dẫn tuyệt đối thư mục cài đặt XE.<br />";
$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.<br />Đó 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ị.<br />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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = "此模块是一种可以把外部html或php文件插入到XE内部的模块。<br />可以使用绝对路径及相对路径。而且使用以http:// 开头的地址时可以把外部服务器中的页面插入到XE当中。";
$lang->about_opage_path= "请输入外部文件路径。<br />可以使用如同 /path1/path2/sample.php的绝对路径或如 ../path2/sample.php的相对路径。<br />如使用http://url/sample.php之类的地址可以把此页面的输出结果显示到XE内部的指定位置。<br />现安装的XE绝对路径如下:<br />";
$lang->about_opage_caching_interval = "单位为分。缓冲时间内页面将输出临时储存的数据。<br />输出外部服务器信息或数据时,如消耗资源很大,尽量把缓冲时间设置为大一点的相应值。<br />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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -12,4 +12,6 @@
$lang->about_opage = "此模組可把外部HTML或PHP檔案插入到XE中的模組。<br />可以使用絕對路徑及相對路徑。而且使用以『http://』開頭的網址時可以把外部主機中的頁面插入到XE當中。";
$lang->about_opage_path= "請輸入外部檔案路徑。<br />可以使用像『/path1/path2/sample.php』的絕對路徑或是『../path2/sample.php』的相對路徑。<br />如果是用『http://url/sample.php』之類的網址會將此頁面的結果顯示到XE內部的指定位置。<br />目前安裝的XE絕對路徑如下:<br />";
$lang->about_opage_caching_interval = "單位為分。暫存時間內頁面將輸出臨時儲存的資料。<br />輸出外部主機訊息或資料時,如消耗資源很大,盡量把暫存時間設大一點。<br />『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.<br />Both absolute path such as '/path1/path2/sample.php' or relative path such as '../path2/sample.php' can be used.<br />If you input the path like 'http://url/sample.php' , the result will be received and then displayed.<br />This is current XE's absolute path.<br />";
?>

View file

@ -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');

View file

@ -0,0 +1,22 @@
<?php
require_once(_XE_PATH_.'modules/opage/opage.view.php');
class opageMobile extends opageView {
function init() {
// 템플릿 경로 구함 (opage의 경우 tpl에 관리자용 템플릿 모아놓음)
$this->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);
}
}

View file

@ -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]);
}

View file

@ -12,6 +12,7 @@
<param name="browser_title" target="browser_title" />
<param name="caching_interval" target="opage_caching_interval" />
<param name="path" target="opage_path" />
<param name="mpath" target="opage_mpath" />
</parameter>
<response callback_func="completeInsertOpage">
<tag name="error" />

View file

@ -49,6 +49,20 @@
<p>{$lang->about_layout}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->mobile_layout}</div></th>
<td>
<select name="mlayout_srl">
<option value="0">{$lang->notuse}</option>
<!--@foreach($mlayout_list as $key => $val)-->
<option value="{$val->layout_srl}" <!--@if($module_info->mlayout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
<!--@end-->
</select>
<p>{$lang->about_layout}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->opage_caching_interval}</div></th>
<td colspan="3">
@ -63,6 +77,13 @@
<p>{$lang->about_opage_path}<b>{realpath("./")}</b></p>
</td>
</tr>
<tr class="row">
<th scope="row"><div>{$lang->opage_mobile_path}</div></th>
<td colspan="3">
<input type="text" name="opage_mpath" value="{htmlspecialchars($module_info->mpath)}" class="inputTypeText w400" />
<p>{$lang->about_opage_mobile_path}<b>{realpath("./")}</b></p>
</td>
</tr>
<tr class="row2">
<th colspan="4" class="button">
<span class="button black strong"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>