mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@102 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dec618986e
commit
64c18d84cd
7 changed files with 35 additions and 151 deletions
|
|
@ -6,12 +6,6 @@
|
|||
* @todo 미구현
|
||||
**/
|
||||
|
||||
class spam_filter extends AddOnHandler {
|
||||
|
||||
function proc(&$oModule, $oModuleInfo) {
|
||||
$oModule->setError(-1);
|
||||
$oModule->setMessage('error');
|
||||
}
|
||||
|
||||
class spam_filter extends AddOn {
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -8,54 +8,11 @@
|
|||
|
||||
class AddOn extends Object {
|
||||
|
||||
var $addon_name; ///< 실행하고자 하는 addon의 이름
|
||||
|
||||
/**
|
||||
* @brief 모듈에 등록된 애드온을 act값에 맞추어 정리
|
||||
**/
|
||||
function callAddOns(&$oModule, $oModuleInfo, $status) {
|
||||
if(!$oModuleInfo->isAddOnExists($status, Context::get('act'))) return;
|
||||
|
||||
$addon_list = $oModuleInfo->getAddOnList($status, Context::get('act'));
|
||||
$addon_cnt = count($addon_list);
|
||||
if(!$addon_cnt) return;
|
||||
|
||||
for($i=0; $i<$addon_cnt; $i++) {
|
||||
$addon_name = $addon_list[$i];
|
||||
|
||||
$oAddOn = new AddOn($addon_name);
|
||||
$oAddOn->proc($oModule, $oModuleInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief constructor
|
||||
**/
|
||||
function AddOn($addon_name) {
|
||||
$this->addon_name = $addon_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 실행
|
||||
**/
|
||||
function proc(&$oModule, $oModuleInfo) {
|
||||
// 해당 모듈을 읽어서 객체를 만듬
|
||||
$addon_file = sprintf('./addons/%s/%s.addon.php', $this->addon_name, $this->addon_name);
|
||||
|
||||
// 모듈 파일이 없으면 에러
|
||||
if(!file_exists($addon_file)) return;
|
||||
|
||||
// 모듈 파일을 include
|
||||
require_once($addon_file);
|
||||
|
||||
// 선택된 모듈의 instance는 eval string으로 처리
|
||||
$eval_str = sprintf('$oAddOn = new %s();', $this->addon_name);
|
||||
eval($eval_str);
|
||||
|
||||
// 애드온 실행
|
||||
$oAddOn->proc($oModule, $oModuleInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -7,44 +7,10 @@
|
|||
**/
|
||||
|
||||
class Layout extends Object {
|
||||
|
||||
var $layout_name; ///< 레이아웃의 이름
|
||||
var $layout_info; ///< 레이아웃의 정보
|
||||
|
||||
/**
|
||||
* @brief 레이아웃 정보를 구함
|
||||
* @brief constructor
|
||||
**/
|
||||
function callLayout(&$oModule, $oModuleInfo) {
|
||||
if($oModule->getActType() != 'disp') return;
|
||||
if(!$oModuleInfo->isLayoutExists()) return;
|
||||
|
||||
$oLayout = new Layout();
|
||||
$oLayout->proc($oModule, $oModuleInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 레이아웃 template을 실행하여 html코드로 변환
|
||||
**/
|
||||
function proc(&$oModule, $oModuleInfo) {
|
||||
$this->layout_info = $oModuleInfo->getLayout();
|
||||
$this->layout_name = $this->layout_info->layout_name;
|
||||
$this->layout_name = 'test';
|
||||
|
||||
// 해당 모듈을 읽어서 객체를 만듬
|
||||
$layout_file = sprintf('./layouts/%s/%s.layout.php', $this->layout_name, $this->layout_name);
|
||||
|
||||
// 모듈 파일이 없으면 에러
|
||||
if(!file_exists($layout_file)) return;
|
||||
|
||||
// 모듈 파일을 include
|
||||
require_once($layout_file);
|
||||
|
||||
// 선택된 모듈의 instance는 eval string으로 처리
|
||||
$eval_str = sprintf('$oLayout = new %s();', $this->layout_name);
|
||||
eval($eval_str);
|
||||
|
||||
// 애드온 실행
|
||||
$oLayout->proc($oModule, $oModuleInfo);
|
||||
function Layout() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @class AddOn
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief addon을 호출하여 실행
|
||||
* @todo 미구현
|
||||
**/
|
||||
|
||||
class AddOn extends Object {
|
||||
|
||||
var $addon_name; ///< 실행하고자 하는 addon의 이름
|
||||
|
||||
/**
|
||||
* @brief 모듈에 등록된 애드온을 act값에 맞추어 정리
|
||||
**/
|
||||
function callAddOns(&$oModule, $oModuleInfo, $status) {
|
||||
if(!$oModuleInfo->isAddOnExists($status, Context::get('act'))) return;
|
||||
|
||||
$addon_list = $oModuleInfo->getAddOnList($status, Context::get('act'));
|
||||
$addon_cnt = count($addon_list);
|
||||
if(!$addon_cnt) return;
|
||||
|
||||
for($i=0; $i<$addon_cnt; $i++) {
|
||||
$addon_name = $addon_list[$i];
|
||||
|
||||
$oAddOn = new AddOn($addon_name);
|
||||
$oAddOn->proc($oModule, $oModuleInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief constructor
|
||||
**/
|
||||
function AddOn($addon_name) {
|
||||
$this->addon_name = $addon_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 실행
|
||||
**/
|
||||
function proc(&$oModule, $oModuleInfo) {
|
||||
// 해당 모듈을 읽어서 객체를 만듬
|
||||
$addon_file = sprintf('./addons/%s/%s.addon.php', $this->addon_name, $this->addon_name);
|
||||
|
||||
// 모듈 파일이 없으면 에러
|
||||
if(!file_exists($addon_file)) return;
|
||||
|
||||
// 모듈 파일을 include
|
||||
require_once($addon_file);
|
||||
|
||||
// 선택된 모듈의 instance는 eval string으로 처리
|
||||
$eval_str = sprintf('$oAddOn = new %s();', $this->addon_name);
|
||||
eval($eval_str);
|
||||
|
||||
// 애드온 실행
|
||||
$oAddOn->proc($oModule, $oModuleInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
20
classes/plugin/Plugin.class.php
Normal file
20
classes/plugin/Plugin.class.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* @class Plugin
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief addon을 호출하여 실행
|
||||
* @todo 미구현
|
||||
**/
|
||||
|
||||
class Plugin extends Object {
|
||||
|
||||
/**
|
||||
* @brief constructor
|
||||
**/
|
||||
function Plugin($addon_name) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -6,10 +6,7 @@
|
|||
* @todo 미구현
|
||||
**/
|
||||
|
||||
class sample_layout extends LayoutHandler {
|
||||
function proc(&$oModule, $oModuleInfo) {
|
||||
$oModule->setHtml('레이아웃');
|
||||
}
|
||||
class sample_layout extends Layout {
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
11
plugins/addons/spam_filter/spam_filter.addon.php
Normal file
11
plugins/addons/spam_filter/spam_filter.addon.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spam_filter
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 스팸필터링 애드온
|
||||
* @todo 미구현
|
||||
**/
|
||||
|
||||
class spam_filter extends AddOn {
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue