트위터,미투데이,네이트온 sns 추가하기
Posted by Albert 4868Day 10Hour 42Min 55Sec ago [2011-12-22]
<!--트위터,미투데이,네이트온 시작-->
<?php
// UTF전용
$subject_con = "불만커뮤니티 : [".$board[bo_subject]." > ".$row[cate_name]."] ".$view[wr_subject];
/////////////////////////////////////////////////////////////////////////////////////////////
// 현제 페이지 주소 추출
$board_url = $trackback_url;
$domain =$_SERVER["HTTP_HOST"];
$spurl = "http://".$domain.$REQUEST_URI;
/////////////////////////////////////////////////////////////////////////////////////////////
// 트위터
/////////////////////////////////////////////////////////////////////////////////////////////
// URL붙이기 // 일부 시스템에서만 사용
$url= $subject_con." ".$board_url;
//URL암호화
$url = urlencode($spurl);
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
// 페이스북
/////////////////////////////////////////////////////////////////////////////////////////////
$face_url= $spurl;
$face_url = urlencode($spurl);
$face_subject = urlencode($subject_con);
//echo $face_url;
// 추가
$face_content = strip_tags($view[wr_content]);
$face_content = substr($face_content,0,150)."...";
$face_content = urlencode($face_content);
if($view[file][0][file]){
$face_img = "http://".$_SERVER['SERVER_NAME']."/ad/data/file/".$mid."/".$view[file][0][file];
$face_img = urlencode($face_img);
}else{
$face_img = urlencode("");
}
echo $g4['title'];
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
// 미투데이
/////////////////////////////////////////////////////////////////////////////////////////////
$me2_url= $spurl;
$me2_url = urlencode($spurl);
$me2_subject = urlencode($subject_con);
$me2_url_text = $config[cf_title]; // 홈페이지 제목으로 출력
$me2_url_text = str_replace("\"","˝","$me2_url_text");
$me2_url_text = urlencode($me2_url_text); // 인코딩
$me2_teg = "불만제로"; // 테그 부분에 현제글 위치 표기
$me2_teg = urlencode($me2_teg); // 인코딩
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
// 요즘
/////////////////////////////////////////////////////////////////////////////////////////////
$yozm_url= $spurl;
$yozm_url = urlencode($yozm_url);
$yozm_subject = urlencode($subject_con);
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
// 구글, 네이버 공용
/////////////////////////////////////////////////////////////////////////////////////////////
$subject = urlencode($subject_con);
/////////////////////////////////////////////////////////////////////////////////////////////
$board_skin_path = (trim($board_skin_path)=="") ? "../skin/board/board01" : $board_skin_path;
$db=mysql_connect($mysql_host,$mysql_user,$mysql_password) or
die ("접속실패");
$okcount="SELECT sum(wr_good) as good,sum(wr_nogood) as nogood FROM ad_write_total ";
$cresult =mysql_db_query($mysql_db,$okcount, $db);
while ($rowc=mysql_fetch_array($cresult))
{
$good=$rowc[0];
$nogood=$rowc[1];
}
?>
<div >
<span style="background:'35C4F8;margin:0px;padding:0px;float:left;width:160px;height:37px;text-align:center;line-height:37px;color:'fff"><strong>불만만땅(<?=$good?>)</strong></span>
<span style="background:'35C4F8;margin:0px;padding:0px;float:left;width:160px;height:37px;text-align:center;line-height:37px;margin-left:10px;color:'fff"><strong>불만제로(<?=$nogood?>)</strong></span>
<span style="float:right">
<img src="<?=$board_skin_path?>/img/icon/twitter.png" onclick="window.open('http://twitter.com/?status=<?=$url?>','window','width=600,height=430')" style="cursor:pointer" width="37" height="37" border="0" alt=" twitter로 보내기 <?=$board_skin_path?>">
<img src="<?=$board_skin_path?>/img/icon/facebook.png" width="37" height="37" border="0" onclick="window.open('http://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=<?=$face_subject?>&p%5Burl%5D=<?=$face_url?>&p%5Bimages%5D%5B0%5D=<?=$face_img?>&p%5Bsummary%5D=<?=$face_content?>','window','width=600,height=630')" style="cursor:pointer" alt=" facebook으로 보내기">
<a href='http://me2day.net/posts/new?new_post[body]=<?=$me2_subject?>+++++++["<?=$me2_url_text?>":<?=$me2_url?>+]&new_post[tags]=<?=$me2_teg?>' target="_blank"><img src="<?=$board_skin_path?>/img/icon/Me2Day.png" width="37" height="37" border="0" alt=" Me2Day로 보내기"></a>
<img src="<?=$board_skin_path?>/img/icon/yozm.png" onclick="window.open('http://yozm.daum.net/api/popup/prePost?sourceid=41&link=<?=$yozm_url?>&prefix=<?=$yozm_subject?>','window','width=600,height=430')" style="cursor:pointer" width="37" height="37" alt="요즘으로 보내기" border="0">
<script language="javascript" type="text/javascript" src="http://api.nateon.nate.com/js/note/type_default.js"></script>
<meta name="nate-note" content="불만커뮤니티: [<?=$board[bo_subject]?> > <?=$row[cate_name]?>] <?=$view[wr_subject]?>">
</span>
</div>
<!--트위터,미투데이,네이트온 끝-->