웹마스터 팁
page_full_width">
푸시윙 댓글푸쉬서비스 소셜댓글 모드도 추가하기
2014.05.11 09:20
addons/pushwing_comment.addon.php 파일내에
1 2 3 4 5 6 | function after_module_proc( $obj ) { 생략 } |
해당 구문 하단에 아래로 교체
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | { if ( $obj ->act == 'procSocialxeInsertComment' || $obj ->act == 'procBoardInsertComment' ) { $data = Context::getRequestVars(); $oDocumentModel = &getModel( 'document' ); $oMemberModel = &getModel( 'member' ); $oDocument = $oDocumentModel ->getDocument( $data ->document_srl); $oMemberInfo = $oMemberModel ->getMemberInfoByMemberSrl( $oDocument ->variables[ 'member_srl' ]); $oMyInfo = $oMemberModel ->getLoggedInfo(); if ( isset( $this ->addon_info->pushwing_mnocol) && $this ->addon_info->pushwing_mnocol != '' && isset( $oMemberInfo ->{ $this ->addon_info->pushwing_mnocol}) && $oMemberInfo ->{ $this ->addon_info->pushwing_mnocol} && $oMyInfo ->member_srl != $oMemberInfo ->member_srl ) { $mno = $oMemberInfo ->{ $this ->addon_info->pushwing_mnocol}; $mno = is_array ( $mno ) && ! empty ( $mno ) ? implode( '' , $mno ) : $mno ; $this ->send_pushwing( array ( 'mno' => $mno , 'data' => $data , 'document' => $oDocument , 'nick_name' => $oMyInfo ->nick_name )); } } } |
더 간단하게 적용하실 수 있겠지만 초보라^^;
해당 파일도 함께 업로드합니다. 그냥 붙여넣기 하셔도 되요
그부분에해당 적용된 코드가 위아래가 같은 상황이라면 궂이 이렇게 코드 늘릴 필요가 없습니다.
if
(
$obj
->act ==
'procSocialxeInsertComment' ||
$obj
->act ==
'procBoardInsertComment')
{
내용
}
이렇게 처리 해주셔도 됩니다.