mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
쪽지 모듈의 모바일 지원을 향상시켰습니다. 이 PR 이후에 회원 모듈의 모바일 지원을 향상 시키면 XE의 모바일 지원 수준이 한 단계 상승하게 됩니다. 꼭 반영되길 바랍니다! ## 수정 내용 * 커뮤니케이션 애드온의 회원 메뉴 설정 기능을 모듈의 트리거로 처리하여 조금 더 직관적으로 설정하게 됨. * 기본값은 모듈이 동작 하도록 함. * 모듈을 켜고 끌 수 있도록 함. * 모바일에서 친구 추가를 할 수 있게 함. * 스타일 아주 조금 다듬음.
42 lines
1.6 KiB
PHP
42 lines
1.6 KiB
PHP
<?php
|
|
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
|
|
|
if(!defined('__XE__'))
|
|
exit();
|
|
|
|
/**
|
|
* @file member_communication.addon.php
|
|
* @author NAVER (developers@xpressengine.com)
|
|
* @brief Promote user communication
|
|
*
|
|
* - Pop-up the message if new message comes in
|
|
* - When calling MemberModel::getMemberMenu, feature to send a message is added
|
|
* - When caliing MemberModel::getMemberMenu, feature to add a friend is added
|
|
*/
|
|
// Stop if non-logged-in user is
|
|
$logged_info = Context::get('logged_info');
|
|
if(!$logged_info|| isCrawler())
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* Message/Friend munus are added on the pop-up window and member profile. Check if a new message is received
|
|
* */
|
|
if($this->module != 'member' && $called_position == 'before_module_init')
|
|
{
|
|
$flag_file = _XE_PATH_ . 'files/member_extra_info/new_message_flags/' . getNumberingPath($logged_info->member_srl) . $logged_info->member_srl;
|
|
if($addon_info->use_alarm != 'N' && file_exists($flag_file))
|
|
{
|
|
// Pop-up to display messages if a flag on new message is set
|
|
$new_message_count = (int) trim(FileHandler::readFile($flag_file));
|
|
FileHandler::removeFile($flag_file);
|
|
Context::loadLang(_XE_PATH_ . 'addons/member_communication/lang');
|
|
Context::loadFile(array('./addons/member_communication/tpl/member_communication.js'), true);
|
|
|
|
$text = preg_replace('@\r?\n@', '\\n', addslashes(Context::getLang('alert_new_message_arrived')));
|
|
Context::addHtmlFooter("<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>");
|
|
}
|
|
}
|
|
/* End of file member_communication.addon.php */
|
|
/* Location: ./addons/member_communication/member_communication.addon.php */
|