mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
Author name update.
NHN developers@xpressengine.com http://xpressengine.com/ git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7676 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7d1fa86e5c
commit
8f385a592b
603 changed files with 67379 additions and 67522 deletions
|
|
@ -1,107 +1,107 @@
|
|||
<?php
|
||||
/**
|
||||
* @class emoticon
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 이모티콘 이미지 연결 컴포넌트
|
||||
**/
|
||||
|
||||
class emoticon extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
var $emoticon_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function emoticon($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘 파일 목록을 리턴
|
||||
**/
|
||||
function getEmoticonList() {
|
||||
$emoticon = Context::get('emoticon');
|
||||
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$list = $this->getEmoticons($emoticon);
|
||||
|
||||
$this->add('emoticons', implode("\n",$list));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 재귀적으로 이모티콘이 될 법한 파일들을 하위 디렉토리까지 전부 검색한다. 8,000개까지는 테스트 해봤는데 스택오버프로우를 일으킬지 어떨지는 잘 모르겠음.(2007.9.6, 베니)
|
||||
**/
|
||||
function getEmoticons($path) {
|
||||
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
|
||||
$output = array();
|
||||
|
||||
$oDir = dir($emoticon_path);
|
||||
while($file = $oDir->read()) {
|
||||
if(substr($file,0,1)=='.') continue;
|
||||
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
|
||||
}
|
||||
$oDir->close();
|
||||
if(count($output)) asort($output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 이모티콘 디렉토리 목록을 가져옴
|
||||
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
|
||||
$emoticon_list = array();
|
||||
if($emoticon_dirs) {
|
||||
foreach($emoticon_dirs as $emoticon) {
|
||||
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
|
||||
}
|
||||
}
|
||||
Context::set('emoticon_list', $emoticon_list);
|
||||
|
||||
// 첫번째 이모티콘 디렉토리의 이미지 파일을 구함
|
||||
$emoticons = $this->getEmoticons($emoticon_list[0]);
|
||||
Context::set('emoticons', $emoticons);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘의 경로 문제 해결을 하기 위해 추가하였다. (2007.9.6 베니)
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
|
||||
if(!$alt) {
|
||||
$tmp_arr = explode('/',$src);
|
||||
$alt = array_pop($tmp_arr);
|
||||
}
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
if(!$alt) $alt = $src;
|
||||
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
|
||||
if($alt) {
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
}
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
|
||||
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class emoticon
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 이모티콘 이미지 연결 컴포넌트
|
||||
**/
|
||||
|
||||
class emoticon extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
var $emoticon_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function emoticon($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘 파일 목록을 리턴
|
||||
**/
|
||||
function getEmoticonList() {
|
||||
$emoticon = Context::get('emoticon');
|
||||
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$list = $this->getEmoticons($emoticon);
|
||||
|
||||
$this->add('emoticons', implode("\n",$list));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 재귀적으로 이모티콘이 될 법한 파일들을 하위 디렉토리까지 전부 검색한다. 8,000개까지는 테스트 해봤는데 스택오버프로우를 일으킬지 어떨지는 잘 모르겠음.(2007.9.6, 베니)
|
||||
**/
|
||||
function getEmoticons($path) {
|
||||
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
|
||||
$output = array();
|
||||
|
||||
$oDir = dir($emoticon_path);
|
||||
while($file = $oDir->read()) {
|
||||
if(substr($file,0,1)=='.') continue;
|
||||
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
|
||||
}
|
||||
$oDir->close();
|
||||
if(count($output)) asort($output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 이모티콘 디렉토리 목록을 가져옴
|
||||
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
|
||||
$emoticon_list = array();
|
||||
if($emoticon_dirs) {
|
||||
foreach($emoticon_dirs as $emoticon) {
|
||||
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
|
||||
}
|
||||
}
|
||||
Context::set('emoticon_list', $emoticon_list);
|
||||
|
||||
// 첫번째 이모티콘 디렉토리의 이미지 파일을 구함
|
||||
$emoticons = $this->getEmoticons($emoticon_list[0]);
|
||||
Context::set('emoticons', $emoticons);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘의 경로 문제 해결을 하기 위해 추가하였다. (2007.9.6 베니)
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
|
||||
if(!$alt) {
|
||||
$tmp_arr = explode('/',$src);
|
||||
$alt = array_pop($tmp_arr);
|
||||
}
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
if(!$alt) $alt = $src;
|
||||
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
|
||||
if($alt) {
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
}
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
|
||||
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">이모티콘 출력</title>
|
||||
<title xml:lang="jp">顔文字(イモティコン)</title>
|
||||
<title xml:lang="zh-CN">表情图标</title>
|
||||
<title xml:lang="en">Display Emoticons</title>
|
||||
<title xml:lang="vi">Diễn tả cảm xúc</title>
|
||||
<title xml:lang="es">Mostrar iconos gestuales</title>
|
||||
<title xml:lang="ru">Отображение смайлов</title>
|
||||
<title xml:lang="zh-TW">表情符號</title>
|
||||
<description xml:lang="ko">이모티콘을 에디터에 삽입할 수 있습니다.</description>
|
||||
<description xml:lang="jp">顔文字(イモティコン)をエディターに追加することが出来ます。</description>
|
||||
<description xml:lang="zh-CN">可以插入表情图标到编辑器。</description>
|
||||
<description xml:lang="en">You may insert emoticons to editor.</description>
|
||||
<description xml:lang="vi">Bạn có thể chèn biểu tượng cảm xúc vào bài viết.</description>
|
||||
<description xml:lang="es">Usted puede insertar emoticonos para el editor.</description>
|
||||
<description xml:lang="ru">Вы можете вставить смыйлы в редактор.</description>
|
||||
<description xml:lang="zh-TW">可插入表情符號到編輯器。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">이모티콘 출력</title>
|
||||
<title xml:lang="jp">顔文字(イモティコン)</title>
|
||||
<title xml:lang="zh-CN">表情图标</title>
|
||||
<title xml:lang="en">Display Emoticons</title>
|
||||
<title xml:lang="vi">Diễn tả cảm xúc</title>
|
||||
<title xml:lang="es">Mostrar iconos gestuales</title>
|
||||
<title xml:lang="ru">Отображение смайлов</title>
|
||||
<title xml:lang="zh-TW">表情符號</title>
|
||||
<description xml:lang="ko">이모티콘을 에디터에 삽입할 수 있습니다.</description>
|
||||
<description xml:lang="jp">顔文字(イモティコン)をエディターに追加することが出来ます。</description>
|
||||
<description xml:lang="zh-CN">可以插入表情图标到编辑器。</description>
|
||||
<description xml:lang="en">You may insert emoticons to editor.</description>
|
||||
<description xml:lang="vi">Bạn có thể chèn biểu tượng cảm xúc vào bài viết.</description>
|
||||
<description xml:lang="es">Usted puede insertar emoticonos para el editor.</description>
|
||||
<description xml:lang="ru">Вы можете вставить смыйлы в редактор.</description>
|
||||
<description xml:lang="zh-TW">可插入表情符號到編輯器。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,81 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* @class image_gallery
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 업로드된 이미지로 이미지갤러리를 만듬
|
||||
**/
|
||||
|
||||
class image_gallery extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_gallery($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$gallery_info->srl = rand(111111,999999);
|
||||
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
|
||||
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
|
||||
$gallery_info->border_color = $xml_obj->attrs->border_color;
|
||||
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
|
||||
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
|
||||
|
||||
$images_list = $xml_obj->attrs->images_list;
|
||||
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
|
||||
$gallery_info->images_list = explode("\n",trim($images_list));
|
||||
|
||||
// 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성
|
||||
if(Context::getResponseMethod() == 'XMLRPC') {
|
||||
$output = '';
|
||||
for($i=0;$i<count($gallery_info->images_list);$i++) {
|
||||
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$gallery_info->width = trim($matches[3][0]);
|
||||
if(!$gallery_info->width) $gallery_info->width = 400;
|
||||
|
||||
Context::set('gallery_info', $gallery_info);
|
||||
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
|
||||
else $tpl_file = 'slide_gallery.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class image_gallery
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 업로드된 이미지로 이미지갤러리를 만듬
|
||||
**/
|
||||
|
||||
class image_gallery extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_gallery($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$gallery_info->srl = rand(111111,999999);
|
||||
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
|
||||
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
|
||||
$gallery_info->border_color = $xml_obj->attrs->border_color;
|
||||
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
|
||||
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
|
||||
|
||||
$images_list = $xml_obj->attrs->images_list;
|
||||
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
|
||||
$gallery_info->images_list = explode("\n",trim($images_list));
|
||||
|
||||
// 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성
|
||||
if(Context::getResponseMethod() == 'XMLRPC') {
|
||||
$output = '';
|
||||
for($i=0;$i<count($gallery_info->images_list);$i++) {
|
||||
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$gallery_info->width = trim($matches[3][0]);
|
||||
if(!$gallery_info->width) $gallery_info->width = 400;
|
||||
|
||||
Context::set('gallery_info', $gallery_info);
|
||||
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
|
||||
else $tpl_file = 'slide_gallery.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Slide Show</title>
|
||||
<title xml:lang="ko">기본 이미지 갤러리</title>
|
||||
<title xml:lang="jp">デフォルトイメージギャラリー</title>
|
||||
<title xml:lang="zh-CN">图片相册</title>
|
||||
<title xml:lang="en">Basic Image Gallery</title>
|
||||
<title xml:lang="es">Galería de imágenes básicos</title>
|
||||
<title xml:lang="ru">Базовая галлерея изображений</title>
|
||||
<title xml:lang="zh-TW">預設圖片相簿</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo ra một Slide Show theo dạng danh sách hoặc Slide từ những hình ảnh đính kèm của mình.</description>
|
||||
<description xml:lang="ko">첨부된 이미지파일을 이용하여 슬라이드/목록형 이미지 갤러리를 만들 수 있습니다.</description>
|
||||
<description xml:lang="jp">添付されたイメージファイルを利用して、スライド型・リスト型のイメージギャラリーが作成できます。</description>
|
||||
<description xml:lang="zh-CN">利用上传的图片文件实现幻灯片式或目录型相册图片。</description>
|
||||
<description xml:lang="en">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="es">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="ru">Это может создать гллерею изображений в стиле слайдов/списка, используя вложенный файл изображения.</description>
|
||||
<description xml:lang="zh-TW">將上傳的圖片以投影片或列表的形式實現。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Slide Show</title>
|
||||
<title xml:lang="ko">기본 이미지 갤러리</title>
|
||||
<title xml:lang="jp">デフォルトイメージギャラリー</title>
|
||||
<title xml:lang="zh-CN">图片相册</title>
|
||||
<title xml:lang="en">Basic Image Gallery</title>
|
||||
<title xml:lang="es">Galería de imágenes básicos</title>
|
||||
<title xml:lang="ru">Базовая галлерея изображений</title>
|
||||
<title xml:lang="zh-TW">預設圖片相簿</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo ra một Slide Show theo dạng danh sách hoặc Slide từ những hình ảnh đính kèm của mình.</description>
|
||||
<description xml:lang="ko">첨부된 이미지파일을 이용하여 슬라이드/목록형 이미지 갤러리를 만들 수 있습니다.</description>
|
||||
<description xml:lang="jp">添付されたイメージファイルを利用して、スライド型・リスト型のイメージギャラリーが作成できます。</description>
|
||||
<description xml:lang="zh-CN">利用上传的图片文件实现幻灯片式或目录型相册图片。</description>
|
||||
<description xml:lang="en">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="es">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="ru">Это может создать гллерею изображений в стиле слайдов/списка, используя вложенный файл изображения.</description>
|
||||
<description xml:lang="zh-TW">將上傳的圖片以投影片或列表的形式實現。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージギャラリー(image_gallery)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_gallery = "イメージギャラリー作成";
|
||||
$lang->width = "横幅サイズ";
|
||||
$lang->height = "縦幅サイズ";
|
||||
$lang->image_list = "イメージリスト";
|
||||
$lang->gallery_style = "ギャラリースタイル";
|
||||
$lang->gallery_slide_style = "スライドスタイル";
|
||||
$lang->gallery_slide_align = "アライン位置";
|
||||
$lang->gallery_slide_center = "中央揃え";
|
||||
$lang->gallery_slide_left = "左揃え";
|
||||
$lang->gallery_slide_right = "右揃え";
|
||||
$lang->gallery_list_style = "展開表示(リスト)";
|
||||
$lang->gallery_border_color = "ボーダーカラー";
|
||||
$lang->gallery_border_thickness = "ボーダー";
|
||||
$lang->gallery_bg_color = "背景色";
|
||||
$lang->about_image_list = "イメージギャラリーに追加するファイルを選択して下さい。選択した後、ドラッグまたは「Shift+クリック(範囲選択)、Ctrl+クリック(個別選択)」が出来ます。";
|
||||
|
||||
$lang->cmd_gallery_prev = "前のイメージ表示";
|
||||
$lang->cmd_gallery_next = "次のイメージ表示";
|
||||
$lang->cmd_gallery_thumbnail = "サムネール表示";
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージギャラリー(image_gallery)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_gallery = "イメージギャラリー作成";
|
||||
$lang->width = "横幅サイズ";
|
||||
$lang->height = "縦幅サイズ";
|
||||
$lang->image_list = "イメージリスト";
|
||||
$lang->gallery_style = "ギャラリースタイル";
|
||||
$lang->gallery_slide_style = "スライドスタイル";
|
||||
$lang->gallery_slide_align = "アライン位置";
|
||||
$lang->gallery_slide_center = "中央揃え";
|
||||
$lang->gallery_slide_left = "左揃え";
|
||||
$lang->gallery_slide_right = "右揃え";
|
||||
$lang->gallery_list_style = "展開表示(リスト)";
|
||||
$lang->gallery_border_color = "ボーダーカラー";
|
||||
$lang->gallery_border_thickness = "ボーダー";
|
||||
$lang->gallery_bg_color = "背景色";
|
||||
$lang->about_image_list = "イメージギャラリーに追加するファイルを選択して下さい。選択した後、ドラッグまたは「Shift+クリック(範囲選択)、Ctrl+クリック(個別選択)」が出来ます。";
|
||||
|
||||
$lang->cmd_gallery_prev = "前のイメージ表示";
|
||||
$lang->cmd_gallery_next = "次のイメージ表示";
|
||||
$lang->cmd_gallery_thumbnail = "サムネール表示";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지갤러리(image_gallery) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_gallery = '이미지 갤러리 제작';
|
||||
$lang->width = '가로';
|
||||
$lang->height = '세로';
|
||||
$lang->image_list = '이미지 목록';
|
||||
$lang->gallery_style = '갤러리 형식 ';
|
||||
$lang->gallery_slide_style = '슬라이드 형식';
|
||||
$lang->gallery_slide_align = '정렬방식';
|
||||
$lang->gallery_slide_center = '가운데';
|
||||
$lang->gallery_slide_left = '왼쪽';
|
||||
$lang->gallery_slide_right = '오른쪽';
|
||||
$lang->gallery_list_style = '모두 펼침';
|
||||
$lang->gallery_border_color = '테두리 색';
|
||||
$lang->gallery_border_thickness = '테두리 두께';
|
||||
$lang->gallery_bg_color = '배경색';
|
||||
$lang->about_image_list = '이미지 갤러리에 추가할 파일을 선택하세요. 선택 후 드래그 또는 shift+클릭(범위선택), ctrl+클릭(개별선택) 가능합니다.';
|
||||
|
||||
$lang->cmd_gallery_prev = '이전 그림 보기';
|
||||
$lang->cmd_gallery_next = '다음 그림 보기';
|
||||
$lang->cmd_gallery_thumbnail = '썸네일 보기';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지갤러리(image_gallery) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_gallery = '이미지 갤러리 제작';
|
||||
$lang->width = '가로';
|
||||
$lang->height = '세로';
|
||||
$lang->image_list = '이미지 목록';
|
||||
$lang->gallery_style = '갤러리 형식 ';
|
||||
$lang->gallery_slide_style = '슬라이드 형식';
|
||||
$lang->gallery_slide_align = '정렬방식';
|
||||
$lang->gallery_slide_center = '가운데';
|
||||
$lang->gallery_slide_left = '왼쪽';
|
||||
$lang->gallery_slide_right = '오른쪽';
|
||||
$lang->gallery_list_style = '모두 펼침';
|
||||
$lang->gallery_border_color = '테두리 색';
|
||||
$lang->gallery_border_thickness = '테두리 두께';
|
||||
$lang->gallery_bg_color = '배경색';
|
||||
$lang->about_image_list = '이미지 갤러리에 추가할 파일을 선택하세요. 선택 후 드래그 또는 shift+클릭(범위선택), ctrl+클릭(개별선택) 가능합니다.';
|
||||
|
||||
$lang->cmd_gallery_prev = '이전 그림 보기';
|
||||
$lang->cmd_gallery_next = '다음 그림 보기';
|
||||
$lang->cmd_gallery_thumbnail = '썸네일 보기';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/ru.lang.php
|
||||
* @author zero <zero@nzeo.com> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com) | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
|
||||
░░ * @Website: http://vietxe.net ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 网页编辑器(editor) 模块 > 图像(image_gallery) 组件的语言包
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 網頁編輯器(editor) 模組 > 圖片(image_gallery) 組件的語言
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,82 +1,82 @@
|
|||
/**
|
||||
* @file list_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author zero (zero@nzeo.com)
|
||||
**/
|
||||
|
||||
// 이미지갤러리쇼를 하기 위한 변수
|
||||
var list_gallery_images = new Array();
|
||||
|
||||
// 이미지갤러리쇼 이미지 목록에 추가
|
||||
function list_gallery_add_image(srl, image_url) {
|
||||
if(!image_url) return;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
var obj = {"srl":0, "image_url":null, "image":null}
|
||||
|
||||
// list_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
|
||||
if(typeof(list_gallery_images[srl])=="undefined") list_gallery_images[srl] = new Array();
|
||||
|
||||
// 이미지갤러리쇼 고유번호를 세팅
|
||||
obj.srl = srl;
|
||||
obj.idx = list_gallery_images[srl].length;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
obj.image = new Image();
|
||||
obj.image.src = image_url;
|
||||
obj.image.srl = obj.srl;
|
||||
obj.image.idx = obj.idx;
|
||||
|
||||
// 생성된 객체를 list_gallery_images[이미지갤러리쇼 고유번호]에 추가
|
||||
list_gallery_images[srl][list_gallery_images[srl].length] = obj;
|
||||
}
|
||||
|
||||
// 이미지갤러리쇼 시작
|
||||
function start_list_gallery() {
|
||||
|
||||
// 등록된 모든 이미지 목록을 돌면서 목록을 만들어줌
|
||||
for(var srl in list_gallery_images) {
|
||||
|
||||
// 등록된 이미지가 없으면 pass~
|
||||
if(!list_gallery_images[srl].length) continue;
|
||||
|
||||
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
|
||||
var zone = xGetElementById('zone_list_gallery_'+srl);
|
||||
|
||||
// 갤러리 외부 박스보다 이미지가 클 경우 resizing시킴
|
||||
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
|
||||
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
|
||||
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
|
||||
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
|
||||
|
||||
var zone_width = xWidth(zone)-borderLeft-borderRight;
|
||||
|
||||
// 이미지 출력
|
||||
for(var i=0; i<list_gallery_images[srl].length;i++) {
|
||||
var obj = list_gallery_images[srl][i];
|
||||
var image_width = obj.image.width;
|
||||
var image_height = obj.image.height;
|
||||
var resize_scale = 1;
|
||||
|
||||
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력
|
||||
if(image_width>(zone_width-25)) {
|
||||
resize_scale = (zone_width-25)/image_width;
|
||||
image_width = parseInt(image_width*resize_scale,10);
|
||||
image_height = parseInt(image_height*resize_scale,10);
|
||||
}
|
||||
|
||||
obj.image.style.width = image_width+"px";
|
||||
obj.image.style.height = image_height+"px";
|
||||
obj.image.style.marginLeft = "10px";
|
||||
obj.image.style.marginBottom = "10px";
|
||||
obj.image.style.display = "block";
|
||||
|
||||
// 리사이즈 되었다면 resize_image 애드온의 slideshow() 기능 사용
|
||||
if(resize_scale != 1) obj.image.rel = 'xe_gallery';
|
||||
|
||||
zone.appendChild(obj.image);
|
||||
}
|
||||
zone.style.paddingTop = "10px";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @file list_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
|
||||
// 이미지갤러리쇼를 하기 위한 변수
|
||||
var list_gallery_images = new Array();
|
||||
|
||||
// 이미지갤러리쇼 이미지 목록에 추가
|
||||
function list_gallery_add_image(srl, image_url) {
|
||||
if(!image_url) return;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
var obj = {"srl":0, "image_url":null, "image":null}
|
||||
|
||||
// list_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
|
||||
if(typeof(list_gallery_images[srl])=="undefined") list_gallery_images[srl] = new Array();
|
||||
|
||||
// 이미지갤러리쇼 고유번호를 세팅
|
||||
obj.srl = srl;
|
||||
obj.idx = list_gallery_images[srl].length;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
obj.image = new Image();
|
||||
obj.image.src = image_url;
|
||||
obj.image.srl = obj.srl;
|
||||
obj.image.idx = obj.idx;
|
||||
|
||||
// 생성된 객체를 list_gallery_images[이미지갤러리쇼 고유번호]에 추가
|
||||
list_gallery_images[srl][list_gallery_images[srl].length] = obj;
|
||||
}
|
||||
|
||||
// 이미지갤러리쇼 시작
|
||||
function start_list_gallery() {
|
||||
|
||||
// 등록된 모든 이미지 목록을 돌면서 목록을 만들어줌
|
||||
for(var srl in list_gallery_images) {
|
||||
|
||||
// 등록된 이미지가 없으면 pass~
|
||||
if(!list_gallery_images[srl].length) continue;
|
||||
|
||||
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
|
||||
var zone = xGetElementById('zone_list_gallery_'+srl);
|
||||
|
||||
// 갤러리 외부 박스보다 이미지가 클 경우 resizing시킴
|
||||
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
|
||||
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
|
||||
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
|
||||
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
|
||||
|
||||
var zone_width = xWidth(zone)-borderLeft-borderRight;
|
||||
|
||||
// 이미지 출력
|
||||
for(var i=0; i<list_gallery_images[srl].length;i++) {
|
||||
var obj = list_gallery_images[srl][i];
|
||||
var image_width = obj.image.width;
|
||||
var image_height = obj.image.height;
|
||||
var resize_scale = 1;
|
||||
|
||||
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력
|
||||
if(image_width>(zone_width-25)) {
|
||||
resize_scale = (zone_width-25)/image_width;
|
||||
image_width = parseInt(image_width*resize_scale,10);
|
||||
image_height = parseInt(image_height*resize_scale,10);
|
||||
}
|
||||
|
||||
obj.image.style.width = image_width+"px";
|
||||
obj.image.style.height = image_height+"px";
|
||||
obj.image.style.marginLeft = "10px";
|
||||
obj.image.style.marginBottom = "10px";
|
||||
obj.image.style.display = "block";
|
||||
|
||||
// 리사이즈 되었다면 resize_image 애드온의 slideshow() 기능 사용
|
||||
if(resize_scale != 1) obj.image.rel = 'xe_gallery';
|
||||
|
||||
zone.appendChild(obj.image);
|
||||
}
|
||||
zone.style.paddingTop = "10px";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,196 +1,196 @@
|
|||
/**
|
||||
* @file slide_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author zero (zero@nzeo.com)
|
||||
**/
|
||||
|
||||
// 이미지갤러리쇼를 하기 위한 변수
|
||||
var slide_gallery_images = new Array();
|
||||
var thumbnail_zone_height = new Array();
|
||||
|
||||
// 이미지갤러리쇼 이미지 목록에 추가
|
||||
function slide_gallery_add_image(srl, image_url) {
|
||||
if(!image_url) return;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
var obj = {"srl":0, "thumbnail_url":null, "thumbnail":null, "image_url":null, "image":null}
|
||||
|
||||
// slide_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
|
||||
if(typeof(slide_gallery_images[srl])=="undefined") slide_gallery_images[srl] = new Array();
|
||||
|
||||
// 이미지갤러리쇼 고유번호를 세팅
|
||||
obj.srl = srl;
|
||||
obj.idx = slide_gallery_images[srl].length;
|
||||
obj.image_url = image_url;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
obj.image = new Image();
|
||||
obj.image.src = image_url;
|
||||
//if(!obj.image.width) return;
|
||||
|
||||
// 썸네일 이미지를 미리 로딩
|
||||
obj.thumbnail = new Image();
|
||||
obj.thumbnail.src = image_url;
|
||||
obj.thumbnail.style.cursor = "pointer";
|
||||
obj.thumbnail.style.width = "60px";
|
||||
obj.thumbnail.style.height = "60px";
|
||||
obj.thumbnail.style.margin = "5px";
|
||||
obj.thumbnail.style.opacity = 0.5;
|
||||
obj.thumbnail.style.filter = "alpha(opacity=50)";
|
||||
|
||||
// 썸네일 클릭시 메인 이미지로 바꾸어줌
|
||||
xAddEventListener(obj.thumbnail, "mousedown", function() { display_gallery_image(obj) });
|
||||
|
||||
// 생성된 객체를 slide_gallery_images[이미지갤러리쇼 고유번호]에 추가
|
||||
slide_gallery_images[srl][slide_gallery_images[srl].length] = obj;
|
||||
}
|
||||
|
||||
// 이미지갤러리쇼 시작
|
||||
function start_slide_gallery() {
|
||||
|
||||
// 등록된 모든 이미지 목록을 돌면서 thumbnail 목록을 만들어줌
|
||||
for(var srl in slide_gallery_images) {
|
||||
|
||||
// 등록된 이미지가 없으면 pass~
|
||||
if(!slide_gallery_images[srl].length) continue;
|
||||
|
||||
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
|
||||
var zone_thumbnail = xGetElementById('zone_thumbnail_'+srl);
|
||||
|
||||
// 썸네일 출력
|
||||
for(var i=0; i<slide_gallery_images[srl].length;i++) {
|
||||
zone_thumbnail.appendChild(slide_gallery_images[srl][i].thumbnail);
|
||||
}
|
||||
thumbnail_zone_height[srl] = xHeight(zone_thumbnail)+20;
|
||||
|
||||
// 첫번째 이미지의 경우 큰 이미지 출력 시작 이미지 출력
|
||||
display_gallery_image(slide_gallery_images[srl][0],true);
|
||||
|
||||
// 로딩 텍스트 없앰
|
||||
xGetElementById("slide_gallery_loading_text_"+srl).style.display = "none";
|
||||
xGetElementById("slide_gallery_main_image_"+srl).style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
// 메인 이미지 표시
|
||||
function display_gallery_image(obj, is_first_display) {
|
||||
// 처음으로 요청되는지에 대한 검사
|
||||
if(typeof(is_first_display)=="undefined") is_first_display = false;
|
||||
|
||||
// 썸네일 영역
|
||||
var zone_thumbnail = xGetElementById('zone_thumbnail_'+obj.srl);
|
||||
|
||||
// 슬라이드 갤러리의 영역
|
||||
var zone = xGetElementById('zone_slide_gallery_' + obj.srl );
|
||||
|
||||
// 슬라이드 갤러리 영역의 정확한 크기를 위해서 border값 검사 (border는 조절 가능하기에)
|
||||
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
|
||||
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
|
||||
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
|
||||
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
|
||||
|
||||
// 갤러리 영역의 가로 길이 구함
|
||||
var zone_width = xWidth(zone)-borderLeft-borderRight;
|
||||
|
||||
// 이미지 크기가 갤러리 영역보다 클 경우를 계산하기 위한 비율 변수 설정
|
||||
var resize_scale = 1;
|
||||
|
||||
// 이미지의 크기 구함
|
||||
var image_width = obj.image.width;
|
||||
var image_height = obj.image.height;
|
||||
|
||||
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력 (ersize_scale 조절)
|
||||
if(image_width>(zone_width-20)) {
|
||||
resize_scale = (zone_width-20)/image_width;
|
||||
image_width = parseInt(image_width*resize_scale,10);
|
||||
image_height = parseInt(image_height*resize_scale,10);
|
||||
}
|
||||
var x = parseInt((zone_width - image_width)/2,10);
|
||||
|
||||
// 이미지 표시
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+obj.srl);
|
||||
|
||||
target_image.style.marginLeft = x+"px";
|
||||
|
||||
target_image.srl = obj.srl;
|
||||
target_image.idx = obj.idx;
|
||||
target_image.style.opacity = 1;
|
||||
target_image.style.filter = "alpha(opacity=100)";
|
||||
target_image.start_opacity = 0;
|
||||
xWidth(target_image, image_width);
|
||||
xHeight(target_image, image_height);
|
||||
target_image.src = obj.image.src;
|
||||
|
||||
if(image_height<200) {
|
||||
target_image.style.marginTop = (100-image_height/2)+"px";
|
||||
target_image.style.marginBottom = (100-image_height/2)+"px";
|
||||
} else {
|
||||
target_image.style.marginTop = "10px";
|
||||
target_image.style.marginBottom = "10px";
|
||||
}
|
||||
|
||||
if(typeof(showOriginalImage)=='function') {
|
||||
if(resize_scale!=1) {
|
||||
xAddEventListener(target_image, 'click', showOriginalImage);
|
||||
target_image.style.cursor = 'pointer';
|
||||
} else {
|
||||
xRemoveEventListener(target_image, 'click', showOriginalImage);
|
||||
target_image.style.cursor = 'default';
|
||||
}
|
||||
}
|
||||
|
||||
// resize_scale이 1이 아니면, 즉 리사이즈 되었다면 해당 이미지 클릭시 원본을 새창으로 띄워줌
|
||||
var next_idx = obj.idx+1;
|
||||
if(slide_gallery_images[obj.srl].length<=next_idx) next_idx = 0;
|
||||
|
||||
// srl의 모든 썸네일의 투명도 조절
|
||||
for(var i=0; i<slide_gallery_images[obj.srl].length;i++) {
|
||||
if(i==obj.idx) {
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 1;
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=100)";
|
||||
} else {
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 0.5;
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=50)";
|
||||
}
|
||||
}
|
||||
|
||||
// 파일 이름 추가
|
||||
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, "<a href='#' onclick=\"winopen('"+source_filename+"');return false;\">"+decodeURI(filename)+"</a>");
|
||||
|
||||
// 네이게이션 영역의 숫자 변경
|
||||
var zone_navigator = xGetElementById("zone_gallery_navigator_status_"+obj.srl);
|
||||
var html = (obj.idx+1) + " / " + slide_gallery_images[obj.srl].length;
|
||||
xInnerHtml(zone_navigator, html);
|
||||
}
|
||||
|
||||
// 이전 보기
|
||||
function gallery_view_prev(srl) {
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
|
||||
var idx = target_image.idx;
|
||||
var max_length = slide_gallery_images[srl].length;
|
||||
idx--;
|
||||
if(idx<0) idx = max_length-1;
|
||||
display_gallery_image(slide_gallery_images[srl][idx]);
|
||||
}
|
||||
|
||||
// 다음 보기
|
||||
function gallery_view_next(srl) {
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
|
||||
var idx = target_image.idx;
|
||||
var max_length = slide_gallery_images[srl].length;
|
||||
idx++;
|
||||
if(idx>max_length-1) idx = 0;
|
||||
display_gallery_image(slide_gallery_images[srl][idx]);
|
||||
}
|
||||
|
||||
// 썸네일 보기
|
||||
function gallery_view_thumbnail(srl) {
|
||||
var thumbnail_zone = xGetElementById("zone_thumbnail_"+srl);
|
||||
if(thumbnail_zone.style.display == "none") thumbnail_zone.style.display = "block";
|
||||
else thumbnail_zone.style.display = "none";
|
||||
}
|
||||
|
||||
/**
|
||||
* @file slide_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
|
||||
// 이미지갤러리쇼를 하기 위한 변수
|
||||
var slide_gallery_images = new Array();
|
||||
var thumbnail_zone_height = new Array();
|
||||
|
||||
// 이미지갤러리쇼 이미지 목록에 추가
|
||||
function slide_gallery_add_image(srl, image_url) {
|
||||
if(!image_url) return;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
var obj = {"srl":0, "thumbnail_url":null, "thumbnail":null, "image_url":null, "image":null}
|
||||
|
||||
// slide_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
|
||||
if(typeof(slide_gallery_images[srl])=="undefined") slide_gallery_images[srl] = new Array();
|
||||
|
||||
// 이미지갤러리쇼 고유번호를 세팅
|
||||
obj.srl = srl;
|
||||
obj.idx = slide_gallery_images[srl].length;
|
||||
obj.image_url = image_url;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
obj.image = new Image();
|
||||
obj.image.src = image_url;
|
||||
//if(!obj.image.width) return;
|
||||
|
||||
// 썸네일 이미지를 미리 로딩
|
||||
obj.thumbnail = new Image();
|
||||
obj.thumbnail.src = image_url;
|
||||
obj.thumbnail.style.cursor = "pointer";
|
||||
obj.thumbnail.style.width = "60px";
|
||||
obj.thumbnail.style.height = "60px";
|
||||
obj.thumbnail.style.margin = "5px";
|
||||
obj.thumbnail.style.opacity = 0.5;
|
||||
obj.thumbnail.style.filter = "alpha(opacity=50)";
|
||||
|
||||
// 썸네일 클릭시 메인 이미지로 바꾸어줌
|
||||
xAddEventListener(obj.thumbnail, "mousedown", function() { display_gallery_image(obj) });
|
||||
|
||||
// 생성된 객체를 slide_gallery_images[이미지갤러리쇼 고유번호]에 추가
|
||||
slide_gallery_images[srl][slide_gallery_images[srl].length] = obj;
|
||||
}
|
||||
|
||||
// 이미지갤러리쇼 시작
|
||||
function start_slide_gallery() {
|
||||
|
||||
// 등록된 모든 이미지 목록을 돌면서 thumbnail 목록을 만들어줌
|
||||
for(var srl in slide_gallery_images) {
|
||||
|
||||
// 등록된 이미지가 없으면 pass~
|
||||
if(!slide_gallery_images[srl].length) continue;
|
||||
|
||||
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
|
||||
var zone_thumbnail = xGetElementById('zone_thumbnail_'+srl);
|
||||
|
||||
// 썸네일 출력
|
||||
for(var i=0; i<slide_gallery_images[srl].length;i++) {
|
||||
zone_thumbnail.appendChild(slide_gallery_images[srl][i].thumbnail);
|
||||
}
|
||||
thumbnail_zone_height[srl] = xHeight(zone_thumbnail)+20;
|
||||
|
||||
// 첫번째 이미지의 경우 큰 이미지 출력 시작 이미지 출력
|
||||
display_gallery_image(slide_gallery_images[srl][0],true);
|
||||
|
||||
// 로딩 텍스트 없앰
|
||||
xGetElementById("slide_gallery_loading_text_"+srl).style.display = "none";
|
||||
xGetElementById("slide_gallery_main_image_"+srl).style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
// 메인 이미지 표시
|
||||
function display_gallery_image(obj, is_first_display) {
|
||||
// 처음으로 요청되는지에 대한 검사
|
||||
if(typeof(is_first_display)=="undefined") is_first_display = false;
|
||||
|
||||
// 썸네일 영역
|
||||
var zone_thumbnail = xGetElementById('zone_thumbnail_'+obj.srl);
|
||||
|
||||
// 슬라이드 갤러리의 영역
|
||||
var zone = xGetElementById('zone_slide_gallery_' + obj.srl );
|
||||
|
||||
// 슬라이드 갤러리 영역의 정확한 크기를 위해서 border값 검사 (border는 조절 가능하기에)
|
||||
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
|
||||
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
|
||||
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
|
||||
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
|
||||
|
||||
// 갤러리 영역의 가로 길이 구함
|
||||
var zone_width = xWidth(zone)-borderLeft-borderRight;
|
||||
|
||||
// 이미지 크기가 갤러리 영역보다 클 경우를 계산하기 위한 비율 변수 설정
|
||||
var resize_scale = 1;
|
||||
|
||||
// 이미지의 크기 구함
|
||||
var image_width = obj.image.width;
|
||||
var image_height = obj.image.height;
|
||||
|
||||
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력 (ersize_scale 조절)
|
||||
if(image_width>(zone_width-20)) {
|
||||
resize_scale = (zone_width-20)/image_width;
|
||||
image_width = parseInt(image_width*resize_scale,10);
|
||||
image_height = parseInt(image_height*resize_scale,10);
|
||||
}
|
||||
var x = parseInt((zone_width - image_width)/2,10);
|
||||
|
||||
// 이미지 표시
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+obj.srl);
|
||||
|
||||
target_image.style.marginLeft = x+"px";
|
||||
|
||||
target_image.srl = obj.srl;
|
||||
target_image.idx = obj.idx;
|
||||
target_image.style.opacity = 1;
|
||||
target_image.style.filter = "alpha(opacity=100)";
|
||||
target_image.start_opacity = 0;
|
||||
xWidth(target_image, image_width);
|
||||
xHeight(target_image, image_height);
|
||||
target_image.src = obj.image.src;
|
||||
|
||||
if(image_height<200) {
|
||||
target_image.style.marginTop = (100-image_height/2)+"px";
|
||||
target_image.style.marginBottom = (100-image_height/2)+"px";
|
||||
} else {
|
||||
target_image.style.marginTop = "10px";
|
||||
target_image.style.marginBottom = "10px";
|
||||
}
|
||||
|
||||
if(typeof(showOriginalImage)=='function') {
|
||||
if(resize_scale!=1) {
|
||||
xAddEventListener(target_image, 'click', showOriginalImage);
|
||||
target_image.style.cursor = 'pointer';
|
||||
} else {
|
||||
xRemoveEventListener(target_image, 'click', showOriginalImage);
|
||||
target_image.style.cursor = 'default';
|
||||
}
|
||||
}
|
||||
|
||||
// resize_scale이 1이 아니면, 즉 리사이즈 되었다면 해당 이미지 클릭시 원본을 새창으로 띄워줌
|
||||
var next_idx = obj.idx+1;
|
||||
if(slide_gallery_images[obj.srl].length<=next_idx) next_idx = 0;
|
||||
|
||||
// srl의 모든 썸네일의 투명도 조절
|
||||
for(var i=0; i<slide_gallery_images[obj.srl].length;i++) {
|
||||
if(i==obj.idx) {
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 1;
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=100)";
|
||||
} else {
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 0.5;
|
||||
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=50)";
|
||||
}
|
||||
}
|
||||
|
||||
// 파일 이름 추가
|
||||
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, "<a href='#' onclick=\"winopen('"+source_filename+"');return false;\">"+decodeURI(filename)+"</a>");
|
||||
|
||||
// 네이게이션 영역의 숫자 변경
|
||||
var zone_navigator = xGetElementById("zone_gallery_navigator_status_"+obj.srl);
|
||||
var html = (obj.idx+1) + " / " + slide_gallery_images[obj.srl].length;
|
||||
xInnerHtml(zone_navigator, html);
|
||||
}
|
||||
|
||||
// 이전 보기
|
||||
function gallery_view_prev(srl) {
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
|
||||
var idx = target_image.idx;
|
||||
var max_length = slide_gallery_images[srl].length;
|
||||
idx--;
|
||||
if(idx<0) idx = max_length-1;
|
||||
display_gallery_image(slide_gallery_images[srl][idx]);
|
||||
}
|
||||
|
||||
// 다음 보기
|
||||
function gallery_view_next(srl) {
|
||||
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
|
||||
var idx = target_image.idx;
|
||||
var max_length = slide_gallery_images[srl].length;
|
||||
idx++;
|
||||
if(idx>max_length-1) idx = 0;
|
||||
display_gallery_image(slide_gallery_images[srl][idx]);
|
||||
}
|
||||
|
||||
// 썸네일 보기
|
||||
function gallery_view_thumbnail(srl) {
|
||||
var thumbnail_zone = xGetElementById("zone_thumbnail_"+srl);
|
||||
if(thumbnail_zone.style.display == "none") thumbnail_zone.style.display = "block";
|
||||
else thumbnail_zone.style.display = "none";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,108 +1,108 @@
|
|||
<?php
|
||||
/**
|
||||
* @class image_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 이미지를 추가하거나 속성을 수정하는 컴포넌트
|
||||
**/
|
||||
|
||||
class image_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
$style = $xml_obj->attrs->style;
|
||||
$margin = (int)$xml_obj->attrs->margin;
|
||||
|
||||
if(!$alt) {
|
||||
$tmp_arr = explode('/',$src);
|
||||
$alt = array_pop($tmp_arr);
|
||||
}
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
if(!$alt) $alt = $src;
|
||||
// 이미지 주소를 request uri가 포함된 주소로 변환 (rss출력, 등등을 위함)
|
||||
$temp_src = explode('/', $src);
|
||||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
elseif(substr($src , 0, 1)=='/') {
|
||||
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
|
||||
else $http_src = 'http://';
|
||||
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
|
||||
}
|
||||
elseif(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
|
||||
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
if($alt) {
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
$attr_output[] = "title=\"".$alt."\"";
|
||||
}
|
||||
if($margin) {
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' margin:'.$margin.'px;';
|
||||
}
|
||||
if($align) $attr_output[] = "align=\"".$align."\"";
|
||||
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
|
||||
if($width) $attr_output[] = 'width="'.$width.'"';
|
||||
if($height) $attr_output[] = 'height="'.$height.'"';
|
||||
if($border) {
|
||||
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' border-style: solid; border-width:'.$border.'px;';
|
||||
}
|
||||
|
||||
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
|
||||
|
||||
if($link_url) {
|
||||
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
|
||||
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class image_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 이미지를 추가하거나 속성을 수정하는 컴포넌트
|
||||
**/
|
||||
|
||||
class image_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
$style = $xml_obj->attrs->style;
|
||||
$margin = (int)$xml_obj->attrs->margin;
|
||||
|
||||
if(!$alt) {
|
||||
$tmp_arr = explode('/',$src);
|
||||
$alt = array_pop($tmp_arr);
|
||||
}
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
if(!$alt) $alt = $src;
|
||||
// 이미지 주소를 request uri가 포함된 주소로 변환 (rss출력, 등등을 위함)
|
||||
$temp_src = explode('/', $src);
|
||||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
elseif(substr($src , 0, 1)=='/') {
|
||||
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
|
||||
else $http_src = 'http://';
|
||||
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
|
||||
}
|
||||
elseif(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
|
||||
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
if($alt) {
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
$attr_output[] = "title=\"".$alt."\"";
|
||||
}
|
||||
if($margin) {
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' margin:'.$margin.'px;';
|
||||
}
|
||||
if($align) $attr_output[] = "align=\"".$align."\"";
|
||||
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
|
||||
if($width) $attr_output[] = 'width="'.$width.'"';
|
||||
if($height) $attr_output[] = 'height="'.$height.'"';
|
||||
if($border) {
|
||||
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' border-style: solid; border-width:'.$border.'px;';
|
||||
}
|
||||
|
||||
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
|
||||
|
||||
if($link_url) {
|
||||
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
|
||||
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">이미지 추가</title>
|
||||
<title xml:lang="jp">イメージ追加</title>
|
||||
<title xml:lang="zh-CN">插入图像</title>
|
||||
<title xml:lang="en">Add Images</title>
|
||||
<title xml:lang="vi">Thêm hình ảnh</title>
|
||||
<title xml:lang="es">Añadir imágenes</title>
|
||||
<title xml:lang="ru">Добавление изображений</title>
|
||||
<title xml:lang="zh-TW">圖片連結</title>
|
||||
<description xml:lang="ko">에디터에 이미지를 추가하거나 속성을 변경할 수 있습니다.</description>
|
||||
<description xml:lang="jp">エディターでイメージの追加、属性の変更が出来ます。</description>
|
||||
<description xml:lang="zh-CN">可以插入图像或编辑其相应属性。</description>
|
||||
<description xml:lang="en">It can add an image to editor or change the attribution of image.</description>
|
||||
<description xml:lang="vi">Bạn có thể thêm hình ảnh để sửa hay chia sẻ.</description>
|
||||
<description xml:lang="es">Se puede añadir una imagen a editor o cambiar la atribución de la imagen.</description>
|
||||
<description xml:lang="ru">Это может добавить изображение в редактор или изменить параметры изображения.</description>
|
||||
<description xml:lang="zh-TW">可以新增或編輯其相關屬性。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">이미지 추가</title>
|
||||
<title xml:lang="jp">イメージ追加</title>
|
||||
<title xml:lang="zh-CN">插入图像</title>
|
||||
<title xml:lang="en">Add Images</title>
|
||||
<title xml:lang="vi">Thêm hình ảnh</title>
|
||||
<title xml:lang="es">Añadir imágenes</title>
|
||||
<title xml:lang="ru">Добавление изображений</title>
|
||||
<title xml:lang="zh-TW">圖片連結</title>
|
||||
<description xml:lang="ko">에디터에 이미지를 추가하거나 속성을 변경할 수 있습니다.</description>
|
||||
<description xml:lang="jp">エディターでイメージの追加、属性の変更が出来ます。</description>
|
||||
<description xml:lang="zh-CN">可以插入图像或编辑其相应属性。</description>
|
||||
<description xml:lang="en">It can add an image to editor or change the attribution of image.</description>
|
||||
<description xml:lang="vi">Bạn có thể thêm hình ảnh để sửa hay chia sẻ.</description>
|
||||
<description xml:lang="es">Se puede añadir una imagen a editor o cambiar la atribución de la imagen.</description>
|
||||
<description xml:lang="ru">Это может добавить изображение в редактор или изменить параметры изображения.</description>
|
||||
<description xml:lang="zh-TW">可以新增或編輯其相關屬性。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_link/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor Module > language pack of image_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_link/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor Module > language pack of image_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_link/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージリンク(image_link)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_url = 'イメージパス';
|
||||
$lang->image_alt = '説明(Alt)入力';
|
||||
$lang->image_scale = 'イメージサイズ';
|
||||
$lang->image_align = 'アライン位置';
|
||||
$lang->image_align_normal = '一段落';
|
||||
$lang->image_align_left = '左揃え';
|
||||
$lang->image_align_middle = '中央揃え';
|
||||
$lang->image_align_right = '右揃え';
|
||||
$lang->image_border = 'ボーダー';
|
||||
$lang->image_margin = '外側の空白(Margin)';
|
||||
|
||||
$lang->urllink_open_window = '新しいウィンドウで開く';
|
||||
$lang->about_url_link_open_window = 'チェックすると、リンクをクリックする際、新しいウィンドウで開きます。';
|
||||
|
||||
$lang->cmd_get_scale = 'イメージサイズを計算';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_link/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージリンク(image_link)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_url = 'イメージパス';
|
||||
$lang->image_alt = '説明(Alt)入力';
|
||||
$lang->image_scale = 'イメージサイズ';
|
||||
$lang->image_align = 'アライン位置';
|
||||
$lang->image_align_normal = '一段落';
|
||||
$lang->image_align_left = '左揃え';
|
||||
$lang->image_align_middle = '中央揃え';
|
||||
$lang->image_align_right = '右揃え';
|
||||
$lang->image_border = 'ボーダー';
|
||||
$lang->image_margin = '外側の空白(Margin)';
|
||||
|
||||
$lang->urllink_open_window = '新しいウィンドウで開く';
|
||||
$lang->about_url_link_open_window = 'チェックすると、リンクをクリックする際、新しいウィンドウで開きます。';
|
||||
|
||||
$lang->cmd_get_scale = 'イメージサイズを計算';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_link/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지링크(image_link) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_url = '이미지 경로';
|
||||
$lang->image_alt = '설명 입력';
|
||||
$lang->image_scale = '이미지 크기';
|
||||
$lang->image_align = '정렬 방법';
|
||||
$lang->image_align_normal = '한 문단을 차지';
|
||||
$lang->image_align_left = '글의 왼쪽으로';
|
||||
$lang->image_align_middle = '가운데';
|
||||
$lang->image_align_right = '글의 우측으로';
|
||||
$lang->image_border = '경계선 두께';
|
||||
$lang->image_margin = '바깥 여백';
|
||||
|
||||
$lang->urllink_open_window = '새 창 열기';
|
||||
$lang->about_url_link_open_window = '선택하시면 링크 선택 시 새 창으로 열립니다.';
|
||||
|
||||
$lang->cmd_get_scale = '가로세로 구하기';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_link/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지링크(image_link) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_url = '이미지 경로';
|
||||
$lang->image_alt = '설명 입력';
|
||||
$lang->image_scale = '이미지 크기';
|
||||
$lang->image_align = '정렬 방법';
|
||||
$lang->image_align_normal = '한 문단을 차지';
|
||||
$lang->image_align_left = '글의 왼쪽으로';
|
||||
$lang->image_align_middle = '가운데';
|
||||
$lang->image_align_right = '글의 우측으로';
|
||||
$lang->image_border = '경계선 두께';
|
||||
$lang->image_margin = '바깥 여백';
|
||||
|
||||
$lang->urllink_open_window = '새 창 열기';
|
||||
$lang->about_url_link_open_window = '선택하시면 링크 선택 시 새 창으로 열립니다.';
|
||||
|
||||
$lang->cmd_get_scale = '가로세로 구하기';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_link/lang/ru.lang.php
|
||||
* @author zero <zero@nzeo.com> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com) | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief editor Module > language pack of image_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
|
||||
░░ * @Website: http://vietxe.net ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_link/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 网页编辑器(editor) 模块 > 图像链接(image_link) 组件的语言包
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_link/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 網頁編輯器(editor)模組 > 圖片連結(image_link)組件語言
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">멀티미디어 자료 관리</title>
|
||||
<title xml:lang="jp">マルチメディア管理</title>
|
||||
<title xml:lang="zh-CN">多媒体</title>
|
||||
<title xml:lang="en">Manage Multimedia Data</title>
|
||||
<title xml:lang="es">Administrar datos multimedia </title>
|
||||
<title xml:lang="ru">Управление мультимедиа данными</title>
|
||||
<title xml:lang="zh-TW">多媒體管理</title>
|
||||
<title xml:lang="vi">Chèn Media vào bài viết</title>
|
||||
<description xml:lang="ko">에디터에 wmv,avi,flv등의 멀티미디어 자료를 추가하거나 속성을 수정할 수 있습니다.</description>
|
||||
<description xml:lang="jp">エディターに拡張子が「wmv,avi,flv」などのマルチメディアコンテンツを追加、または属性の修正ができます。</description>
|
||||
<description xml:lang="zh-CN">插入wmv,avi,flv等多媒体文件或修改其相应属性 。</description>
|
||||
<description xml:lang="en">It can add multimedia data like wmv,avi,flv to editor or change the attribution of multimedia data.</description>
|
||||
<description xml:lang="es">Se pueden agregar datos multimedia como wmv, avi, flv al editor o cambiar la atribución de datos multimedia.</description>
|
||||
<description xml:lang="ru">Это может добавить мультимедиа данные как wmv,avi,flv в редактор или изменить параметры данных мультимедиа.</description>
|
||||
<description xml:lang="zh-TW">可新增 wmv、avi、flv 等多媒體檔案或修改其相關屬性。</description>
|
||||
<description xml:lang="vi">Chèn Media dạng '.wmv,.avi,.flv,.mp3,.wma' vào bài viết.</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
<name xml:lang="vi">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="ko">멀티미디어 자료 관리</title>
|
||||
<title xml:lang="jp">マルチメディア管理</title>
|
||||
<title xml:lang="zh-CN">多媒体</title>
|
||||
<title xml:lang="en">Manage Multimedia Data</title>
|
||||
<title xml:lang="es">Administrar datos multimedia </title>
|
||||
<title xml:lang="ru">Управление мультимедиа данными</title>
|
||||
<title xml:lang="zh-TW">多媒體管理</title>
|
||||
<title xml:lang="vi">Chèn Media vào bài viết</title>
|
||||
<description xml:lang="ko">에디터에 wmv,avi,flv등의 멀티미디어 자료를 추가하거나 속성을 수정할 수 있습니다.</description>
|
||||
<description xml:lang="jp">エディターに拡張子が「wmv,avi,flv」などのマルチメディアコンテンツを追加、または属性の修正ができます。</description>
|
||||
<description xml:lang="zh-CN">插入wmv,avi,flv等多媒体文件或修改其相应属性 。</description>
|
||||
<description xml:lang="en">It can add multimedia data like wmv,avi,flv to editor or change the attribution of multimedia data.</description>
|
||||
<description xml:lang="es">Se pueden agregar datos multimedia como wmv, avi, flv al editor o cambiar la atribución de datos multimedia.</description>
|
||||
<description xml:lang="ru">Это может добавить мультимедиа данные как wmv,avi,flv в редактор или изменить параметры данных мультимедиа.</description>
|
||||
<description xml:lang="zh-TW">可新增 wmv、avi、flv 等多媒體檔案或修改其相關屬性。</description>
|
||||
<description xml:lang="vi">Chèn Media dạng '.wmv,.avi,.flv,.mp3,.wma' vào bài viết.</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
<name xml:lang="vi">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of multimedia_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of multimedia_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/multimedia_link/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > マルチメディアリンク((multimedia_link)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->multimedia_url = "マルチメディアのパス";
|
||||
$lang->multimedia_caption = "説明入力";
|
||||
$lang->multimedia_width = "横幅サイズ";
|
||||
$lang->multimedia_height = "縦幅サイズ";
|
||||
$lang->multimedia_auto_start = "自動再生";
|
||||
$lang->multimedia_wmode = '位置';
|
||||
|
||||
$lang->multimedia_wmode_window = '常に上へ';
|
||||
$lang->multimedia_wmode_opaque = '不透明背景';
|
||||
$lang->multimedia_wmode_transparent = '透明背景';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/multimedia_link/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > マルチメディアリンク((multimedia_link)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->multimedia_url = "マルチメディアのパス";
|
||||
$lang->multimedia_caption = "説明入力";
|
||||
$lang->multimedia_width = "横幅サイズ";
|
||||
$lang->multimedia_height = "縦幅サイズ";
|
||||
$lang->multimedia_auto_start = "自動再生";
|
||||
$lang->multimedia_wmode = '位置';
|
||||
|
||||
$lang->multimedia_wmode_window = '常に上へ';
|
||||
$lang->multimedia_wmode_opaque = '不透明背景';
|
||||
$lang->multimedia_wmode_transparent = '透明背景';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/multimedia_link/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 멀티미디어 링크 (multimedia_link) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->multimedia_url = '멀티미디어 경로';
|
||||
$lang->multimedia_caption = '설명 입력';
|
||||
$lang->multimedia_width = '가로';
|
||||
$lang->multimedia_height = '세로';
|
||||
$lang->multimedia_auto_start = '자동 시작';
|
||||
$lang->multimedia_wmode = '위치';
|
||||
|
||||
$lang->multimedia_wmode_window = '항상 위';
|
||||
$lang->multimedia_wmode_opaque = '배경 불투명';
|
||||
$lang->multimedia_wmode_transparent = '배경 투명';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/multimedia_link/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 위지윅에디터(editor) 모듈 > 멀티미디어 링크 (multimedia_link) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->multimedia_url = '멀티미디어 경로';
|
||||
$lang->multimedia_caption = '설명 입력';
|
||||
$lang->multimedia_width = '가로';
|
||||
$lang->multimedia_height = '세로';
|
||||
$lang->multimedia_auto_start = '자동 시작';
|
||||
$lang->multimedia_wmode = '위치';
|
||||
|
||||
$lang->multimedia_wmode_window = '항상 위';
|
||||
$lang->multimedia_wmode_opaque = '배경 불투명';
|
||||
$lang->multimedia_wmode_transparent = '배경 투명';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/ru.lang.php
|
||||
* @author zero <zero@nzeo.com>> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com)> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief editor module > language pack of multimedia_link component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
|
||||
░░ * @Website: http://vietxe.net ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 网页编辑器(editor) 模块 > 媒体链接 (multimedia_link) 组件的语言包
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 網頁編輯器(editor) 模組 > 多媒體連結 (multimedia_link) 組件的語言
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* @class multimedia_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
|
||||
**/
|
||||
|
||||
class multimedia_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function multimedia_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->multimedia_src;
|
||||
$style = $xml_obj->attrs->style;
|
||||
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
|
||||
$width = trim($matches[3][0]);
|
||||
$height = trim($matches[3][1]);
|
||||
if(!$width) $width = 400;
|
||||
if(!$height) $height = 400;
|
||||
|
||||
$auto_start = $xml_obj->attrs->auto_start;
|
||||
if($auto_start!="true") $auto_start = "false";
|
||||
else $auto_start = "true";
|
||||
|
||||
$wmode = $xml_obj->attrs->wmode;
|
||||
if($wmode == 'window') $wmode = 'window';
|
||||
elseif($wmode == 'opaque') $wmode = 'opaque';
|
||||
else $wmode = 'transparent';
|
||||
|
||||
|
||||
$caption = $xml_obj->body;
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
|
||||
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class multimedia_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
|
||||
**/
|
||||
|
||||
class multimedia_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function multimedia_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->multimedia_src;
|
||||
$style = $xml_obj->attrs->style;
|
||||
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
|
||||
$width = trim($matches[3][0]);
|
||||
$height = trim($matches[3][1]);
|
||||
if(!$width) $width = 400;
|
||||
if(!$height) $height = 400;
|
||||
|
||||
$auto_start = $xml_obj->attrs->auto_start;
|
||||
if($auto_start!="true") $auto_start = "false";
|
||||
else $auto_start = "true";
|
||||
|
||||
$wmode = $xml_obj->attrs->wmode;
|
||||
if($wmode == 'window') $wmode = 'window';
|
||||
elseif($wmode == 'opaque') $wmode = 'opaque';
|
||||
else $wmode = 'transparent';
|
||||
|
||||
|
||||
$caption = $xml_obj->body;
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
|
||||
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Thăm dò ý kiến</title>
|
||||
<title xml:lang="ko">설문조사 컴포넌트</title>
|
||||
<title xml:lang="jp">アンケート調査</title>
|
||||
<title xml:lang="zh-CN">投票调查</title>
|
||||
<title xml:lang="en">Poll Component</title>
|
||||
<title xml:lang="es">Componente Poll</title>
|
||||
<title xml:lang="ru">Компонент опросов</title>
|
||||
<title xml:lang="zh-TW">投票調查</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo một cuộc thăm dò cho chủ đề của mình.</description>
|
||||
<description xml:lang="ko">글 작성시에 설문조사를 첨부하실 수 있습니다. 설문조사 컴포넌트는 설문조사 모듈의 설정에 영향을 받습니다.</description>
|
||||
<description xml:lang="jp">書き込みの時、アンケート機能の追加ができます。アンケートモジュールの影響を受けます。</description>
|
||||
<description xml:lang="zh-CN">发表主题时可以附加投票调查。投票调查组件受投票调查模块设置的影响。</description>
|
||||
<description xml:lang="en">You can attach a poll on writing articles. Poll component is affected by setting of poll module.</description>
|
||||
<description xml:lang="es">Puede adjuntar una encuesta sobre la redacción de artículos. Encuesta componente se ve afectada por la configuración de módulo de encuesta.</description>
|
||||
<description xml:lang="ru">Вы можете присоединить опрос при написании статей. Компонент опросов зависит от настроек модуля отпросов.</description>
|
||||
<description xml:lang="zh-TW">發表主題時可以附加投票調查。投票調查組件受投票調查模組設置的影響。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Thăm dò ý kiến</title>
|
||||
<title xml:lang="ko">설문조사 컴포넌트</title>
|
||||
<title xml:lang="jp">アンケート調査</title>
|
||||
<title xml:lang="zh-CN">投票调查</title>
|
||||
<title xml:lang="en">Poll Component</title>
|
||||
<title xml:lang="es">Componente Poll</title>
|
||||
<title xml:lang="ru">Компонент опросов</title>
|
||||
<title xml:lang="zh-TW">投票調查</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo một cuộc thăm dò cho chủ đề của mình.</description>
|
||||
<description xml:lang="ko">글 작성시에 설문조사를 첨부하실 수 있습니다. 설문조사 컴포넌트는 설문조사 모듈의 설정에 영향을 받습니다.</description>
|
||||
<description xml:lang="jp">書き込みの時、アンケート機能の追加ができます。アンケートモジュールの影響を受けます。</description>
|
||||
<description xml:lang="zh-CN">发表主题时可以附加投票调查。投票调查组件受投票调查模块设置的影响。</description>
|
||||
<description xml:lang="en">You can attach a poll on writing articles. Poll component is affected by setting of poll module.</description>
|
||||
<description xml:lang="es">Puede adjuntar una encuesta sobre la redacción de artículos. Encuesta componente se ve afectada por la configuración de módulo de encuesta.</description>
|
||||
<description xml:lang="ru">Вы можете присоединить опрос при написании статей. Компонент опросов зависит от настроек модуля отпросов.</description>
|
||||
<description xml:lang="zh-TW">發表主題時可以附加投票調查。投票調查組件受投票調查模組設置的影響。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/poll_maker/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of poll_maker component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/poll_maker/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of poll_maker component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/urllink/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > アンケート調査言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->poll_title = "タイトル";
|
||||
$lang->poll_item = "項目";
|
||||
$lang->poll_stop_date = "終了日";
|
||||
$lang->poll_chk_count = "選択項目数";
|
||||
|
||||
$lang->cmd_add_poll = "アンケート追加";
|
||||
$lang->cmd_del_poll = "アンケート削除";
|
||||
$lang->cmd_add_item = "項目追加";
|
||||
|
||||
$lang->msg_poll_cannot_modify = 'アンケートは修正出来ません。削除後、改めて新しく作成して下さい。';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/urllink/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > アンケート調査言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->poll_title = "タイトル";
|
||||
$lang->poll_item = "項目";
|
||||
$lang->poll_stop_date = "終了日";
|
||||
$lang->poll_chk_count = "選択項目数";
|
||||
|
||||
$lang->cmd_add_poll = "アンケート追加";
|
||||
$lang->cmd_del_poll = "アンケート削除";
|
||||
$lang->cmd_add_item = "項目追加";
|
||||
|
||||
$lang->msg_poll_cannot_modify = 'アンケートは修正出来ません。削除後、改めて新しく作成して下さい。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/urllink/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 설문조사 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->poll_title = '제목';
|
||||
$lang->poll_item = '항목';
|
||||
$lang->poll_stop_date = '종료 일자';
|
||||
$lang->poll_chk_count = '선택항목 수';
|
||||
|
||||
$lang->cmd_add_poll = '설문 추가';
|
||||
$lang->cmd_del_poll = '설문 제거';
|
||||
$lang->cmd_add_item = '항목 추가';
|
||||
|
||||
$lang->msg_poll_cannot_modify = '설문조사는 수정하실 수 없습니다. 삭제 후 다시 생성하셔야 합니다.';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/urllink/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 위지윅에디터(editor) 모듈 > 설문조사 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->poll_title = '제목';
|
||||
$lang->poll_item = '항목';
|
||||
$lang->poll_stop_date = '종료 일자';
|
||||
$lang->poll_chk_count = '선택항목 수';
|
||||
|
||||
$lang->cmd_add_poll = '설문 추가';
|
||||
$lang->cmd_del_poll = '설문 제거';
|
||||
$lang->cmd_add_item = '항목 추가';
|
||||
|
||||
$lang->msg_poll_cannot_modify = '설문조사는 수정하실 수 없습니다. 삭제 후 다시 생성하셔야 합니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/poll_maker/lang/ru.lang.php
|
||||
* @author zero <zero@nzeo.com> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com) | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief editor module > language pack of poll_maker component
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
|
||||
░░ * @Website: http://vietxe.net ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 网页编辑器(editor) 模块 > 投票调查组件语言包
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 網頁編輯器(editor) 模組 > 投票調查組件語言
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* @class poll_maker
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공.
|
||||
**/
|
||||
|
||||
class poll_maker extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function poll_maker($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 설문조사 스킨을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins("./modules/poll/");
|
||||
Context::set('skin_list', $skin_list);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$poll_srl = $xml_obj->attrs->poll_srl;
|
||||
$skin = $xml_obj->attrs->skin;
|
||||
if(!$skin) $skin = 'default';
|
||||
|
||||
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$width = $matches[2];
|
||||
if(!$width) $width = 400;
|
||||
$style = sprintf('width:%dpx', $width);
|
||||
|
||||
// poll model 객체 생성해서 html 얻어와서 return
|
||||
$oPollModel = &getModel('poll');
|
||||
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class poll_maker
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공.
|
||||
**/
|
||||
|
||||
class poll_maker extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function poll_maker($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 설문조사 스킨을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins("./modules/poll/");
|
||||
Context::set('skin_list', $skin_list);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$poll_srl = $xml_obj->attrs->poll_srl;
|
||||
$skin = $xml_obj->attrs->skin;
|
||||
if(!$skin) $skin = 'default';
|
||||
|
||||
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$width = $matches[2];
|
||||
if(!$width) $width = 400;
|
||||
$style = sprintf('width:%dpx', $width);
|
||||
|
||||
// poll model 객체 생성해서 html 얻어와서 return
|
||||
$oPollModel = &getModel('poll');
|
||||
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue