From 6c66636dc9ccf6055fca0d5922b4b4ee787492dc Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 14 Mar 2007 11:39:28 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@439 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/template/TemplateHandler.class.php | 8 +++++++- layouts/sample_layout/layout.html | 4 ++-- plugins/newest_document/newest_document.class.php | 7 +++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 43bde19c9..cd77a54d8 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -285,6 +285,12 @@ // 플러그인의 이름을 구함 $plugin = $vars->plugin; unset($vars->plugin); + + // className, style attribute를 구해 놓음 + $className = $vars->class; + $style = $vars->style; + unset($vars->class); + unset($vars->style); // 플러그인의 변수들을 세팅 $vars_count = get_object_vars($vars); @@ -300,7 +306,7 @@ if(!$args) $args = null; // 플러그인 실행코드를 삽입 - return sprintf('', $plugin, $args); + return sprintf('
', $className?'class="'.$className.'" ':'', $style?'style="'.$style.'" ':'',$plugin, $args); } /** diff --git a/layouts/sample_layout/layout.html b/layouts/sample_layout/layout.html index 1a30b6c08..61525beb9 100644 --- a/layouts/sample_layout/layout.html +++ b/layouts/sample_layout/layout.html @@ -44,8 +44,6 @@ -
-
@@ -71,6 +69,8 @@
+ +
diff --git a/plugins/newest_document/newest_document.class.php b/plugins/newest_document/newest_document.class.php index 3498cf54a..1c8c2f3ba 100644 --- a/plugins/newest_document/newest_document.class.php +++ b/plugins/newest_document/newest_document.class.php @@ -9,6 +9,13 @@ class newest_document extends PluginHandler { + /** + * @brief 플러그인의 실행 부분 + * ./plugins/플러그인/conf/info.xml에 선언한 extra_vars를 args로 받는다 + **/ + function proc($args) { + } + } ?>