삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
41
modules/editor/components/emoticon/emoticon.class.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* @class emoticon
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 이모티콘 이미지 연결 컴포넌트
|
||||
**/
|
||||
|
||||
class emoticon extends EditorHandler {
|
||||
|
||||
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $upload_target_srl = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief upload_target_srl과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function emoticon($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);
|
||||
|
||||
// 이모티콘을 모두 가져옴
|
||||
$emoticon_list = FileHandler::readDir($tpl_path.'/images');
|
||||
Context::set('emoticon_list', $emoticon_list);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
BIN
modules/editor/components/emoticon/icon.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
17
modules/editor/components/emoticon/info.xml
Normal 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">Display Emoticons</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">이모티콘을 에디터에 삽입할 수 있습니다.</description>
|
||||
<description xml:lang="jp">顔文字(イモティコン)をエディターに追加することができます。</description>
|
||||
<description xml:lang="zh-CN">可以插入表情图标到编辑器。</description>
|
||||
<description xml:lang="en">It can insert emoticons to editor.</description>
|
||||
</author>
|
||||
</component>
|
||||
BIN
modules/editor/components/emoticon/tpl/images/msn001.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn002.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn003.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn004.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn005.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn006.gif
Normal file
|
After Width: | Height: | Size: 1,022 B |
BIN
modules/editor/components/emoticon/tpl/images/msn007.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn008.gif
Normal file
|
After Width: | Height: | Size: 1,015 B |
BIN
modules/editor/components/emoticon/tpl/images/msn009.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn010.gif
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn011.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn012.gif
Normal file
|
After Width: | Height: | Size: 1,015 B |
BIN
modules/editor/components/emoticon/tpl/images/msn013.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn014.gif
Normal file
|
After Width: | Height: | Size: 1,022 B |
BIN
modules/editor/components/emoticon/tpl/images/msn015.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn016.gif
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
modules/editor/components/emoticon/tpl/images/msn017.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn018.gif
Normal file
|
After Width: | Height: | Size: 944 B |
BIN
modules/editor/components/emoticon/tpl/images/msn019.gif
Normal file
|
After Width: | Height: | Size: 1,013 B |
BIN
modules/editor/components/emoticon/tpl/images/msn020.gif
Normal file
|
After Width: | Height: | Size: 975 B |
BIN
modules/editor/components/emoticon/tpl/images/msn021.gif
Normal file
|
After Width: | Height: | Size: 1,007 B |
BIN
modules/editor/components/emoticon/tpl/images/msn022.gif
Normal file
|
After Width: | Height: | Size: 1,016 B |
BIN
modules/editor/components/emoticon/tpl/images/msn023.gif
Normal file
|
After Width: | Height: | Size: 977 B |
BIN
modules/editor/components/emoticon/tpl/images/msn024.gif
Normal file
|
After Width: | Height: | Size: 989 B |
BIN
modules/editor/components/emoticon/tpl/images/msn025.gif
Normal file
|
After Width: | Height: | Size: 980 B |
BIN
modules/editor/components/emoticon/tpl/images/msn026.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn027.gif
Normal file
|
After Width: | Height: | Size: 971 B |
BIN
modules/editor/components/emoticon/tpl/images/msn028.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn029.gif
Normal file
|
After Width: | Height: | Size: 968 B |
BIN
modules/editor/components/emoticon/tpl/images/msn030.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn031.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn032.gif
Normal file
|
After Width: | Height: | Size: 987 B |
BIN
modules/editor/components/emoticon/tpl/images/msn033.gif
Normal file
|
After Width: | Height: | Size: 992 B |
BIN
modules/editor/components/emoticon/tpl/images/msn034.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn035.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn036.gif
Normal file
|
After Width: | Height: | Size: 1,004 B |
BIN
modules/editor/components/emoticon/tpl/images/msn037.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn038.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/editor/components/emoticon/tpl/images/msn039.gif
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
modules/editor/components/emoticon/tpl/images/msn040.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
9
modules/editor/components/emoticon/tpl/popup.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import url(../../../../../../modules/admin/tpl/css/admin.css);
|
||||
|
||||
img.emoticon {
|
||||
margin:10px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
18
modules/editor/components/emoticon/tpl/popup.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
|
||||
<div id="popHeadder">
|
||||
<h1>{$component_info->title} ver. {$component_info->version}</h1>
|
||||
</div>
|
||||
|
||||
<div id="popBody">
|
||||
|
||||
<!--@foreach($emoticon_list as $emoticon)-->
|
||||
<img src="images/{$emoticon}" alt="emoticon" onclick="insertEmoticon(this); return false;" class="emoticon" />
|
||||
<!--@end-->
|
||||
|
||||
</div>
|
||||
|
||||
<div id="popFooter" class="tCenter">
|
||||
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
|
||||
</div>
|
||||
15
modules/editor/components/emoticon/tpl/popup.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
function insertEmoticon(obj) {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
|
||||
var url = obj.src.replace(request_uri,'');
|
||||
var text = "<img src=\""+url+"\" border=\"0\" alt=\"emoticon\" />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
}
|
||||