묻고답하기

게시 글을 밴드에 공유하여 사용하고 있는데 문제가 있어서요.

게시 글에는 줄 바꿈을 하는데 밴드 글 공유하려면 1열로 쭈 ~욱 나오네요.

ex)

게시글 에는

○ 밴드에 공유하기

○ 공유하기

이렇게 글 등록하고 밴드로 공유하면

밴드 에는

○ 밴드에 공유하기 ○ 공유하기

이렇게 글이 연동되네요.

게시글처럼 줄 바꿈이 되도록 할 수는 없을까요??

 

아래 밴드 공유하기 애드온  소스입니다.

<?php
if(!defined("__XE__")) exit();
 
if(Context::getResponseMethod() == "XMLRPC" || Context::get('module') == "admin") return;
if($called_position != "before_display_content") return;
 
if($called_position == 'before_display_content' && Context::getResponseMethod() == 'HTML') {
    $pos_regx = "!<\!--AfterDocument\(([0-9]+),([0-9]+)\)-->!is";
        $document_srl = intval(Context::get('document_srl'));
        $oDocumentModel = &getModel('document');
 
        $oDocument = $oDocumentModel->getDocument(Context::get('document_srl'), false, false);
        if (!$oDocument) return;
 
        $appid = $addon_info->appid;
        if (!$appid) $appid = 'm.kakao.com';
        $appver = $addon_info->appver;
        if (!$appver) $appver = '2.0';
        $apiver = $addon_info->apiver;
        if (!$apiver) $apiver = '1.0';
        $appname = $addon_info->appname;
        if (!$appname) $appname = 'Community Website';
        $button_align = $addon_info->button_align;
        $button_width = $addon_info->button_width;
        if (!$button_width) $button_width = '35';

        //밴드 보내기를 위한 알고리즘
        $band_sand_title = $oDocument->getTitleText(); //제목
        $mypeople_link=$band_sand_url = $oDocument->getPermanentUrl(); //링크주소
        $mypeople_prefix=$band_sand_msg = $oDocument->getSummary(500);  //글내용
        $mypeople_prefix1=$band_sand = rawurlencode("제목 : ".$band_sand_title).urlencode("\n\n").rawurlencode($band_sand_msg).urlencode("\n출처:").$appname;

        //모바일인지 체크
        $mobile_agent = '/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH-M\d+|Opera Mini|Windows CE|Nokia|SonyEricsson|webOS|PalmOS)/';
        if(preg_match($mobile_agent, $_SERVER['HTTP_USER_AGENT'])){
            $before = '<div style="text-align: '.$button_align.';">
   
   <a href="kakaolink://sendurl?msg='.$band_sand.'&appid='.$appid.'&apiver='.$apiver.'&appver='.$appver.'&appname='.$appname.'" >
   <img src="/addons/msn/img/kakaotalkicon.png" border="0" width="'.$button_width.'" alt="카카오톡 모바일용"></a>
  
   <a href="storylink://posting?post='.$oDocument->getTitleText().'%0A%0A'.rawurlencode($band_sand_msg).urlencode("\n\n더보기=>").$oDocument->getPermanentUrl().'&appid='.$appid.'&apiver='.$apiver.'&appver='.$appver.'&appname='.$appname.'&urlinfo='.$result.'" ><img src="/addons/msn/img/kakaostoryicon.png" width="'.$button_width.'" /></a>

   <a href="bandapp://create/post?text='.$band_sand.'" >
   <img src="/addons/msn/img/bandicon.png" width="'.$button_width.'" /></a>

   <a href="https://m.mypeople.daum.net/mypeople/mweb/share.do?link='.$mypeople_link.'&prefix='.$mypeople_prefix.'&source_id=none" >
            <img src="/addons/msn/img/mypeople.png" border="0" width="'.$button_width.'" alt="마이피플 모바일용"></a>
   
   <a href="https://m.facebook.com/sharer.php?u='.$mypeople_link.'&ko='.$mypeople_prefix.'&source_id=none">
            <img src="/addons/msn/img/facebook.png" border="0" width="'.$button_width.'" alt="페이스북 모바일용"></a>
   
   <a href="https://twitter.com/share?text='.$mypeople_prefix.'&url='.$mypeople_link.'&source_id=none">
            <img src="/addons/msn/img/twitter.png" border="0" width="'.$button_width.'" alt="트위터 모바일용"></a>

   <a href="http://plus.google.com/share?url='.$mypeople_link.'?l=ko='.$mypeople_prefix.'&source_id=none">
            <img src="/addons/msn/img/google.png" border="0" width="'.$button_width.'" alt="구글플러스 모바일용"></a>

   <a  href="line://msg/text/'.$mypeople_prefix.'%0D%0A'.$mypeople_link.'&source_id=none">
   <img src="/addons/msn/img/line.png" border="0" width="'.$button_width.'" alt="라인 모바일용"></a>

   </div>';
            $output = preg_replace($pos_regx, "<!--AfterDocument($1,$2)-->".$before, $output);
            }else{
            $before = '<div style="text-align: '.$button_align.';">

      <a href="http://www.band.us/plugin/share?body='.$band_sand.'&ko&referrer='.$mypeople_prefix1.'" target="_blank" >
      <img src="/addons/msn/img/bandicon.png" title= "밴드에 공유하기!"width="'.$button_width.'" />
            
   </div>';
            $output = preg_replace($pos_regx, "<!--AfterDocument($1,$2)-->".$before, $output);
            }
}
?>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
초희67 xe 1.4x 에서 1.7.11 로 데이터이전이 안되는데요...^^ [4] 2015.11.04 by 초희67
상해파 rssboard에서 insertDocument에 값이 안들어가는 문제 [1] 2015.11.04 by gonom
하프하프 헤더스크립트 질문입니다! file  
Golden-mean 모바일 자동비밀글 소스  
김쪼도사 팝업 관리 애드온의 닫기 버튼 오류 file  
비누남어 XEition 수정 레이아웃 bootstrap 적용여부?  
김햄C 포인트 중복 차감 오류 [2] 2015.11.04 by 김햄C
난나야9 관리자화면 회원관리에서 관리자계정 안보이게 하는 방법 [2] 2015.11.04 by 난나야9
해악사마 설문조사 참여시 페이지 새로고침 안되게 하는 법  
뵤로뤙 게시판 본문 보기에 전화번호 표기하고싶어요.  
좋은아빠되기 로그인 지연 현상 [15] 2015.11.04 by 좋은아빠되기
김쪼도사 페이지 로딩 시 자동으로 뜨는 modal layer 추가 방법 [4] file 2015.11.04 by 김쪼도사
pil 홈페이지 들어가면 에러가 납니다.  
pil 도와주세요 ㅠㅠ홈페이지 들어가면...  
피요 스케치북 복사및 설정메뉴가 안떠요.. [3] file 2015.11.04 by 피요
이원희884 쉬운설치가 않되는 경우는 어떤 이유가 있을까요? [1] 2015.11.04 by XE카오스
Bryan! 게시판 알림 기능 [3] 2015.11.04 by 피코스스
더풀_mts 호스팅은 무조건 돈내야만 구매할 수 있나요? [6] 2015.11.04 by 피코스스
위드시크릿 글쓰기 사용자 정의 줄바꿈 질문드립니다 [3] file 2015.11.04 by mindpainter
tk87 타임라인 글쓰기시 게시판 선택목록 출력 [1] file 2015.11.04 by tk87
에잇 게시판 문의 [1] 2015.11.03 by Luatic™
JUNG 설정에서 업데이트 관련 문의입니당! [1] file 2015.11.03 by Luatic™
라이징썬 ssl 설치 시 멀티 도메인 설정 관련 문의드립니다.^^꼭즘 부탁드려요 [1] 2015.11.03 by Luatic™
기만1988 회원 모두에게 개인게시판을 제공하고 싶습니다! [1] 2015.11.03 by sejin7940
꾸링 포인트 부족시 경고창(confirm)으로 띄우기 [2] 2015.11.03 by 키큰아이
중년- 혹시 이런거 있나요? [2] file 2015.11.03 by 중년-
Katzecf147 하단 주소창, 전체화면 질문 file  
씨엠 로그인시 192.168.0.210으로접속 [4] 2015.11.03 by 씨엠
밀란 html 초보..질문입니다 [1] file 2015.11.03 by 난다여~
지에치케어 누리고 상품등록이 안됩니다 file