라이믹스에서는 댓글 알림이 작동하지 않던데

소스코드를 조금만 수정하면 라이믹스에서도 사용이 가능할 것 같아 질문드립니다!

 

라이믹스에서 사용되지 않는 문법을 사용해서 작동하지 않는 것 같은데 어디를 수정하면 될까요?

 

// 댓글 달기.
if (Context::get('act') == 'procBoardInsertComment')
{
$data = Context::getRequestVars();

$content=$data->content;
$content=str_replace( " ", "", $content );
$content=str_replace( "\r\n", "", $content );
$content=str_replace( "<p>", "", $content );
$content=str_replace( "</p>", "</p>\r\n", $content );
$content=strip_tags($content);
$content=cut_str($content, $content_cut);
$document_srl = $this->get('document_srl');
$document_srl_check = Context::get('document_srl');

$oModuleModel = &getModel('module');
$minfo = $oModuleModel->getModuleInfoByMid($data->mid);

$oDocumentModel = &getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl_check);

$oCommentModel = &getModel('comment');
$comment_srl = Context::get('comment_srl');
$oComment = $oCommentModel->getComment($comment_srl);

$oMemberModel = &getModel('member');
$member_srl = $oMemberModel->getMemberSrlByNickName($data->member_nickname);

if ($addon_info->except)
{
$except = explode(',',$addon_info->except);
if (in_array($oComment->get('member_srl'), $except))
return ;
if (in_array($member_srl, $except))
return ;
}

if( $oComment->isExists() )
{
if ($addon_info->cmt_mod == 'n')
return ;

$newtgmsg = "text=";
$newtgmsg = addslashes($oComment->getNickName())."님의 댓글이 수정되었습니다.\r\n\r\n";
$newtgmsg = $newtgmsg."[".addslashes($minfo->browser_title)."]\r\n";
$newtgmsg = $newtgmsg."제목 : ".addslashes(strip_tags($oDocument->getTitle()))." (".addslashes($oDocument->getNickName())."님의 게시글)"."\r\n";
if ($addon_info->show_content == 'y')
$newtgmsg = $newtgmsg."내용 :\r\n".addslashes($content)."\r\n\r\n";
else
$newtgmsg = $newtgmsg."\r\n";
$newtgmsg = $newtgmsg.getNotEncodedFullUrl('', 'mid', $data->mid, 'document_srl', $document_srl)."#comment_".addslashes($data->comment_srl);
}
else
{
if ($addon_info->cmt_new == 'n')
return ;

if($data->member_nickname != '')
{
$nick_name = $data->member_nickname;
}
else
{
$nick_name = $data->nick_name;
}
$newtgmsg = "text=";
$newtgmsg = addslashes($nick_name)."님이 새 댓글을 등록하였습니다.\r\n\r\n";
$newtgmsg = $newtgmsg."[".addslashes($minfo->browser_title)."]\r\n";
$newtgmsg = $newtgmsg."제목 : ".addslashes(strip_tags($oDocument->getTitle()))." (".addslashes($oDocument->getNickName())."님의 게시글)"."\r\n";
if ($addon_info->show_content == 'y')
$newtgmsg = $newtgmsg."내용 :\r\n".addslashes($content)."\r\n\r\n";
else
$newtgmsg = $newtgmsg."\r\n";
$newtgmsg = $newtgmsg.getNotEncodedFullUrl('', 'mid', $data->mid, 'document_srl', $document_srl);
}

$chat_id_01 = $addon_info->chat_id_01;
$token = $addon_info->bot_token;

$command = "curl -k -d chat_id=".$chat_id_01." -d \"text=".$newtgmsg."\" https://api.telegram.org/bot".$token."/sendMessage";
$result = shell_exec($command);

$chat_id_02 = $addon_info->chat_id_02;
$token = $addon_info->bot_token;

$command = "curl -k -d chat_id=".$chat_id_02." -d \"text=".$newtgmsg."\" https://api.telegram.org/bot".$token."/sendMessage";
$result = shell_exec($command);
}