mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Merge branch 'develop' into next
This commit is contained in:
commit
177a6c6b7d
42 changed files with 98 additions and 74 deletions
|
|
@ -6,7 +6,7 @@ $lang->about_act_config = 'Each module like board/blog has its own actions such
|
|||
$lang->point_io = 'Point module On';
|
||||
$lang->about_point_io = 'Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by Rhymix Core. Point record would be preserved.';
|
||||
$lang->max_level = 'Max Level';
|
||||
$lang->about_max_level = 'You may set the max level. Level icons should be considered and 1000 is the maximum value you can set.<br />The maximum possible value is also restricted by the max_input_vars setting of the server. The current maximum is around %d.';
|
||||
$lang->about_max_level = 'You may set the max level. Level icons should be considered, and it is strongly recommended that you keep this value below 1000.';
|
||||
$lang->level_icon = 'Level Icon';
|
||||
$lang->about_level_icon = 'Path of level icon is "./module/point/icons/[level].gif" and max level could be different with icon set. So please be careful';
|
||||
$lang->point_name = 'Point Name';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ $lang->about_act_config = '게시판, 블로그 등 각 페이지마다 글 작
|
|||
$lang->point_io = '포인트 모듈 켜기';
|
||||
$lang->about_point_io = '체크 하면 포인트 모듈 기능을 켤 수 있습니다. 포인트 모듈 기능을 끌 경우, 포인트 모듈의 모든 트리거가 삭제됩니다. 포인트 기록은 유지되지만 새로 기록 되지는 않습니다.';
|
||||
$lang->max_level = '최고 레벨';
|
||||
$lang->about_max_level = '최고레벨을 지정할 수 있습니다. 레벨 아이콘을 염두에 두어야 하고 최고 레벨은 1000이 한계입니다.<br />서버의 max_input_vars 설정이 낮은 경우 최고 레벨에도 제한이 있을 수 있습니다. 이 서버에서는 %d까지 가능합니다.';
|
||||
$lang->about_max_level = '최고레벨을 지정할 수 있습니다. 레벨 아이콘을 염두에 두어야 하고, 1000레벨 이상은 권장하지 않습니다.';
|
||||
$lang->level_icon = '레벨 아이콘';
|
||||
$lang->about_level_icon = '레벨 아이콘은 ./modules/point/icons/레벨.gif 로 지정되며 최고레벨과 아이콘셋이 다를 수 있으니 주의해주세요!';
|
||||
$lang->point_name = '포인트 이름';
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class pointAdminController extends point
|
|||
|
||||
// The highest level
|
||||
$config->max_level = $args->max_level;
|
||||
if($config->max_level>1000) $config->max_level = 1000;
|
||||
if($config->max_level>10000) $config->max_level = 10000;
|
||||
if($config->max_level<1) $config->max_level = 1;
|
||||
|
||||
// Set the level icon
|
||||
|
|
@ -141,13 +141,15 @@ class pointAdminController extends point
|
|||
|
||||
$config->group_reset = $args->group_reset;
|
||||
$config->group_ratchet = $args->group_ratchet;
|
||||
|
||||
// Per-level point configurations
|
||||
unset($config->level_step);
|
||||
$level_step = array_map('intval', explode(',', $args->level_step ?: '0'));
|
||||
$config->level_step = array();
|
||||
for($i=1;$i<=$config->max_level;$i++)
|
||||
{
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
$config->level_step[$i] = isset($level_step[$i - 1]) ? $level_step[$i - 1] : array_last($level_step);
|
||||
}
|
||||
|
||||
// A function to calculate per-level points
|
||||
$config->expression = $args->expression;
|
||||
|
||||
|
|
|
|||
|
|
@ -827,8 +827,8 @@ class pointController extends point
|
|||
|
||||
// Cache Settings
|
||||
$cache_key = sprintf('member:point:%d', $member_srl);
|
||||
$cache_path = sprintf('./files/member_extra_info/point/%s/', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl);
|
||||
$cache_path = sprintf(RX_BASEDIR . 'files/member_extra_info/point/%s', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s/%d.cache.txt', $cache_path, $member_srl);
|
||||
if (Rhymix\Framework\Cache::getDriverName() !== 'dummy')
|
||||
{
|
||||
Rhymix\Framework\Cache::set($cache_key, $point);
|
||||
|
|
@ -840,7 +840,7 @@ class pointController extends point
|
|||
}
|
||||
|
||||
getController('member')->_clearMemberCache($member_srl);
|
||||
unset(self::$_member_point_cache[$member_srl]);
|
||||
unset(parent::$_member_point_cache[$member_srl]);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ class pointModel extends point
|
|||
$member_srl = abs($member_srl);
|
||||
|
||||
// Get from instance memory
|
||||
if (!$from_db && isset(self::$_member_point_cache[$member_srl]))
|
||||
if (!$from_db && isset(parent::$_member_point_cache[$member_srl]))
|
||||
{
|
||||
$exists = true;
|
||||
return self::$_member_point_cache[$member_srl];
|
||||
return parent::$_member_point_cache[$member_srl];
|
||||
}
|
||||
|
||||
// Get from object cache
|
||||
|
|
@ -53,12 +53,12 @@ class pointModel extends point
|
|||
}
|
||||
|
||||
// Get from file cache
|
||||
$cache_path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl);
|
||||
$cache_path = sprintf(RX_BASEDIR . 'files/member_extra_info/point/%s', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s/%d.cache.txt', $cache_path, $member_srl);
|
||||
if (!$from_db && file_exists($cache_filename))
|
||||
{
|
||||
$exists = true;
|
||||
return self::$_member_point_cache[$member_srl] = intval(trim(Rhymix\Framework\Storage::read($cache_filename)));
|
||||
return parent::$_member_point_cache[$member_srl] = intval(trim(Rhymix\Framework\Storage::read($cache_filename)));
|
||||
}
|
||||
|
||||
// Get from the DB
|
||||
|
|
@ -77,7 +77,7 @@ class pointModel extends point
|
|||
}
|
||||
|
||||
// Save to cache
|
||||
self::$_member_point_cache[$member_srl] = $point;
|
||||
parent::$_member_point_cache[$member_srl] = $point;
|
||||
if (Rhymix\Framework\Cache::getDriverName() !== 'dummy')
|
||||
{
|
||||
Rhymix\Framework\Cache::set($cache_key, $point);
|
||||
|
|
|
|||
|
|
@ -15,13 +15,6 @@
|
|||
<span class="x_help-inline">{$lang->about_point_io}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="max_level" class="x_control-label">{$lang->max_level}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" max="{$system_max_level}" value="{$config->max_level}" name="max_level" id="max_level" />
|
||||
<p class="x_help-block">{sprintf($lang->about_max_level, $system_max_level)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="point_name" class="x_control-label">{$lang->point_name}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -29,6 +22,13 @@
|
|||
<p class="x_help-block">{$lang->about_point_name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="max_level" class="x_control-label">{$lang->max_level}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" value="{$config->max_level}" name="max_level" id="max_level" />
|
||||
<p class="x_help-block">{$lang->about_max_level}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="level_icon" class="x_control-label">{$lang->level_icon}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -196,7 +196,7 @@
|
|||
<tr>
|
||||
<td>1</td>
|
||||
<td><img src="{getUrl()}modules/point/icons/{$config->level_icon}/1.gif" alt="1" /></td>
|
||||
<td><label for="level_step_1" style="margin:0"><input type="number" id="level_step_1" name="level_step_1" value="{$config->level_step[1]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
<td><label for="level_step_1" style="margin:0"><input type="number" id="level_step_1" class="level_step" value="{$config->level_step[1]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
{@$point_group_item = $point_group[1]}
|
||||
{@$title=array()}
|
||||
<!--@if($point_group_item)-->
|
||||
|
|
@ -220,12 +220,13 @@
|
|||
<tr class="row{(($i-1)%2+1)}">
|
||||
<td>{$i}</td>
|
||||
<td><img src="{getUrl()}modules/point/icons/{$config->level_icon}/{$i}.gif" alt="{$i}" /></td>
|
||||
<td><label for="level_step_{$i}" style="margin:0"><input type="number" id="level_step_{$i}" name="level_step_{$i}" value="{$config->level_step[$i]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
<td><label for="level_step_{$i}" style="margin:0"><input type="number" id="level_step_{$i}" class="level_step" value="{$config->level_step[$i]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
<td>{implode(', ', $title)}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
<div class="x_clearfix">
|
||||
<input id="level_step" name="level_step" type="hidden" value="{implode(',', $config->level_step)}" />
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,14 @@
|
|||
|
||||
jQuery(function($){
|
||||
|
||||
$('#point_module_config_form').on('submit', function() {
|
||||
var level_step = [];
|
||||
$(this).find('.level_step').each(function() {
|
||||
level_step.push(parseInt($(this).val(), 10));
|
||||
});
|
||||
$('#level_step').val(level_step.join(','));
|
||||
});
|
||||
|
||||
$('button.calc_point').click(function(){
|
||||
var $this, form, elems, reset, el, fn, i=0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue