네이버블로그 글과 이미지 자동포스팅 기능 이미지와 함께 날림~~슝~~~~ > 그누보드5 스킨

그누보드5 스킨

좋은 댓글과 좋아요는 제작자에게 큰힘이 됩니다.

네이버블로그 글과 이미지 자동포스팅 기능 이미지와 함께 날림~~슝~~~~ 정보

게시판 네이버블로그 글과 이미지 자동포스팅 기능 이미지와 함께 날림~~슝~~~~

첨부파일

basic_naver.zip (50.0K) 802회 다운로드 2015-04-12 16:35:07

본문

적용 스킨 그누보드 5 basic 스킨

네이버블로그 자동포스팅 기능
게시판에 글쓴내용을 블로그에 자동 포스팅 합니다. (블로그에 자동 글쓰기)
게시판에 이미지를 블로그에 자동 포스팅 합니다.(첨부 파일이 없을시 이미지 미출력 )



글을 게시한  게시판 http://honeymusic.kr/dakjang/bbs/board.php?bo_table=c1

게시 했을경우 블로그 http://blog.naver.com/PostList.nhn?blogId=density2013


헌이자료 http://honeymusic.kr/dakjang/bbs/board.php?bo_table=skin2
추천
27

댓글 전체

좋은스킨 감사드리며 한가지 문의드립니다.
이미지 출력의 경우 html 모드에서 img src 로 삽입된 이미지 출력은 불가능 것인지요?
아.. 네 감사합니다..
$_SERVER[SERVER_NAME]";  이부분을 지우고 저희 도메인을 넣었는데 잘 되네요..
근데 DHTML로 사진을 첨부했을때 전송할 순 없는 건가요?
저도 어릴때 꿈이 화가 였습니다만 집안에서 돈많이 들어간다고 반대 하는 바람에 ㅎㅎㅎ
저의 누나가 한때.. 화가 하다가 애니메이션 뒷배경 하는 바람에 머~ 집안에서 그런 말 나오겠죠...

일본 만화 자막에 저의 누나 이름도 공개 되니 흐믓하기는 하답니다.

지금은 미술학원 원장이지만... ^^;;
카테고리 지정도 가능합니다.
회사운영중이라 소스를 공개할순없지만 블로그 카테고리 읽어와서 카테고리로 송고되도록 사용중입니다.
각자 네이 게시판에 카테고리 지정이 가능 하단 소리인가요 
기존 카테고리 별로는 구별해서 넣을수 있지만 네이버 블로그 게시판별로 지정해서 넣는다는 말은 첨듣습니다.

api 변화 했나요 ?  저도 만지지 않은지 꽤되서요

확인후 만들어  보겠습니다.  그렇지 않은 경우에는 손털겠음
더 자세히  기존 저에 블로그 셋팅값입니다. 키값만 빼고.....

$g_blog_url = "https://api.blog.naver.com/xmlrpc";
$user_id = "density2013";
$blogid = "density2013";
$password = "b3e8952bb37d559c1xxxxxxxxxxx";
$publish = true;

이렇게 넣으시면 됩니다.
이런질문이 바보같지만...ㅠㅠ
네이버에서 중복문서로 판단해서 블로그 저품질로 되지 않을까요? 정말 좋은 기능인것 같은데...혹시 그렇게 될까봐 조금 망설여 지네요.
제가 우려하는게 기우 일까요?
답변 감사합니다.
그런데 이거 네이버 말구 다음도 가능한가요? 다음도 api지원하는걸루 아는데...소스 수정없이 되나요? 아니면 바로 될까요?
너무 훌룡한 스킨 공개해 주셔서 감사합나니다. 사이트랑 블로그랑 진행사항을 글을 써야 하는데 두곳 쓰기 귀찮아서
버려뒀던 게시판 다시 활성화 시켰네요 ^^;;;; 근데 본문작성할때 본문첨부한 이미지는 블로그에서는 안 나오는건가요?
첨부한 이미지는 잘 나오네요... 너무나 감사합니다 ㅠㅠ
좋은자료 감사합니다.
테스트 해보니.. 첨부이미지는 한 개만 출력되던데.. 다수 출력이나
에디터로 등록된 이미지를 출력할 방법은 없을까요?
api.php 기능 수정해야할것 같은데요..
유트브 영상 안올라가지네요

수정
$subject = str_replace('\"','"',$wr_subject);
$content = str_replace('\"','"',$wr_content);
왜 저는 write_update.php 에서 멈출까요?

http://anystamp.co.kr/g5/bbs/board.php?bo_table=sns
이 페이지이구요

네이버 블로그에서 관리자 api 설정은 했습니다.

api.php 설정은
$g_blog_url = "https://api.blog.naver.com/xmlrpc";
$user_id = "anyxxx;
$blogid = "anyxxx";
$password = "86e50b46fb32f82bfxxxxxxxxxx";
$publish = true;

요렇게했구요

서버 php 버전은 5.2입니다.

다른 설정값이나 이런게 있는지?
다른 설정 값은 없습니다. 안되는 이유가 무엇인지는 모르겠으나 스킨 설정값 포함하여 쪽지로 올려 주세요 봐드리겠습니다.
include_once 'xmlrpc.inc'; // 파일 첨부함.

function newPost($title, $description)

{
$g_blog_url = "https://api.blog.naver.com/xmlrpc";
$user_id = "anyxxxx";
$blogid = "anyxxxx";
$password = "86e50b46fb32f8xxxxxxxxxxx";
$publish = true;

$client = new xmlrpc_client($g_blog_url);


$client->setSSLVerifyPeer(false); // 기본값은 true인데, false로 설정하지 않으면 SSL 에러남.
$GLOBALS['xmlrpc_internalencoding']='UTF-8'; // 기본값은 ISO-8859-1, 기본값 사용시 한글 깨짐.




$struct = array(
'title' => new xmlrpcval($title, "string"),
'description' => new xmlrpcval($description, "string")
);

$f = new xmlrpcmsg("metaWeblog.newPost",
array(
new xmlrpcval($blogid, "string"),
new xmlrpcval($user_id, "string"),
new xmlrpcval($password, "string"),
new xmlrpcval($struct , "struct"),
new xmlrpcval($publish, "boolean")
)
);
$f->request_charset_encoding = 'UTF-8';

//echo '<pre>'; print_r($f); exit;

return $response = $client->send($f);
}

//jwplayer setup SIR_snug_heon 만든이:헌이
   
     

$data_path = $g5[path]."/data/file/$bo_table";

$sql = " select * from g5_board_file where wr_id = '$wr_id' and bo_table = '$bo_table'";
$qr = sql_query($sql);
for ($i=0; $row=sql_fetch_array($qr); $i++) {
 $bf_file1 = $row[bf_file];
}

$hostname="http://$_SERVER[SERVER_NAME]";
$smi = $wr_8;
$string1 = $wr_3;
$url = parse_url($string1);
parse_str($url['query']);
$link1="$hostname/dakjang/bbs/board.php?bo_table=$bo_table&wr_id=$wr_id";
  $playswf="$hostname/skin/board/ucc_v5utf812/swf/player.swf";
$skin1="$hostname/skin/board/ucc_v5utf812/swf/Skins/$wr_10.zip";
$file1="http://www.youtube.com/watch?v=<?=$string1?>";
    ?>
<? if($bf_file1) { ?>
<?
$img = "<img src='http://$_SERVER[SERVER_NAME]/data/file/$bo_table/$bf_file1' /width='100%' height='420'><br>";
            ?>
<?}?>
<?
$logo= "$hostname/skin/board/ucc_v5utf812/logo/logo.png"; 
            $logolink="$hostname";


