git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-12 03:59:52 +00:00
commit 8326004cb2
2773 changed files with 91485 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<component version="0.1">
<title xml:lang="ko">멀티미디어 자료 관리</title>
<title xml:lang="jp">マルチメディア管理</title>
<title xml:lang="zh-CN">多媒体</title>
<title xml:lang="en">Manage Multimedia Data</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="jp">Zero</name>
<name xml:lang="zh-CN">zero</name>
<name xml:lang="en">zero</name>
<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>
</author>
</component>

View file

@ -0,0 +1,13 @@
<?php
/**
* @file /modules/editor/components/multimedia_link/lang/en.lang.php
* @author zero <zero@nzeo.com>
* @brief editor module > language pack of multimedia_link component
**/
$lang->multimedia_url = "Multimedia Path";
$lang->multimedia_caption = "Input Description";
$lang->multimedia_width = "Width";
$lang->multimedia_height = "Height";
$lang->multimedia_auto_start = "Auto Start";
?>

View file

@ -0,0 +1,13 @@
<?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 = "自動再生";
?>

View file

@ -0,0 +1,13 @@
<?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 = "자동시작";
?>

View file

@ -0,0 +1,13 @@
<?php
/**
* @file /modules/editor/components/multimedia_link/lang/zh-CN.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 = "自动播放";
?>

View file

@ -0,0 +1,63 @@
<?php
/**
* @class multimedia_link
* @author zero (zero@nzeo.com)
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
**/
class multimedia_link extends EditorHandler {
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
var $upload_target_srl = 0;
var $component_path = '';
/**
* @brief upload_target_srl과 컴포넌트의 경로를 받음
**/
function multimedia_link($upload_target_srl, $component_path) {
$this->upload_target_srl = $upload_target_srl;
$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";
$caption = $xml_obj->body;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
return sprintf("<div><script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\",%s);</script></div>", $src, $width, $height, $auto_start);
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,2 @@
@charset "utf-8";
@import url(../../../../../../modules/admin/tpl/css/admin.css);

View file

@ -0,0 +1,42 @@
<!--%import("popup.js")-->
<!--%import("popup.css")-->
<!--%import("../lang")-->
<div id="popHeadder">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
</div>
<form action="./" method="get" onSubmit="return false" id="fo">
<div id="popBody">
<table cellspacing="0" class="tableType5">
<col width="150" />
<col />
<tr>
<th scope="row">{$lang->multimedia_url}</th>
<td><input type="text" class="inputTypeText w100" id="multimedia_url" value="{$manual_url}" /></td>
</tr>
<tr>
<th scope="row">{$lang->multimedia_caption}</th>
<td><input type="text" class="inputTypeText w100" id="multimedia_caption" value="" /></td>
</tr>
<tr>
<th scope="row">{$lang->multimedia_width}</th>
<td><input type="text" class="inputTypeText" size="3" id="multimedia_width" value="400" />px</td>
</tr>
<tr>
<th scope="row">{$lang->multimedia_height}</th>
<td><input type="text" class="inputTypeText" size="3" id="multimedia_height" value="400" />px</td>
</tr>
<tr>
<th scope="row">{$lang->multimedia_auto_start}</th>
<td><input type="checkbox" id="multimedia_auto_start" value="Y" /></td>
</tr>
</table>
</div>
<div id="popFooter" class="tCenter">
<a href="#" onclick="insertMultimedia()" class="button"><span>{$lang->cmd_insert}</span></a>
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
<a href="#" onclick="winopen('./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;" class="button"><span>{$lang->about_component}</span></a>
</div>
</form>

View file

@ -0,0 +1,60 @@
/**
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
function getMultimedia() {
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
if(typeof(opener)=="undefined") return;
var node = opener.editorPrevNode;
if(!node || node.nodeName != "IMG") return;
var url = node.getAttribute("multimedia_src");
var caption = node.getAttribute("alt");
var width = xWidth(node);
var height = xHeight(node);
var auto_start = node.getAttribute("auto_start");
xGetElementById("multimedia_url").value = url;
xGetElementById("multimedia_caption").value = caption;
xGetElementById("multimedia_width").value = width-4;
xGetElementById("multimedia_height").value = height-4;
if(auto_start=="true") xGetElementById("multimedia_auto_start").checked = true;
}
function insertMultimedia(obj) {
if(typeof(opener)=="undefined") return;
var url = xGetElementById("multimedia_url").value;
url = url.replace(request_uri,'');
var caption = xGetElementById("multimedia_caption").value;
var width = xGetElementById("multimedia_width").value;
if(!width) width = 400;
var height = xGetElementById("multimedia_height").value;
if(!height) height= 400;
var auto_start = "false";
if(xGetElementById("multimedia_auto_start").checked) auto_start = "true";
if(!url) {
window.close();
return;
}
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\""+auto_start+"\" alt=\""+caption+"\" />";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
opener.editorFocus(opener.editorPrevSrl);
window.close();
}
xAddEventListener(window, "load", getMultimedia);