mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
1. 회원/게시글/댓글 팝업메뉴를 controller의 method를 이용하여 손쉽게 추가할 수 있도록 변경
2. 게시글/ 댓글 팝업메뉴에 아이콘 추가 3. 쪽지 발송/ 친구 관련 메뉴의 on/off를 member_communication 애드온으로 활성/비활성 할 수 있도록 변경 4. IE에서 페이지를 찾을 수 없다는 오류가 발생하는 window onload이전에 DOM을 건드리는 코드에 대한 보완책 적용 5. XML RPC 결과 출력시 1depth이상의 배열 또는 오브젝트 데이터를 Simple XML 형식으로 출력할 수 있도록 하고 Javascript에서 이를 다차원 배열로 parsing하도록 코드 변경 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4230 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bc963aa72f
commit
4cdce7e4cf
26 changed files with 422 additions and 115 deletions
|
|
@ -281,18 +281,19 @@
|
|||
if($cur_module_info->module != 'board') return new Object();
|
||||
|
||||
// 자신의 아이디를 클릭한 경우
|
||||
if($member_srl == $logged_info->member_srl) $member_info = $logged_info;
|
||||
else {
|
||||
if($member_srl == $logged_info->member_srl) {
|
||||
$member_info = $logged_info;
|
||||
} else {
|
||||
$oMemberModel = &getModel('member');
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
}
|
||||
|
||||
if(!$member_info->user_id) return new Object();
|
||||
|
||||
// 아이디로 검색
|
||||
$menu_str = Context::getLang('cmd_view_own_document');
|
||||
$menu_url = sprintf('./?mid=%s&search_target=user_id&search_keyword=%s', $mid, $member_info->user_id);
|
||||
$obj[] = sprintf('%s,%s,move_url(\'%s\')', Context::getRequestUri().'/modules/member/tpl/images/icon_view_written.gif',$menu_str, $menu_url);
|
||||
// 아이디로 검색기능 추가
|
||||
$url = getUrl('','mid',$mid,'search_target','user_id','search_keyword',$member_info->user_id);
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->addMemberPopupMenu($url, 'cmd_view_own_document', './modules/member/tpl/images/icon_view_written.gif');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -532,5 +532,21 @@
|
|||
$this->setMessage('success_declared');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글의 이 댓글을.. 클릭시 나타나는 팝업 메뉴를 추가하는 method
|
||||
**/
|
||||
function addCommentPopupMenu($url, $str, $icon = '', $target = 'self') {
|
||||
$comment_popup_menu_list = Context::get('comment_popup_menu_list');
|
||||
if(!is_array($comment_popup_menu_list)) $comment_popup_menu_list = array();
|
||||
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
$obj->target = $target;
|
||||
$comment_popup_menu_list[] = $obj;
|
||||
|
||||
Context::set('comment_popup_menu_list', $comment_popup_menu_list);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -32,31 +32,36 @@
|
|||
// trigger 호출
|
||||
ModuleHandler::triggerCall('comment.getCommentMenu', 'before', $menu_list);
|
||||
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
// 회원이어야만 가능한 기능
|
||||
if($logged_info->member_srl) {
|
||||
|
||||
// 추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentVoteUp','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentVoteUp','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_vote','./modules/document/tpl/icons/vote_up.gif','javascript');
|
||||
|
||||
// 비추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote_down');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentVoteDown','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentVoteDown','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_vote_down','./modules/document/tpl/icons/vote_down.gif','javascript');
|
||||
|
||||
// 신고 기능 추가
|
||||
$menu_str = Context::getLang('cmd_declare');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentDeclare','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentDeclare','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_declare','./modules/document/tpl/icons/declare.gif','javascript');
|
||||
}
|
||||
|
||||
// trigger 호출 (after)
|
||||
ModuleHandler::triggerCall('comment.getCommentMenu', 'after', $menu_list);
|
||||
|
||||
// 정보를 저장
|
||||
$this->add("menu_list", implode("\n",$menu_list));
|
||||
// 팝업메뉴의 언어 변경
|
||||
$menus = Context::get('comment_popup_menu_list');
|
||||
$menus_count = count($menus);
|
||||
for($i=0;$i<$menus_count;$i++) {
|
||||
$menus[$i]->str = Context::getLang($menus[$i]->str);
|
||||
}
|
||||
|
||||
// 최종적으로 정리된 팝업메뉴 목록을 구함
|
||||
$this->add('menus', $menus);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -917,5 +917,22 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 게시물의 이 게시물을.. 클릭시 나타나는 팝업 메뉴를 추가하는 method
|
||||
**/
|
||||
function addDocumentPopupMenu($url, $str, $icon = '', $target = 'self') {
|
||||
$document_popup_menu_list = Context::get('document_popup_menu_list');
|
||||
if(!is_array($document_popup_menu_list)) $document_popup_menu_list = array();
|
||||
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
$obj->target = $target;
|
||||
$document_popup_menu_list[] = $obj;
|
||||
|
||||
Context::set('document_popup_menu_list', $document_popup_menu_list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -54,40 +54,44 @@
|
|||
// trigger 호출
|
||||
ModuleHandler::triggerCall('document.getDocumentMenu', 'before', $menu_list);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 인쇄 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_print');
|
||||
$menu_link = sprintf("%s?document_srl=%s&act=dispDocumentPrint",Context::getRequestUri(),$document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,winopen('%s','MemberModifyInfo')", '' ,$menu_str, $menu_link);
|
||||
$url = getUrl('','module','document','act','dispDocumentPrint','document_srl',$document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_print','./modules/document/tpl/icons/print.gif','printDocument');
|
||||
|
||||
// 회원이어야만 가능한 기능
|
||||
if($logged_info->member_srl) {
|
||||
|
||||
// 추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote');
|
||||
$menu_link = sprintf("doCallModuleAction('document','procDocumentVoteUp','%s')", $document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentVoteUp','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote','./modules/document/tpl/icons/vote_up.gif','javascript');
|
||||
|
||||
// 비추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote_down');
|
||||
$menu_link = sprintf("doCallModuleAction('document','procDocumentVoteDown','%s')", $document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url= sprintf("doCallModuleAction('document','procDocumentVoteDown','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote_down','./modules/document/tpl/icons/vote_down.gif','javascript');
|
||||
|
||||
// 신고 기능 추가
|
||||
$menu_str = Context::getLang('cmd_declare');
|
||||
$menu_link = sprintf("doCallModuleAction('document','procDocumentDeclare','%s')", $document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentDeclare','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_declare','./modules/document/tpl/icons/declare.gif','javascript');
|
||||
|
||||
// 스크랩 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_scrap');
|
||||
$menu_link = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_scrap','./modules/document/tpl/icons/scrap.gif','javascript');
|
||||
}
|
||||
|
||||
// trigger 호출 (after)
|
||||
ModuleHandler::triggerCall('document.getDocumentMenu', 'after', $menu_list);
|
||||
|
||||
// 정보를 저장
|
||||
$this->add("menu_list", implode("\n",$menu_list));
|
||||
// 팝업메뉴의 언어 변경
|
||||
$menus = Context::get('document_popup_menu_list');
|
||||
$menus_count = count($menus);
|
||||
for($i=0;$i<$menus_count;$i++) {
|
||||
$menus[$i]->str = Context::getLang($menus[$i]->str);
|
||||
}
|
||||
|
||||
// 최종적으로 정리된 팝업메뉴 목록을 구함
|
||||
$this->add('menus', $menus);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
BIN
modules/document/tpl/icons/declare.gif
Executable file
BIN
modules/document/tpl/icons/declare.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 98 B |
BIN
modules/document/tpl/icons/print.gif
Executable file
BIN
modules/document/tpl/icons/print.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1,017 B |
BIN
modules/document/tpl/icons/scrap.gif
Executable file
BIN
modules/document/tpl/icons/scrap.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 371 B |
BIN
modules/document/tpl/icons/send_trackback.gif
Executable file
BIN
modules/document/tpl/icons/send_trackback.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 118 B |
BIN
modules/document/tpl/icons/vote_down.gif
Executable file
BIN
modules/document/tpl/icons/vote_down.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 345 B |
BIN
modules/document/tpl/icons/vote_up.gif
Executable file
BIN
modules/document/tpl/icons/vote_up.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 343 B |
|
|
@ -965,11 +965,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 사용자의 전용 메뉴 구성 (이 메뉴는 애드온등으로 변경될 수 있음)
|
||||
$member_info->menu_list['dispMemberInfo'] = 'cmd_view_member_info';
|
||||
$member_info->menu_list['dispMemberScrappedDocument'] = 'cmd_view_scrapped_document';
|
||||
$member_info->menu_list['dispMemberSavedDocument'] = 'cmd_view_saved_document';
|
||||
$member_info->menu_list['dispMemberOwnDocument'] = 'cmd_view_own_document';
|
||||
// 사용중지 아이디이면 세션 파기
|
||||
if($member_info->denied=='Y') {
|
||||
$this->destroySessionInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
// 오픈아이디인지 체크 (일단 아이디 형식으로만 결정)
|
||||
if(preg_match("/^([0-9a-z]+)$/is", $member_info->user_id)) $member_info->is_openid = false;
|
||||
|
|
@ -997,11 +997,44 @@
|
|||
|
||||
// 세션에 로그인 사용자 정보 저장
|
||||
$_SESSION['logged_info'] = $member_info;
|
||||
|
||||
Context::set('is_logged', true);
|
||||
Context::set('logged_info', $member_info);
|
||||
|
||||
// 사용자의 전용 메뉴 구성 (이 메뉴는 애드온등으로 변경될 수 있음)
|
||||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 로그인한 사용자의 개인화된 메뉴 제공을 위한 method
|
||||
* 로그인 정보 출력 위젯 또는 개인화 페이지에서 사용됨
|
||||
**/
|
||||
function addMemberMenu($act, $str) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$logged_info->menu_list[$act] = Context::getLang($str);
|
||||
|
||||
Context::set('logged_info', $logged_info);
|
||||
$_SESSION['logged_info'] = $logged_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 로그인 회원의 닉네임등을 클릭할때 나타나는 팝업 메뉴를 추가하는 method
|
||||
**/
|
||||
function addMemberPopupMenu($url, $str, $icon = '', $target = 'self') {
|
||||
$member_popup_menu_list = Context::get('member_popup_menu_list');
|
||||
if(!is_array($member_popup_menu_list)) $member_popup_menu_list = array();
|
||||
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
$obj->target = $target;
|
||||
$member_popup_menu_list[] = $obj;
|
||||
|
||||
Context::set('member_popup_menu_list', $member_popup_menu_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief member 테이블에 사용자 추가
|
||||
|
|
|
|||
|
|
@ -41,48 +41,56 @@
|
|||
// 변수 정리
|
||||
$user_id = $member_info->user_id;
|
||||
$user_name = $member_info->user_name;
|
||||
$email_address = $member_info->email_address;
|
||||
|
||||
// menu_list 에 "표시할글,target,url" 을 배열로 넣는다
|
||||
$menu_list = array();
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'before', $null);
|
||||
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'before', $menu_list);
|
||||
$oMemberController = &getController('member');
|
||||
|
||||
// 최고 관리자라면 회원정보 수정 메뉴 만듬
|
||||
if($logged_info->is_admin == 'Y') {
|
||||
$menu_str = Context::getLang('cmd_management');
|
||||
$menu_link = sprintf("%s?module=admin&act=dispMemberAdminInsert&member_srl=%s",Context::getRequestUri(),$member_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,winopen('%s','MemberModifyInfo')", Context::getRequestUri().'/modules/member/tpl/images/icon_management.gif',$menu_str, $menu_link);
|
||||
$url = getUrl('','module','admin','act','dispMemberAdminInsert','member_srl',$member_srl);
|
||||
$icon_path = './modules/member/tpl/images/icon_management.gif';
|
||||
$oMemberController->addMemberPopupMenu($url,'cmd_management',$icon_path,'MemberModifyInfo');
|
||||
}
|
||||
|
||||
// 회원 정보 보기 (비회원일 경우 볼 수 없도록 수정)
|
||||
if($logged_info->member_srl) {
|
||||
$menu_str = Context::getLang('cmd_view_member_info');
|
||||
$menu_url = sprintf('./?mid=%s&act=dispMemberInfo&member_srl=%s', $mid, $member_srl);
|
||||
$menu_list[] = sprintf('%s,%s,move_url(\'%s\')', Context::getRequestUri().'/modules/member/tpl/images/icon_view_info.gif', $menu_str, $menu_url);
|
||||
$url = getUrl('','mid',$mid,'act','dispMemberInfo','member_srl',$member_srl);
|
||||
$icon_path = './modules/member/tpl/images/icon_view_info.gif';
|
||||
$oMemberController->addMemberPopupMenu($url,'cmd_view_member_info',$icon_path,'self');
|
||||
}
|
||||
|
||||
// 다른 사람의 아이디를 클릭한 경우
|
||||
if($member_srl != $logged_info->member_srl) {
|
||||
|
||||
// 메일 보내기
|
||||
$menu_str = Context::getLang('cmd_send_email');
|
||||
//$menu_url = sprintf('%s <%s>', $email_address, $user_name);
|
||||
$menu_url = sprintf('%s', $email_address);
|
||||
$menu_list[] = sprintf('%s,%s,sendMailTo(\'%s\')', Context::getRequestUri().'/modules/member/tpl/images/icon_sendmail.gif', $menu_str, $menu_url);
|
||||
if($member_info->email_address) {
|
||||
$url = 'mailto:'.$member_info->email_address;
|
||||
$icon_path = './modules/member/tpl/images/icon_sendmail.gif';
|
||||
$oMemberController->addMemberPopupMenu($url,'cmd_send_email',$icon_path);
|
||||
}
|
||||
}
|
||||
|
||||
// 홈페이지 보기
|
||||
if($member_info->homepage) $menu_list[] = sprintf("%s,%s,winopen('%s')", Context::getRequestUri().'/modules/member/tpl/images/icon_homepage.gif',Context::getLang('homepage'), $member_info->homepage);
|
||||
if($member_info->homepage)
|
||||
$oMemberController->addMemberPopupMenu($member_info->homepage, 'homepage', './modules/member/tpl/images/icon_homepage.gif','blank');
|
||||
|
||||
// 블로그 보기
|
||||
if($member_info->blog) $menu_list[] = sprintf("%s,%s,winopen('%s')", Context::getRequestUri().'/modules/member/tpl/images/icon_blog.gif', Context::getLang('blog'), $member_info->blog);
|
||||
if($member_info->blog)
|
||||
$oMemberController->addMemberPopupMenu($member_info->blog, 'blog', './modules/member/tpl/images/icon_blog.gif','blank');
|
||||
|
||||
// trigger 호출 (after)
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'after', $menu_list);
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'after', $null);
|
||||
|
||||
// 정보를 저장
|
||||
$this->add("menu_list", implode("\n",$menu_list));
|
||||
// 팝업메뉴의 언어 변경
|
||||
$menus = Context::get('member_popup_menu_list');
|
||||
$menus_count = count($menus);
|
||||
for($i=0;$i<$menus_count;$i++) {
|
||||
$menus[$i]->str = Context::getLang($menus[$i]->str);
|
||||
}
|
||||
|
||||
// 최종적으로 정리된 팝업메뉴 목록을 구함
|
||||
$this->add('menus', $menus);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@
|
|||
if($oDocument->getMemberSrl() != $logged_info->member_srl) return new Object();
|
||||
|
||||
// 엮인글 발송 링크 추가
|
||||
$menu_str = Context::getLang('cmd_send_trackback');
|
||||
$menu_link = sprintf("%s?module=trackback&act=dispTrackbackSend&document_srl=%s",Context::getRequestUri(),$document_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,popopen('%s','SendTrackback')", '', $menu_str, $menu_link);
|
||||
$oDocumentController = &getController('document');
|
||||
$url = getUrl('module','trackback','act','dispTrackbackSend','document_srl', $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_send_trackback','./modules/document/tpl/icons/send_trackback.gif','popup');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue