Add more point options

This commit is contained in:
Kijin Sung 2018-01-31 18:36:46 +09:00
parent bbba3d013e
commit 78aebbf77f
6 changed files with 130 additions and 33 deletions

View file

@ -33,17 +33,23 @@ $lang->point_group_ratchet_yes = 'Maintain current group if point is reduced';
$lang->point_group_ratchet_no = 'Move to lower group if point is reduced'; $lang->point_group_ratchet_no = 'Move to lower group if point is reduced';
$lang->about_point_link_group = 'If you specify level for a specific group, users are assigned into the group when they advance to the level by getting points.'; $lang->about_point_link_group = 'If you specify level for a specific group, users are assigned into the group when they advance to the level by getting points.';
$lang->about_module_point = 'You can set point for each module, and modules which don\'t have any value will use the default point. All points will be restored on acting reverse.'; $lang->about_module_point = 'You can set point for each module, and modules which don\'t have any value will use the default point. All points will be restored on acting reverse.';
$lang->point_signup = 'Sign up'; $lang->point_signup = 'Sign Up';
$lang->point_insert_document = 'On Writing'; $lang->point_insert_document = 'Writing a document';
$lang->point_delete_document = 'On Deleting'; $lang->point_delete_document = 'Deleting a document';
$lang->point_insert_comment = 'On Adding Comments'; $lang->point_insert_comment = 'Writing a comment';
$lang->point_delete_comment = 'On Deleting Comments'; $lang->point_delete_comment = 'Deleting a comment';
$lang->point_upload_file = 'On Uploading'; $lang->point_upload_file = 'Uploading a file';
$lang->point_delete_file = 'On Deleting Files'; $lang->point_delete_file = 'Deleting a file';
$lang->point_download_file = 'On Downloading Files(Exclude images)'; $lang->point_download_file = 'Downloading a file (excluding images)';
$lang->point_read_document = 'On Reading'; $lang->point_read_document = 'Reading another person\'s post';
$lang->point_voted = 'On Recommended'; $lang->point_voter = 'Upvoting another person\'s document';
$lang->point_blamed = 'On Not Recommended'; $lang->point_blamer = 'Downvoting another person\'s document';
$lang->point_voter_comment = 'Upvoting another person\'s comment';
$lang->point_blamer_comment = 'Downvoting another person\'s comment';
$lang->point_voted = 'One\'s document is upvoted';
$lang->point_blamed = 'One\'s document is downvoted';
$lang->point_voted_comment = 'One\'s comment is upvoted';
$lang->point_blamed_comment = 'One\'s comment is downvoted';
$lang->cmd_point_config = 'Default Setting'; $lang->cmd_point_config = 'Default Setting';
$lang->cmd_point_module_config = 'Module Setting'; $lang->cmd_point_module_config = 'Module Setting';
$lang->cmd_point_act_config = 'Act Setting'; $lang->cmd_point_act_config = 'Act Setting';

View file

@ -40,10 +40,18 @@ $lang->point_insert_comment = '댓글 작성';
$lang->point_delete_comment = '댓글 삭제'; $lang->point_delete_comment = '댓글 삭제';
$lang->point_upload_file = '파일 업로드'; $lang->point_upload_file = '파일 업로드';
$lang->point_delete_file = '파일 삭제'; $lang->point_delete_file = '파일 삭제';
$lang->point_download_file = '파일 다운로드(이미지 제외)'; $lang->point_download_file = '파일 다운로드 (이미지 제외)';
$lang->point_read_document = '게시글 조회'; $lang->point_read_document = '다른 사람의 글을 읽음';
$lang->point_voted = '추천 받음'; $lang->point_voter = '다른 사람의 글을 추천함';
$lang->point_blamed = '비추천 받음'; $lang->point_blamer = '다른 사람의 글을 비추천함';
$lang->point_voter_comment = '다른 사람의 댓글을 추천함';
$lang->point_blamer_comment = '다른 사람의 댓글을 비추천함';
$lang->point_download_file_author = '내 파일이 다운로드됨 (이미지 제외)';
$lang->point_read_document_author = '내 글이 읽힘';
$lang->point_voted = '내 글이 추천받음';
$lang->point_blamed = '내 글이 비추천받음';
$lang->point_voted_comment = '내 댓글이 추천받음';
$lang->point_blamed_comment = '내 댓글이 비추천받음';
$lang->cmd_point_config = '기본 설정'; $lang->cmd_point_config = '기본 설정';
$lang->cmd_point_module_config = '모듈별 설정'; $lang->cmd_point_module_config = '모듈별 설정';
$lang->cmd_point_act_config = '기능별 act 설정'; $lang->cmd_point_act_config = '기능별 act 설정';

View file

@ -45,12 +45,18 @@ class pointAdminController extends point
$config->signup_point = (int)$args->signup_point; $config->signup_point = (int)$args->signup_point;
$config->login_point = (int)$args->login_point; $config->login_point = (int)$args->login_point;
$config->insert_document = (int)$args->insert_document; $config->insert_document = (int)$args->insert_document;
$config->read_document = (int)$args->read_document;
$config->insert_comment = (int)$args->insert_comment; $config->insert_comment = (int)$args->insert_comment;
$config->upload_file = (int)$args->upload_file; $config->upload_file = (int)$args->upload_file;
$config->download_file = (int)$args->download_file; $config->download_file = (int)$args->download_file;
$config->read_document = (int)$args->read_document;
$config->voter = (int)$args->voter;
$config->blamer = (int)$args->blamer;
$config->voted = (int)$args->voted; $config->voted = (int)$args->voted;
$config->blamed = (int)$args->blamed; $config->blamed = (int)$args->blamed;
$config->download_file_author = (int)$args->download_file_author;
$config->read_document_author = (int)$args->read_document_author;
$config->voter_comment = (int)$args->voter_comment;
$config->blamer_comment = (int)$args->blamer_comment;
$config->voted_comment = (int)$args->voted_comment; $config->voted_comment = (int)$args->voted_comment;
$config->blamed_comment = (int)$args->blamed_comment; $config->blamed_comment = (int)$args->blamed_comment;
// The highest level // The highest level
@ -134,7 +140,12 @@ class pointAdminController extends point
{ {
$args = Context::getRequestVars(); $args = Context::getRequestVars();
$configTypeList = array('insert_document', 'insert_comment', 'upload_file', 'download_file', 'read_document', 'voted', 'blamed', 'voted_comment', 'blamed_comment'); $configTypeList = array(
'insert_document', 'insert_comment', 'upload_file', 'download_file', 'read_document',
'voter', 'blamer', 'voter_comment', 'blamer_comment',
'download_file_author', 'read_document_author', 'voted', 'blamed', 'voted_comment', 'blamed_comment',
);
foreach($configTypeList AS $config) foreach($configTypeList AS $config)
{ {
if(is_array($args->{$config})) if(is_array($args->{$config}))
@ -186,6 +197,12 @@ class pointAdminController extends point
$config['upload_file'] = (int)Context::get('upload_file'); $config['upload_file'] = (int)Context::get('upload_file');
$config['download_file'] = (int)Context::get('download_file'); $config['download_file'] = (int)Context::get('download_file');
$config['read_document'] = (int)Context::get('read_document'); $config['read_document'] = (int)Context::get('read_document');
$config['voter'] = (int)Context::get('voter');
$config['blamer'] = (int)Context::get('blamer');
$config['voter_comment'] = (int)Context::get('voter_comment');
$config['blamer_comment'] = (int)Context::get('blamer_comment');
$config['download_file_author'] = (int)Context::get('download_file_author');
$config['read_document_author'] = (int)Context::get('read_document_author');
$config['voted'] = (int)Context::get('voted'); $config['voted'] = (int)Context::get('voted');
$config['blamed'] = (int)Context::get('blamed'); $config['blamed'] = (int)Context::get('blamed');
$config['voted_comment'] = (int)Context::get('voted_comment'); $config['voted_comment'] = (int)Context::get('voted_comment');

View file

@ -53,6 +53,24 @@
<input type="number" name="read_document" value="{$config->read_document}" id="read_document" style="text-align:right" /> : <input type="number" name="read_document" value="{$config->read_document}" id="read_document" style="text-align:right" /> :
<label for="read_document" class="x_inline">{$lang->point_read_document}</label> <label for="read_document" class="x_inline">{$lang->point_read_document}</label>
<br /> <br />
<input type="number" name="voter" value="{$config->voter}" style="text-align:right" id="voter" /> :
<label for="voter" class="x_inline">{$lang->point_voter}</label>
<br />
<input type="number" name="blamer" value="{$config->blamer}" id="blamer" style="text-align:right" /> :
<label for="blamer" class="x_inline">{$lang->point_blamer}</label>
<br />
<input type="number" name="voter_comment" value="{$config->voter_comment}" style="text-align:right" id="voter_comment" /> :
<label for="voter_comment" class="x_inline">{$lang->point_voter_comment}</label>
<br />
<input type="number" name="blamer_comment" value="{$config->blamer_comment}" id="blamer_comment" style="text-align:right" /> :
<label for="blamer_comment" class="x_inline">{$lang->point_blamer_comment}</label>
<br />
<input type="number" name="download_file_author" value="{$config->download_file_author}" id="download_file_author" style="text-align:right" /> :
<label for="download_file_author" class="x_inline">{$lang->point_download_file_author}</label>
<br />
<input type="number" name="read_document_author" value="{$config->read_document_author}" id="read_document_author" style="text-align:right" /> :
<label for="read_document_author" class="x_inline">{$lang->point_read_document_author}</label>
<br />
<input type="number" name="voted" value="{$config->voted}" style="text-align:right" id="voted" /> : <input type="number" name="voted" value="{$config->voted}" style="text-align:right" id="voted" /> :
<label for="voted" class="x_inline">{$lang->point_voted}</label> <label for="voted" class="x_inline">{$lang->point_voted}</label>
<br /> <br />
@ -60,10 +78,10 @@
<label for="blamed" class="x_inline">{$lang->point_blamed}</label> <label for="blamed" class="x_inline">{$lang->point_blamed}</label>
<br /> <br />
<input type="number" name="voted_comment" value="{$config->voted_comment}" style="text-align:right" id="voted_comment" /> : <input type="number" name="voted_comment" value="{$config->voted_comment}" style="text-align:right" id="voted_comment" /> :
<label for="voted_comment" class="x_inline">{$lang->comment} {$lang->point_voted}</label> <label for="voted_comment" class="x_inline">{$lang->point_voted_comment}</label>
<br /> <br />
<input type="number" name="blamed_comment" value="{$config->blamed_comment}" id="blamed_comment" style="text-align:right" /> : <input type="number" name="blamed_comment" value="{$config->blamed_comment}" id="blamed_comment" style="text-align:right" /> :
<label for="blamed_comment" class="x_inline">{$lang->comment} {$lang->point_blamed}</label> <label for="blamed_comment" class="x_inline">{$lang->point_blamed_comment}</label>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">

View file

@ -16,24 +16,36 @@
<th scope="col">{$lang->point_upload_file}</th> <th scope="col">{$lang->point_upload_file}</th>
<th scope="col">{$lang->point_download_file}</th> <th scope="col">{$lang->point_download_file}</th>
<th scope="col">{$lang->point_read_document}</th> <th scope="col">{$lang->point_read_document}</th>
<th scope="col">{$lang->point_voter}</th>
<th scope="col">{$lang->point_blamer}</th>
<th scope="col">{$lang->point_voter_comment}</th>
<th scope="col">{$lang->point_blamer_comment}</th>
<th scope="col">{$lang->point_download_file_author}</th>
<th scope="col">{$lang->point_read_document_author}</th>
<th scope="col">{$lang->point_voted}</th> <th scope="col">{$lang->point_voted}</th>
<th scope="col">{$lang->point_blamed}</th> <th scope="col">{$lang->point_blamed}</th>
<th scope="col">{$lang->comment} {$lang->point_voted}</th> <th scope="col">{$lang->point_voted_comment}</th>
<th scope="col">{$lang->comment} {$lang->point_blamed}</th> <th scope="col">{$lang->point_blamed_comment}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr loop="$mid_list => $key,$val"> <tr loop="$mid_list => $key,$val">
<th scope="row">{$val->browser_title}({$val->mid})</th> <th scope="row" style="min-width:100px">{$val->browser_title}<br /><span style="font-size:11px;font-weight:normal">({$val->mid})</span></th>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="insert_document[{$val->module_srl}]" value="{$module_config[$val->module_srl]['insert_document']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="insert_document[{$val->module_srl}]" value="{$module_config[$val->module_srl]['insert_document']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="insert_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['insert_comment']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="insert_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['insert_comment']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="upload_file[{$val->module_srl}]" value="{$module_config[$val->module_srl]['upload_file']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="upload_file[{$val->module_srl}]" value="{$module_config[$val->module_srl]['upload_file']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="download_file[{$val->module_srl}]" value="{$module_config[$val->module_srl]['download_file']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="download_file[{$val->module_srl}]" value="{$module_config[$val->module_srl]['download_file']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="read_document[{$val->module_srl}]" value="{$module_config[$val->module_srl]['read_document']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="read_document[{$val->module_srl}]" value="{$module_config[$val->module_srl]['read_document']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="voted[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voted']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="voter[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voter']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamed[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamed']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamer[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamer']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="voted_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voted_comment']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="voter_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voter_comment']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamed_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamed_comment']}" title="{$config->point_name}" /> {$config->point_name}</td> <td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamer_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamer_comment']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="download_file_author[{$val->module_srl}]" value="{$module_config[$val->module_srl]['download_file_author']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="read_document_author[{$val->module_srl}]" value="{$module_config[$val->module_srl]['read_document_author']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="voted[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voted']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamed[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamed']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="voted_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['voted_comment']}" title="{$config->point_name}" /></td>
<td class="nowr"><input type="number" style="width:40px;text-align:right" name="blamed_comment[{$val->module_srl}]" value="{$module_config[$val->module_srl]['blamed_comment']}" title="{$config->point_name}" /></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -38,6 +38,42 @@
<input type="number" name="read_document" id="read_document" value="{$module_config['read_document']}" /> {$module_config['point_name']} <input type="number" name="read_document" id="read_document" value="{$module_config['read_document']}" /> {$module_config['point_name']}
</div> </div>
</div> </div>
<div class="x_control-group">
<label for="voter" class="x_control-label">{$lang->point_voter}</label>
<div class="x_controls">
<input type="number" name="voter" id="voter" value="{$module_config['voter']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group">
<label for="blamer" class="x_control-label">{$lang->point_blamer}</label>
<div class="x_controls">
<input type="number" name="blamer" id="blamer" value="{$module_config['blamer']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group">
<label for="voter_comment" class="x_control-label">{$lang->point_voter_comment}</label>
<div class="x_controls">
<input type="number" name="voter_comment" id="voter_comment" value="{$module_config['voter_comment']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group">
<label for="blamer_comment" class="x_control-label">{$lang->point_blamer_comment}</label>
<div class="x_controls">
<input type="number" name="blamer_comment" id="blamer_comment" value="{$module_config['blamer_comment']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group">
<label for="download_file_author" class="x_control-label">{$lang->point_download_file_author}</label>
<div class="x_controls">
<input type="number" name="download_file_author" id="download_file_author" value="{$module_config['download_file_author']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group">
<label for="read_document_author" class="x_control-label">{$lang->point_read_document_author}</label>
<div class="x_controls">
<input type="number" name="read_document_author" id="read_document_author" value="{$module_config['read_document_author']}" /> {$module_config['point_name']}
</div>
</div>
<div class="x_control-group"> <div class="x_control-group">
<label for="voted" class="x_control-label">{$lang->point_voted}</label> <label for="voted" class="x_control-label">{$lang->point_voted}</label>
<div class="x_controls"> <div class="x_controls">
@ -51,13 +87,13 @@
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label for="voted_comment" class="x_control-label">{$lang->comment} {$lang->point_voted}</label> <label for="voted_comment" class="x_control-label">{$lang->point_voted_comment}</label>
<div class="x_controls"> <div class="x_controls">
<input type="number" name="voted_comment" id="voted_comment" value="{$module_config['voted_comment']}" /> {$module_config['point_name']} <input type="number" name="voted_comment" id="voted_comment" value="{$module_config['voted_comment']}" /> {$module_config['point_name']}
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label for="blamed_comment" class="x_control-label">{$lang->comment} {$lang->point_blamed}</label> <label for="blamed_comment" class="x_control-label">{$lang->point_blamed_comment}</label>
<div class="x_controls"> <div class="x_controls">
<input type="number" name="blamed_comment" id="blamed_comment" value="{$module_config['blamed_comment']}" /> {$module_config['point_name']} <input type="number" name="blamed_comment" id="blamed_comment" value="{$module_config['blamed_comment']}" /> {$module_config['point_name']}
</div> </div>