묻고답하기
회원 아이디 클릭시 나오는 팝업창에 아이콘 삽입하려면?
2013.05.24 17:04
xe1.4 처럼 xe1.5에서도 회원 아이디 클릭 시 나오는 팝업창에 아이콘을 추가하고 싶습니다.
어디에 가서 손을 보면 될가요...?
function getMemberMenu() { // Get member_srl of he target member and logged info of the current user $member_srl = Context::get('target_srl'); $mid = Context::get('cur_mid'); $logged_info = Context::get('logged_info'); $act = Context::get('cur_act'); // When click user's own nickname if($member_srl == $logged_info->member_srl) $member_info = $logged_info; // When click other's nickname else $member_info = $this->getMemberInfoByMemberSrl($member_srl); $member_srl = $member_info->member_srl; if(!$member_srl) return; // List variables $user_id = $member_info->user_id; $user_name = $member_info->user_name; ModuleHandler::triggerCall('member.getMemberMenu', 'before', $null); $oMemberController = &getController('member'); // Display member information (Don't display to non-logged user) if($logged_info->member_srl) { $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'); } // When click other's nickname if($member_srl != $logged_info->member_srl && $logged_info->member_srl) { // Send an email if($member_info->email_address) { $url = 'mailto:'.htmlspecialchars($member_info->email_address); $icon_path = './modules/member/tpl/images/icon_view_info.gif'; $oMemberController->addMemberPopupMenu($url,'cmd_send_email',$icon_path); } } // View homepage info if($member_info->homepage) $oMemberController->addMemberPopupMenu(htmlspecialchars($member_info->homepage), 'homepage', '', 'blank'); // View blog info if($member_info->blog) $oMemberController->addMemberPopupMenu(htmlspecialchars($member_info->blog), 'blog', '', 'blank'); // Call a trigger (after) ModuleHandler::triggerCall('member.getMemberMenu', 'after', $null); // Display a menu for editting member info to a top administrator if($logged_info->is_admin == 'Y') { $url = getUrl('','module','admin','act','dispMemberAdminInsert','member_srl',$member_srl); $icon_path = './modules/member/tpl/images/icon_view_info.gif'; $oMemberController->addMemberPopupMenu($url,'cmd_manage_member_info',$icon_path,'MemberModifyInfo'); $url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','member_srl','search_keyword',$member_srl); $icon_path = './modules/member/tpl/images/icon_view_info.gif'; $oMemberController->addMemberPopupMenu($url,'cmd_trace_document',$icon_path,'TraceMemberDocument'); $url = getUrl('','module','admin','act','dispCommentAdminList','search_target','member_srl','search_keyword',$member_srl); $icon_path = './modules/member/tpl/images/icon_view_info.gif'; $oMemberController->addMemberPopupMenu($url,'cmd_trace_comment',$icon_path,'TraceMemberComment'); } // Change a language of pop-up menu $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); } // Get a list of finalized pop-up menu $this->add('menus', $menus); }
여기에 $icon_path = './modules/member/tpl/images/icon_view_info.gif';
를 추가하였는데요 나오질 않습니다. 이미지는 경로에 제대로 있구요 icon_path 자리에
그냥 파일경로를 적어줘도 꿈쩍도 않습니다.
$icon_path 란게 있다면, 분명 아이콘을 표현해주기 위해 존재하는 것일텐데
왜 작동이 안되는 걸까요.
member.controller.php 에도 이러한 부분이 있는데
$icon 변수는 있는데 왜 안되는 걸까요
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);
}
도움이 필요합니다. 도와주세요 ㅜㅜ