포인트 모듈에 회원가입시 포인트를 줄 수 있도록 기능 개선

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2718 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-10-10 04:52:41 +00:00
parent faf518676f
commit 6e3c2b4fb4
10 changed files with 58 additions and 2 deletions

View file

@ -28,6 +28,7 @@
$lang->about_module_point = "You can set point for each module and modules which don't have any value will use default point.<br />All point will be restored on acting reverse.";
$lang->point_signup = 'Signup';
$lang->point_insert_document = 'On Writing';
$lang->point_delete_document = 'On Deleting';
$lang->point_insert_comment = 'On Adding Comments';

View file

@ -28,6 +28,7 @@
$lang->about_module_point = "Usted puede definir los puntos para cada módulo y los módulos que no tengan ningun valor usarán punto predefinido.<br />Todos los puntos serán restituidos al actuar en forma contraria.";
$lang->point_signup = 'Fecha del';
$lang->point_insert_document = 'Al escribir documento';
$lang->point_delete_document = 'Al borrar documento';
$lang->point_insert_comment = 'Al agregar comentarios';

View file

@ -28,6 +28,7 @@
$lang->about_module_point = 'モジュール別にポイントを指定することができますが、指定されていないモジュールでは、デフォルトポイントが使用されます。すべてのポイント数は、反対のアクションを行った際には原状復帰されます。';
$lang->point_signup = '加入';
$lang->point_insert_document = '書き込み作成';
$lang->point_delete_document = '書き込み削除';
$lang->point_insert_comment = 'コメント作成';

View file

@ -28,6 +28,7 @@
$lang->about_module_point = '모듈별로 포인트를 지정할 수 있으며 지정되지 않은 모듈은 기본 포인트를 이용하게 됩니다<br />모든 점수는 반대 행동을 하였을 경우 원상복귀 됩니다.';
$lang->point_signup = '가입';
$lang->point_insert_document = '글 작성';
$lang->point_delete_document = '글 삭제';
$lang->point_insert_comment = '댓글 작성';

View file

@ -28,6 +28,7 @@
$lang->about_module_point = '可以分别对各模块进行积分设置,没有被设置的模块将使用默认值。<br />所有积分在相反动作下恢复原始值。即发表新帖后再删除得到的积分为0分。';
$lang->point_signup = '注册';
$lang->point_insert_document = '发表新帖';
$lang->point_delete_document = '删除主题';
$lang->point_insert_comment = '发表评论';

View file

@ -61,13 +61,14 @@
// 변수 정리
$args = Context::getRequestVars();
$config->signup = (int)$args->signup;
$config->insert_document = (int)$args->insert_document;
$config->insert_comment = (int)$args->insert_comment;
$config->upload_file = (int)$args->upload_file;
$config->download_file = (int)$args->download_file;
foreach($args as $key => $val) {
preg_match("/^(insert_document|insert_comment|upload_file|download_file)_([0-9]+)$/", $key, $matches);
preg_match("/^(signup|insert_document|insert_comment|upload_file|download_file)_([0-9]+)$/", $key, $matches);
if(!$matches[1]) continue;
$name = $matches[1];
$module_srl = $matches[2];
@ -95,6 +96,7 @@
// 변수 정리
$args = Context::getRequestVars();
$config->signup_act = $args->signup_act;
$config->insert_document_act = $args->insert_document_act;
$config->delete_document_act = $args->delete_document_act;
$config->insert_comment_act = $args->insert_comment_act;
@ -132,7 +134,8 @@
$config = $oModuleModel->getModuleConfig('point');
// 각 act값을 정리
$act_list = sprintf("%s,%s,%s,%s,%s,%s,%s",
$act_list = sprintf("%s,%s,%s,%s,%s,%s,%s,%s",
$config->signup_act,
$config->insert_document_act,
$config->delete_document_act,
$config->insert_comment_act,

View file

@ -43,6 +43,11 @@
/**
* 모듈별 기본 점수 action 정의 (게시판,블로그외에 어떤 모듈이 생길지 모르니 act값을 명시한다
**/
// 회원가입
$config->signup = 10;
$config->signup_act = 'procMemberInsert';
// 글작성
$config->insert_document = 10;
@ -79,6 +84,12 @@
* @brief 설치가 이상이 없는지 체크하는 method
**/
function checkUpdate() {
// point 모듈 정보 가져옴
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('point');
if(!$config->signup || !$config->signup_act) return true;
return false;
}
@ -86,6 +97,21 @@
* @brief 업데이트 실행
**/
function moduleUpdate() {
// point 모듈 정보 가져옴
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('point');
if(!$config->signup || !$config->signup_act) {
$config->signup = 10;
$config->signup_act = 'procMemberInsert';
$oModuleController = &getController('module');
$oModuleController->insertModuleConfig('point', $config);
$oPointController = &getAdminController('point');
$oPointController->cacheActList();
}
return new Object(0, 'success_updated');
}

View file

@ -7,6 +7,10 @@
<table cellspacing="0" class="tableType2 gap1">
<col width="200" />
<col />
<tr>
<th>{$lang->point_signup}</th>
<td><input type="text" name="signup_act" value="{$config->signup_act}" class="inputTypeText w100" /></td>
</tr>
<tr>
<th>{$lang->point_insert_document}</th>
<td><input type="text" name="insert_document_act" value="{$config->insert_document_act}" class="inputTypeText w100" /></td>

View file

@ -7,6 +7,7 @@
<table cellspacing="0" class="tableType2 gap1">
<tr>
<th>&nbsp;</th>
<th>{$lang->point_signup}</th>
<th>{$lang->point_insert_document}</th>
<th>{$lang->point_insert_comment}</th>
<th>{$lang->point_upload_file}</th>
@ -14,6 +15,7 @@
</tr>
<tr>
<th scope="col">{$lang->is_default}</th>
<td><input type="text" name="signup" value="{$config->signup}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="insert_document" value="{$config->insert_document}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="insert_comment" value="{$config->insert_comment}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="upload_file" value="{$config->upload_file}" class="inputTypeText w80" /> {$config->point_name}</td>
@ -22,6 +24,7 @@
<!--@foreach($mid_list as $key => $val)-->
<tr>
<th scope="col">{$val->browser_title} ({$val->mid})</th>
<td><input type="text" name="signup_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['signup']}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="insert_document_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['insert_document']}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="insert_comment_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['insert_comment']}" class="inputTypeText w80" /> {$config->point_name}</td>
<td><input type="text" name="upload_file_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['upload_file']}" class="inputTypeText w80" /> {$config->point_name}</td>