mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
commit
d80449ffb3
14 changed files with 228 additions and 11 deletions
|
|
@ -340,7 +340,7 @@ class commentItem extends Object
|
|||
|
||||
if($strlen)
|
||||
{
|
||||
return cut_str(strip_tags($content), $strlen, '...');
|
||||
return cut_str(trim(strip_tags($content)), $strlen, '...');
|
||||
}
|
||||
|
||||
return htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
|
|
|
|||
|
|
@ -49,4 +49,5 @@ $lang->improper_comment_reasons['others'] = 'Others (Write your own)';
|
|||
$lang->about_improper_comment_declare = 'Write here why you report this comment as an improper thing.';
|
||||
$lang->msg_deleted_comment = 'This comment has been deleted.';
|
||||
$lang->msg_admin_deleted_comment = 'This comment has been deleted by an administrator.';
|
||||
$lang->msg_no_text_comment = 'This comment contains no text.';
|
||||
$lang->msg_comment_notify_mail = "[%s] A new comment was posted on document: \" %s \"";
|
||||
|
|
|
|||
|
|
@ -53,4 +53,5 @@ $lang->improper_comment_reasons['others'] = '기타(직접작성)';
|
|||
$lang->about_improper_comment_declare = '댓글을 신고하신 이유를 간단히 적어서 제출해주시면 관리자 검토 후 조치하겠습니다.';
|
||||
$lang->msg_deleted_comment = '삭제된 댓글입니다.';
|
||||
$lang->msg_admin_deleted_comment = '관리자가 삭제한 댓글입니다.';
|
||||
$lang->msg_no_text_comment = '글자가 없는 댓글입니다.';
|
||||
$lang->msg_comment_notify_mail = '[%s] 새로운 댓글이 등록되었습니다 : %s';
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<action name="dispMemberLogout" type="view" standalone="true" />
|
||||
<action name="dispMemberLeave" type="view" standalone="true" />
|
||||
<action name="dispMemberOwnDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberOwnComment" type="view" standalone="true" />
|
||||
<action name="dispMemberScrappedDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberSavedDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberActiveLogins" type="view" standalone="true" />
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
|
||||
<action name="dispMemberAdminList" type="view" index="true" admin_index="true" menu_name="userList" menu_index="true"/>
|
||||
<action name="dispMemberAdminConfig" type="view" menu_name="userSetting" menu_index="true" />
|
||||
<action name="dispMemberAdminFeaturesConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminSignUpConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminLoginConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminDesignConfig" type="view" menu_name="userSetting" />
|
||||
|
|
@ -76,6 +78,7 @@
|
|||
<action name="procMemberAdminInsert" type="controller" ruleset="insertAdminMember" />
|
||||
<action name="procMemberAdminDelete" type="controller" />
|
||||
<action name="procMemberAdminInsertDefaultConfig" type="controller" ruleset="insertDefaultConfig" />
|
||||
<action name="procMemberAdminInsertFeaturesConfig" type="controller" />
|
||||
<action name="procMemberAdminInsertSignupConfig" type="controller" />
|
||||
<action name="procMemberAdminInsertLoginConfig" type="controller" />
|
||||
<action name="procMemberAdminInsertDesignConfig" type="controller" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
$lang->member = 'Member';
|
||||
$lang->site = 'Site';
|
||||
$lang->member_default_config = 'Basic Settings';
|
||||
$lang->member_features_config = 'Features';
|
||||
$lang->member_default_info = 'Basic Info';
|
||||
$lang->member_extend_info = 'Additional Info';
|
||||
$lang->default_group_1 = 'Associate Member';
|
||||
|
|
@ -106,7 +108,8 @@ $lang->cmd_manage_id = 'Prohibited IDs';
|
|||
$lang->cmd_manage_email_host = 'E-mail provider check';
|
||||
$lang->cmd_manage_nick_name = 'Prohibited NickNames';
|
||||
$lang->cmd_manage_form = 'Signup Form';
|
||||
$lang->cmd_view_own_document = 'Written Articles';
|
||||
$lang->cmd_view_own_document = 'My Articles';
|
||||
$lang->cmd_view_own_comment = 'My Comments';
|
||||
$lang->cmd_view_active_logins = 'Active Logins';
|
||||
$lang->cmd_manage_member_info = 'Manage Member Info';
|
||||
$lang->cmd_trace_document = 'Trace Written Articles';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
$lang->member = '회원';
|
||||
$lang->site = '사이트';
|
||||
$lang->member_default_config = '기본 설정';
|
||||
$lang->member_features_config = '기능 설정';
|
||||
$lang->member_default_info = '기본 정보';
|
||||
$lang->member_extend_info = '추가 정보';
|
||||
$lang->default_group_1 = '준회원';
|
||||
|
|
@ -109,6 +111,7 @@ $lang->cmd_manage_email_host = '이메일 제공자 관리';
|
|||
$lang->cmd_manage_nick_name = '금지 닉네임 관리';
|
||||
$lang->cmd_manage_form = '가입 폼 관리';
|
||||
$lang->cmd_view_own_document = '작성 글 보기';
|
||||
$lang->cmd_view_own_comment = '작성 댓글 보기';
|
||||
$lang->cmd_view_active_logins = '로그인 관리';
|
||||
$lang->cmd_manage_member_info = '회원 정보 관리';
|
||||
$lang->cmd_trace_document = '작성글 추적';
|
||||
|
|
|
|||
|
|
@ -205,6 +205,33 @@ class memberAdminController extends member
|
|||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
public function procMemberAdminInsertFeaturesConfig()
|
||||
{
|
||||
$config = getModel('member')->getMemberConfig();
|
||||
$config->features = array();
|
||||
|
||||
$args = Context::gets(
|
||||
'scrapped_documents',
|
||||
'saved_documents',
|
||||
'my_documents',
|
||||
'my_comments',
|
||||
'active_logins'
|
||||
);
|
||||
foreach ($args as $key => $value)
|
||||
{
|
||||
$config->features[$key] = toBool($value);
|
||||
}
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->updateModuleConfig('member', $config);
|
||||
|
||||
// default setting end
|
||||
$this->setMessage('success_updated');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminFeaturesConfig');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
public function procMemberAdminInsertSignupConfig()
|
||||
{
|
||||
$oMemberModel = getModel('member');
|
||||
|
|
|
|||
|
|
@ -135,6 +135,16 @@ class memberAdminView extends member
|
|||
$this->setTemplateFile('default_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the features config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dispMemberAdminFeaturesConfig()
|
||||
{
|
||||
$this->setTemplateFile('features_config');
|
||||
}
|
||||
|
||||
public function dispMemberAdminSignUpConfig()
|
||||
{
|
||||
$config = $this->memberConfig;
|
||||
|
|
|
|||
|
|
@ -1912,9 +1912,6 @@ class memberController extends member
|
|||
*/
|
||||
function setSessionInfo()
|
||||
{
|
||||
$oMemberModel = getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
|
||||
// If your information came through the current session information to extract information from the users
|
||||
if(!$this->memberInfo && Rhymix\Framework\Session::getMemberSrl())
|
||||
{
|
||||
|
|
@ -1950,12 +1947,29 @@ class memberController extends member
|
|||
Context::set('logged_info', $this->memberInfo);
|
||||
|
||||
// Only the menu configuration of the user (such as an add-on to the menu can be changed)
|
||||
$config = getModel('member')->getMemberConfig();
|
||||
$this->addMemberMenu( 'dispMemberInfo', 'cmd_view_member_info');
|
||||
$this->addMemberMenu( 'dispMemberScrappedDocument', 'cmd_view_scrapped_document');
|
||||
$this->addMemberMenu( 'dispMemberSavedDocument', 'cmd_view_saved_document');
|
||||
$this->addMemberMenu( 'dispMemberOwnDocument', 'cmd_view_own_document');
|
||||
$this->addMemberMenu( 'dispMemberActiveLogins', 'cmd_view_active_logins');
|
||||
if($config->update_nickname_log == 'Y')
|
||||
if ($config->features['scrapped_documents'] !== false)
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberScrappedDocument', 'cmd_view_scrapped_document');
|
||||
}
|
||||
if ($config->features['saved_documents'] !== false)
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberSavedDocument', 'cmd_view_saved_document');
|
||||
}
|
||||
if ($config->features['my_documents'] !== false)
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberOwnDocument', 'cmd_view_own_document');
|
||||
}
|
||||
if ($config->features['my_comments'] !== false)
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberOwnComment', 'cmd_view_own_comment');
|
||||
}
|
||||
if ($config->features['active_logins'] !== false)
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberActiveLogins', 'cmd_view_active_logins');
|
||||
}
|
||||
if ($config->features['nickname_log'] !== false && $config->update_nickname_log == 'Y')
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberModifyNicknameLog', 'cmd_modify_nickname_log');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,6 +380,33 @@ class memberView extends member
|
|||
$this->setTemplateFile('document_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display comments written by the member
|
||||
*/
|
||||
function dispMemberOwnComment()
|
||||
{
|
||||
$oMemberModel = getModel('member');
|
||||
// A message appears if the user is not logged-in
|
||||
if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
$module_srl = Context::get('module_srl');
|
||||
Context::set('module_srl',Context::get('selected_module_srl'));
|
||||
Context::set('search_target','member_srl');
|
||||
Context::set('search_keyword',$member_srl);
|
||||
|
||||
$oCommentAdminView = getAdminView('comment');
|
||||
$oCommentAdminView->dispCommentAdminList();
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('search_target', 'search_keyword');
|
||||
|
||||
Context::set('module_srl', $module_srl);
|
||||
$this->setTemplateFile('comment_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display documents scrapped by the member
|
||||
*/
|
||||
|
|
|
|||
37
modules/member/skins/default/comment_list.html
Normal file
37
modules/member/skins/default/comment_list.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<include target="./common_header.html" />
|
||||
<h1>{$member_title = $lang->cmd_view_own_comment }</h1>
|
||||
<table class="table table-striped table-hover">
|
||||
<caption>
|
||||
Total: {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}
|
||||
<span class="pull-right">
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" class="btn" onclick="popopen(this.href,'ModuleSelect');return false;">{$lang->cmd_find_module}</a>
|
||||
<a href="{getUrl('selected_module_srl','')}" cond="$selected_module_srl" class="btn">{$lang->cmd_cancel}</a>
|
||||
</span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th class="title">{$lang->content}</th>
|
||||
<th>{$lang->date}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$comment_list => $no,$comment">
|
||||
<td>{$no}</td>
|
||||
<td>
|
||||
<a href="{getUrl('','document_srl',$comment->document_srl)}#comment_{$comment->comment_srl}" onclick="window.open(this.href);return false;">{$comment->getSummary() ?: $lang->msg_no_text_comment}</a>
|
||||
</td>
|
||||
<td>{$comment->getRegdate("Y-m-d")}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
<li><a href="{getUrl('page','','module_srl','')}" class="direction">« {$lang->first_page}</a></li>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<li class="active"|cond="$page == $page_no"><a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
<li><a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<include target="./common_footer.html" />
|
||||
37
modules/member/skins/simple_world/comment_list.html
Normal file
37
modules/member/skins/simple_world/comment_list.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<include target="./common_header.html" />
|
||||
<section class="sw-body">
|
||||
<h1>{$member_title = lang('member.cmd_view_own_comment')}</h1>
|
||||
<div class="rx_member-notice">
|
||||
{lang('common.total')}: {number_format($total_count)}
|
||||
</div>
|
||||
<div>
|
||||
<ul class="rx_sw_list">
|
||||
<li loop="$comment_list => $key, $item">
|
||||
<a href="{getUrl('','document_srl',$item->document_srl)}#comment_{$item->comment_srl}" class="cont_a no_delete" onclick="window.open(this.href);return false;">
|
||||
<span class="content_basic">
|
||||
<span class="content_title">
|
||||
{$item->getSummary() ?: lang('comment.msg_no_text_comment')}
|
||||
</span>
|
||||
<span class="content_subinfo">
|
||||
{$item->getRegdate("Y-m-d")}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
<li><a href="{getUrl('page','','module_srl','')}" class="direction">‹ {lang('common.first_page')}</a></li>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<li class="active"|cond="$page == $page_no"><a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
<li><a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{lang('common.last_page')} ›</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sw-footer sw-anchor-buttons">
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;">{lang('module.cmd_find_module')}</a>
|
||||
<a href="{getUrl('selected_module_srl','')}" cond="$selected_module_srl">{lang('common.cmd_cancel')}</a>
|
||||
</div>
|
||||
<include target="./common_footer.html" />
|
||||
53
modules/member/tpl/features_config.html
Normal file
53
modules/member/tpl/features_config.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<include target="header.html" />
|
||||
<load target="js/default_config.js" />
|
||||
<form action="./" class="x_form-horizontal" method="post">
|
||||
<input type="hidden" name="module" value="member" />
|
||||
<input type="hidden" name="act" value="procMemberAdminInsertFeaturesConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', $act)}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/tpl/1" />
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_view_scrapped_document}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="scrapped_documents_Y"><input type="radio" name="scrapped_documents" id="scrapped_documents_Y" value="Y" checked="checked"|cond="$config->features['scrapped_documents'] !== false" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="scrapped_documents_N"><input type="radio" name="scrapped_documents" id="scrapped_documents_N" value="N" checked="checked"|cond="$config->features['scrapped_documents'] === false" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_view_saved_document}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="saved_documents_Y"><input type="radio" name="saved_documents" id="saved_documents_Y" value="Y" checked="checked"|cond="$config->features['saved_documents'] !== false" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="saved_documents_N"><input type="radio" name="saved_documents" id="saved_documents_N" value="N" checked="checked"|cond="$config->features['saved_documents'] === false" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_view_own_document}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="my_documents_Y"><input type="radio" name="my_documents" id="my_documents_Y" value="Y" checked="checked"|cond="$config->features['my_documents'] !== false" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="my_documents_N"><input type="radio" name="my_documents" id="my_documents_N" value="N" checked="checked"|cond="$config->features['my_documents'] === false" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_view_own_comment}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="my_comments_Y"><input type="radio" name="my_comments" id="my_comments_Y" value="Y" checked="checked"|cond="$config->features['my_comments'] !== false" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="my_comments_N"><input type="radio" name="my_comments" id="my_comments_N" value="N" checked="checked"|cond="$config->features['my_comments'] === false" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_view_active_logins}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="active_logins_Y"><input type="radio" name="active_logins" id="active_logins_Y" value="Y" checked="checked"|cond="$config->features['active_logins'] !== false" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="active_logins_N"><input type="radio" name="active_logins" id="active_logins_N" value="N" checked="checked"|cond="$config->features['active_logins'] === false" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_modify_nickname_log}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="nickname_log_Y"><input type="radio" name="nickname_log" id="nickname_log_Y" value="Y" checked="checked"|cond="$config->update_nickname_log === 'Y' && $config->features['nickname_log'] !== false" disabled="disabled"|cond="$config->update_nickname_log !== 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="nickname_log_N"><input type="radio" name="nickname_log" id="nickname_log_N" value="N" checked="checked"|cond="$config->update_nickname_log !== 'Y' || $config->features['nickname_log'] === false" disabled="disabled"|cond="$config->update_nickname_log !== 'Y'" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnArea x_clearfix">
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act == 'dispMemberAdminConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminConfig')}">{$lang->member_default_info}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispMemberAdminConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminConfig')}">{$lang->member_default_config}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispMemberAdminFeaturesConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminFeaturesConfig')}">{$lang->member_features_config}</a></li>
|
||||
<li id="signupTab" class="x_active"|cond="$act == 'dispMemberAdminSignUpConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminSignUpConfig')}">{$lang->cmd_signup}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispMemberAdminLoginConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminLoginConfig')}">{$lang->cmd_login}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispMemberAdminDesignConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminDesignConfig')}">{$lang->cmd_set_design_info}</a></li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue