git-svn-id: http://xe-core.googlecode.com/svn/trunk@842 201d5d3c-b55e-5fd7-737f-ddc643e51545
42
modules/editor/components/emoticon/emoticon.class.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?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);
|
||||
|
||||
require_once("./classes/template/TemplateHandler.class.php");
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
BIN
modules/editor/components/emoticon/icon.gif
Normal file
|
After Width: | Height: | Size: 1,018 B |
8
modules/editor/components/emoticon/info.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component version="0.1">
|
||||
<title xml:lang="ko">이모티콘 출력</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">이모티콘을 에디터에 삽입할 수 있습니다.</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 |
45
modules/editor/components/emoticon/tpl/popup.css
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.editor_window {
|
||||
width:300px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.editor_emoticon {
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.editor_window img {
|
||||
margin:2px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.editor_title {
|
||||
font-size:10pt;
|
||||
font-weight:bold;
|
||||
clear:both;
|
||||
height:20px;
|
||||
background-color:#555555;
|
||||
color:#EFEFEF;
|
||||
vertical-align:middle;
|
||||
padding-top:5px;
|
||||
border-bottom:1px solid #000000;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.editor_button_area {
|
||||
border-top:1px solid #AAAAAA;
|
||||
text-align:center;
|
||||
background-color:#EEEEEE;
|
||||
padding:2px 0px 2px 0px;
|
||||
clear:both;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
height:18px;
|
||||
font-size:9pt;
|
||||
}
|
||||
17
modules/editor/components/emoticon/tpl/popup.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
|
||||
<div class="editor_window">
|
||||
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
||||
|
||||
<div class="editor_emoticon">
|
||||
<!--@foreach($emoticon_list as $emoticon)-->
|
||||
<img src="images/{$emoticon}" alt="emoticon" onclick="insertEmoticon(this); return false;" />
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<div class="editor_button_area">
|
||||
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertImage()" />
|
||||
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
|
||||
</div>
|
||||
</div>
|
||||
14
modules/editor/components/emoticon/tpl/popup.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function insertEmoticon(obj) {
|
||||
if(typeof(opener)=='undefined') return;
|
||||
|
||||
var text = "<img src=\""+obj.src+"\" 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();
|
||||
}
|
||||