$subject = $wr_subject;
$content = $wr_content;
$link2 ='<br><a href="'.$link1.'"> 출처'.$link1.'</a>';
?>
<? if($string1) { ?>
<?
$jwplayer = '<embed src="'.$playswf.'"width="100%" height="420" bgcolor="000000" allowfullscreen="true" allowscriptaccess="always"flashvars=file=http://www.youtube.com/watch?v='.$string1.'&autostart=true&logo.file='.$logo.'&logo.hide=false&logo.position=top-right&logo.link='.$logolink.'&abouttext='.$logolink.'&aboutlink='.$logolink.'&imge=http://i3.ytimg.com/vi/'.$string1.'/1.jpg&Skin='.$skin1.'&plugins=embed-1,newsticker-1,hd-2,sharing-2&sharing.link='.$link1.'&newsticker.text='.$smi.'></embed><br><br>';
?>
<?
$mobile='<iframe width="100%" height="510" src="https://www.youtube.com/embed/'.$string1.'" frameborder="0" allowfullscreen></iframe><br><br>';
?>
<?}?>
<?

$return = newPost(iconv('UTF-8', 'UTF-8' ,''.$subject), iconv('UTF-8', 'UTF-8',''.$img.$mobile.$content.$link2));
echo '<pre>';
===============================================================================

요렇게 올려 주셨네요

경로가 많이 틀리네요 위 경로를 확인 하셔야 할듯 합니다. 위쪽에 있는 경로들은 제어 홈에 있는 경로 입니다.

예를 들어 위 코드중
$link1="$hostname/dakjang/bbs/board.php?bo_table=$bo_table&wr_id=$wr_id";
라던지
$img = "<img src='http://$_SERVER[SERVER_NAME]/data/file/$bo_table/$bf_file1' /width='100%' height='420'><br>";

경로가 잘못 되어 있네요
또한 그누보드 업데이트 패치가되어
$data_path = $g5[path]."/data/file/$bo_table"; 를

$data_path = $G5_PATH."/data/file/$bo_table";로

변경처리 하십시요
이렇게 수정해보아도 넘어가질 않네요
한번 더 봐주세요 ``


<?php
include_once 'xmlrpc.inc'; // 파일 첨부함.

function newPost($title, $description)

{
$g_blog_url = "https://api.blog.naver.com/xmlrpc";
$user_id = "anyxxxx";
$blogid = "anyxxxx";
$password = "86e50b46fb32f82bfd2e09exxxxxxx";
$publish = true;

$client = new xmlrpc_client($g_blog_url);


$client->setSSLVerifyPeer(false); // 기본값은 true인데, false로 설정하지 않으면 SSL 에러남.
$GLOBALS['xmlrpc_internalencoding']='UTF-8'; // 기본값은 ISO-8859-1, 기본값 사용시 한글 깨짐.




$struct = array(
'title' => new xmlrpcval($title, "string"),
'description' => new xmlrpcval($description, "string")
);

$f = new xmlrpcmsg("metaWeblog.newPost",
array(
new xmlrpcval($blogid, "string"),
new xmlrpcval($user_id, "string"),
new xmlrpcval($password, "string"),
new xmlrpcval($struct , "struct"),
new xmlrpcval($publish, "boolean")
)
);
$f->request_charset_encoding = 'UTF-8';

//echo '<pre>'; print_r($f); exit;

return $response = $client->send($f);
}

//jwplayer setup SIR_snug_heon 만든이:헌이
   
     
$data_path = $G5_PATH."/data/file/$bo_table";


$sql = " select * from g5_board_file where wr_id = '$wr_id' and bo_table = '$bo_table'";
$qr = sql_query($sql);
for ($i=0; $row=sql_fetch_array($qr); $i++) {
 $bf_file1 = $row[bf_file];
}

$hostname="http://$_SERVER[SERVER_NAME]/g5";
$smi = $wr_8;
$string1 = $wr_3;
$url = parse_url($string1);
parse_str($url['query']);
$link1="$hostname/bbs/board.php?bo_table=$bo_table&wr_id=$wr_id";
  $playswf="$hostname/skin/board/ucc_v5utf812/swf/player.swf";
$skin1="$hostname/skin/board/ucc_v5utf812/swf/Skins/$wr_10.zip";
$file1="http://www.youtube.com/watch?v=<?=$string1?>";
    ?>
<? if($bf_file1) { ?>
<?
$img = "<img src='$hostname/data/file/$bo_table/$bf_file1' /width='100%' height='420'><br>";
            ?>
<?}?>
<?
$logo= "$hostname/skin/board/ucc_v5utf812/logo/logo.png"; 
            $logolink="$hostname";


$subject = $wr_subject;
$content = $wr_content;
$link2 ='<br><a href="'.$link1.'"> 출처'.$link1.'</a>';
?>
<? if($string1) { ?>
<?
$jwplayer = '<embed src="'.$playswf.'"width="100%" height="420" bgcolor="000000" allowfullscreen="true" allowscriptaccess="always"flashvars=file=http://www.youtube.com/watch?v='.$string1.'&autostart=true&logo.file='.$logo.'&logo.hide=false&logo.position=top-right&logo.link='.$logolink.'&abouttext='.$logolink.'&aboutlink='.$logolink.'&imge=http://i3.ytimg.com/vi/'.$string1.'/1.jpg&Skin='.$skin1.'&plugins=embed-1,newsticker-1,hd-2,sharing-2&sharing.link='.$link1.'&newsticker.text='.$smi.'></embed><br><br>';
?>
<?
$mobile='<iframe width="100%" height="510" src="https://www.youtube.com/embed/'.$string1.'" frameborder="0" allowfullscreen></iframe><br><br>';
?>
<?}?>
<?

$return = newPost(iconv('UTF-8', 'UTF-8' ,''.$subject), iconv('UTF-8', 'UTF-8',''.$img.$mobile.$content.$link2));
echo '<pre>';
?>
제 문제가 아래와 같은 문제인것같은데 무슨문제일까요?

https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_function&wr_id=405520#c_405525

혹시 제 서버설정에서 방화벽차단과 연관있을까요?
사용중에 한가지 궁금한 점이 생겼습니다.

블로그 계정이 2개인데, 2군데 동시에 올리고 싶으면,
$g_blog_url = "";
$user_id = "";
$blogid = "";
$password = "";
$publish = true;
이 부분만 복사해서
$g_blog_url = "";
$user_id = "";
$blogid = "";
$password = "";
$publish = true;
$g_blog_url = "";
$user_id = "";
$blogid = "";
$password = "";
$publish = true;
이렇게 넣으면 가능할까요??
뜸금 없는 질문이긴 합니다만...지금 이것이 작동되고 있는가요?
중간 댓글에 그누보드 변경 되어서 소스 어디를 수정하라고 말씀을 하셨는데...받고나서 수정해야 되는것인지요?
좋은  소스 오픈해주셔서 감사합니다.
$tags    =  $wr_1;
$category = $board[bo_subject];
로 해서 구현하고 싶은데 위소스에서는 어떻게 넣어주어야 할 지 궁금해서 문의드립니다.

<?
include_once('xmlrpc.inc');
$title = $wr_subject; //글 작성시의 제목
$description = $wr_content; //글작성시의 내용
$category = $board[bo_subject]; //블로그의 카테고리
$tags    = $wr_1;//테그입력

function newPost($title, $tags, $description, $category) {
$g_blog_url = "https://api.blog.naver.com/xmlrpc";
$user_id = " ";
$blogid = " ";
$password = " ";
$publish = true;
$client = new xmlrpc_client($g_blog_url);
$client->setSSLVerifyPeer(false);
$GLOBALS['xmlrpc_internalencoding']='UTF-8';
$struct = array(
'title' => new xmlrpcval($title, "string"),
'description' => new xmlrpcval($description, "string"),
'categories' => new xmlrpcval($category, "string"),
'tags' => new xmlrpcval($tags, "string") 
);
$f = new xmlrpcmsg("metaWeblog.newPost",
array(
new xmlrpcval($blogid, "string"),
new xmlrpcval($user_id, "string"),
new xmlrpcval($password, "string"),
new xmlrpcval($struct , "struct"),
new xmlrpcval($publish, "boolean")
)
);
$f->request_charset_encoding = 'UTF-8';
return $response = $client->send($f);
}

$return = newPost($title, $tags, $description, $category);
print_r($return);
?>

이렇게 태그와 카테고리를 처리할 수는 있었습니다만
이소스에서는 이미지를 구현할 수 가 없어서 대략 한삼일 정도
끙끙대다가 문의 드립니다.

감사합니다.
전체 2,431 |RSS
그누보드5 스킨 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT