diff --git a/common/js/common.js b/common/js/common.js index e3a052f50..0cf8ebaee 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -132,33 +132,26 @@ function toggleDisplay(obj, opt) { * @brief 멀티미디어 출력용 (IE에서 플래쉬/동영상 주변에 점선 생김 방지용) **/ function displayMultimedia(src, width, height, auto_start) { - var ext = src.split("."); - var type = ext[ext.length-1]; - if(auto_start) auto_start = "true"; else auto_start = "false"; var clsid = ""; var codebase = ""; var html = ""; - switch(type) { - case "flv" : - html = ""; - break; - case "swf" : - clsid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; - codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c-ab#version=6,0,29,0"; - html = ""+ - ""+ - ""+ - ""+ - ""+ - "<\/object>"; - break; - default : - html = ""+ - ""; - break; + + if(/\.swf/i.test(src)) { + clsid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; + codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c-ab#version=6,0,29,0"; + html = ""+ + ""+ + ""+ + ""+ + ""+ + "<\/object>"; + } else if(/\.flv/i.test(src)) { + html = ""; + } else { + html = ""; } document.writeln(html); diff --git a/plugins/styx_clock/conf/info.xml b/plugins/styx_clock/conf/info.xml new file mode 100644 index 000000000..ac9eada39 --- /dev/null +++ b/plugins/styx_clock/conf/info.xml @@ -0,0 +1,46 @@ + + + 플래시 시계 + + 스틱스 + 플래쉬로 된 시계를 출력합니다. + + + + 제목 + text + 시계내의 제목을 바꿀 수 있습니다. (공백으로 하면 나타나지 않습니다) + + + 가로길이 + text + 가로길이를 지정하실 수 있습니다. (기본 200) + + + 테마 + select + 흰색/검은색 배경색에 따라 조절하시면 됩니다. + + 흰색 배경 + white + + + 검은색 배경 + black + + + + 일자 표시 + select + 시계내에 일자를 표시하는 기능을 끄거나 캬실 수 있습니다. + + 나타냄 + + + + 숨김 + false + + + + diff --git a/plugins/styx_clock/skins/default/clock.html b/plugins/styx_clock/skins/default/clock.html new file mode 100644 index 000000000..636c4f7c8 --- /dev/null +++ b/plugins/styx_clock/skins/default/clock.html @@ -0,0 +1,3 @@ + diff --git a/plugins/styx_clock/skins/default/clock.swf b/plugins/styx_clock/skins/default/clock.swf new file mode 100644 index 000000000..55b677c4a Binary files /dev/null and b/plugins/styx_clock/skins/default/clock.swf differ diff --git a/plugins/styx_clock/skins/default/skin.xml b/plugins/styx_clock/skins/default/skin.xml new file mode 100644 index 000000000..0bccbfadf --- /dev/null +++ b/plugins/styx_clock/skins/default/skin.xml @@ -0,0 +1,13 @@ + + + 플래시 시계 기본 컬러셋 + + styx + 플래시 시계를 출력합니다. + + + + 기본 + + + diff --git a/plugins/styx_clock/styx_clock.class.php b/plugins/styx_clock/styx_clock.class.php new file mode 100644 index 000000000..ae52fa877 --- /dev/null +++ b/plugins/styx_clock/styx_clock.class.php @@ -0,0 +1,47 @@ +plugin_path, $args->skin); + Context::set('colorset', $args->colorset); + + // 템플릿 파일을 지정 + $tpl_file = 'clock'; + + // 플러그인 자체적으로 설정한 변수들을 체크 + $best = $args->best; + + $theme = $args->theme; + if($theme != "white") $theme = "black"; + + $day = $args->day; + if($day != "false") $day = "true"; + + $width = $args->width; + if(!$width) $width = 200; + $plugin_info->width = $width; + + $plugin_info->src = sprintf("%s/clock.swf?best=%s&theme=%s&day=%s", $tpl_path, $best, $theme, $day); + + Context::set('plugin_info', $plugin_info); + + // 템플릿 컴파일 + $oTemplate = &TemplateHandler::getInstance(); + return $oTemplate->compile($tpl_path, $tpl_file); + } + } +?>