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:
zero 2008-06-02 10:50:58 +00:00
parent bc963aa72f
commit 4cdce7e4cf
26 changed files with 422 additions and 115 deletions

View file

@ -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);
}
}
?>

View file

@ -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);
}