사용자: 게시판스킨 SNS 포함 복구

This commit is contained in:
whitedot
2013-05-28 16:49:46 +09:00
parent 05c0b664be
commit 4b30972b2c
7 changed files with 298 additions and 97 deletions

View File

@ -26,7 +26,8 @@ if ($result->code == 0) {
document.write("<strong>미투데이에 승인이 되었습니다.</strong>");
var opener = window.opener;
opener.$("#wr_name").val("{$sns_name}");
if (opener.document.getElementById("#wr_name"))
opener.document.getElementById("#wr_name").val("{$sns_name}");
opener.$("#me2day_icon").attr("src", "{$g4_sns_url}/icon/me2day.png");
opener.$("#me2day_checked").attr("disabled", false);
opener.$("#me2day_checked").attr("checked", true);

View File

@ -36,9 +36,9 @@
/* 게시판 읽기 */
#bo_v {margin-bottom:20px;padding-bottom:20px}
#bo_v_cate {position:absolute;top:0;right:15px;margin:0;padding:0 5px;height:25px;background:#565e60;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_table {position:absolute;top:0;right:15px;margin:0;padding:0 5px;height:25px;background:#565e60;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_h1 {padding:10px 0;font-size:1.2em}
#bo_v_title {padding:10px 0;font-size:1.2em}
#bo_v_info {padding:0 0 10px;border-bottom:1px solid #ddd}
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}

View File

@ -5,17 +5,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css">
<div id="bo_v" style="width:<?php echo $width; ?>">
<div id="bo_v_table"><?php echo $board['bo_subject']; ?></div>
<p id="bo_v_cate">
<?php echo $board['bo_subject'] ?>
<?php if ($category_name) { // 분류가 지정되었다면 ?><?php echo ($category_name ? "{$view['ca_name']} " : ""); ?><?php } // 분류 출력 끝 ?>
</p>
<h1 id="bo_v_h1"><?php echo cut_str(get_text($view['wr_subject']), 70) // 글제목 출력 ?></h1>
<article id="bo_v" style="width:<?php echo $width; ?>">
<header>
<h1 id="bo_v_title">
<?php
if ($category_name) echo ($category_name ? $view['ca_name'].' | ' : ''); // 분류 출력 끝
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?>
</h1>
</header>
<section id="bo_v_info">
<h2>게시물 정보</h2>
<h2>페이지 정보</h2>
작성자 <strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo "&nbsp;($ip)"; } ?></strong>
<span class="sound_only">작성일</span><strong><?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
조회<strong><?php echo number_format($view['wr_hit']) ?>회</strong>
@ -87,8 +90,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
</section>
<?php } ?>
<nav id="bo_v_top">
<h2>게시물 상단 버튼</h2>
<div id="bo_v_top">
<?php
ob_start();
?>
@ -113,12 +115,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</nav>
</div>
<article id="bo_v_atc">
<header>
<h1 id="bo_v_atc_title">본문</h1>
</header>
<section id="bo_v_atc">
<h2 id="bo_v_atc_title">본문</h2>
<?php
// 파일 출력
@ -145,7 +145,6 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<?php if ($scrap_href || $good_href || $nogood_href) { ?>
<div id="bo_v_act">
<?php if ($scrap_href) { ?><a href="<?php echo $scrap_href; ?>" target="_blank" class="btn_b01" onclick="win_scrap(this.href); return false;">스크랩</a><?php } ?>
<?php if ($good_href) { ?>
<a href="<?php echo $good_href.'&amp;'.$qstr ?>" id="good_button" class="btn_b01">추천 <strong><?php echo number_format($view['wr_good']) ?></strong></a>
<b id="bo_v_act_good"></b>
@ -154,11 +153,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<a href="<?php echo $nogood_href.'&amp;'.$qstr ?>" id="nogood_button" class="btn_b01">비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
<b id="bo_v_act_nogood"></b>
<?php } ?>
</div>
<?php } else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
?>
?>
<div id="bo_v_act">
<?php if($board['bo_use_good']) { ?><span>추천 <strong><?php echo number_format($view['wr_good']) ?></strong></span><?php } ?>
<?php if($board['bo_use_nogood']) { ?><span>비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></span><?php } ?>
@ -166,10 +164,11 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<?php
}
}
?>
</article>
?>
</section>
<?php
<?php
// SNS 보내기
include_once($board_skin_path."/view.sns.skin.php");
?>
@ -178,16 +177,12 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
include_once('./view_comment.php');
?>
<nav id="bo_v_bot">
<h2>게시물 하단 버튼</h2>
<div id="bo_v_bot">
<!-- 링크 버튼 -->
<?php echo $link_buttons ?>
</nav>
</div>
</div>
</article>
<script>
<?php if ($board['bo_download_point'] < 0) { ?>
@ -221,6 +216,35 @@ $(window).load(function() {
view_image_resize();
});
var now = new Date();
var timeout = false;
var millisec = 200;
var tid;
$(window).resize(function() {
now = new Date();
if (timeout === false) {
timeout = true;
if(tid != null)
clearTimeout(tid);
tid = setTimeout(resize_check, millisec);
}
});
function resize_check() {
if (new Date() - now < millisec) {
if(tid != null)
clearTimeout(tid);
tid = setTimeout(resize_check, millisec);
} else {
timeout = false;
view_image_resize();
}
}
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
@ -244,14 +268,34 @@ function view_image_resize()
{
var $img = $("#bo_v_atc img");
var img_wrap = $("#bo_v_atc").width();
var win_width = $(window).width() - 35;
var res_width = 0;
if(img_wrap < win_width)
res_width = img_wrap;
else
res_width = win_width;
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
$(this).addClass("img_fix");
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
$(this).removeClass("img_fix");
var img_height = $(this).height();
var this_width = $(this).data("width");
var this_height = $(this).data("height");
if(this_width == undefined) {
$(this).data("width", img_width); // 원래 이미지 사이즈
$(this).data("height", img_height);
this_width = img_width;
this_height = img_height;
}
if(this_width > res_width) {
$(this).width(res_width);
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
$(this).height(res_height);
} else {
$(this).width(this_width);
$(this).height(this_height);
}
});
}

View File

@ -60,9 +60,9 @@
/* 게시판 읽기 */
#bo_v {margin-bottom:20px;padding-bottom:20px}
#bo_v_cate {position:absolute;top:0;right:15px;margin:0;padding:0 5px;height:25px;background:#565e60;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_table {position:absolute;top:0;right:15px;margin:0;padding:0 5px;height:25px;background:#565e60;color:#fff;font-weight:bold;line-height:2.2em}
#bo_v_h1 {padding:10px 0;font-size:1.2em}
#bo_v_title {padding:10px 0;font-size:1.2em}
#bo_v_info {padding:0 0 10px;border-bottom:1px solid #ddd}
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
@ -75,27 +75,24 @@
#bo_v_file {}
#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_file ul {margin:0;padding:0;list-style:none}
#bo_v_file li {padding:0 10px;border-bottom:1px solid #eee;background:#f7f7f2}
#bo_v_file a {display:inline-block;padding:8px 0 7px;color:#000}
#bo_v_file a:focus,
#bo_v_file a:hover,
#bo_v_file a:active {text-decoration:none}
.bo_v_file_cnt {display:inline-block;margin:0 10px}
#bo_v_file li {padding:0 10px;border-bottom:1px solid #eee;background:#f5f6fa}
#bo_v_file a {display:inline-block;padding:8px 0 7px;width:100%;color:#000;word-wrap:break-word}
#bo_v_file a:focus, #bo_v_file a:hover, #bo_v_file a:active {text-decoration:none}
#bo_v_file img {float:left;margin:0 10px 0 0}
.bo_v_file_cnt {display:inline-block;margin:0 0 3px 22px}
#bo_v_link {}
#bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_link ul {margin:0;padding:0;list-style:none}
#bo_v_link li {padding:0 10px;border-bottom:1px solid #eee;background:#f7f7f2}
#bo_v_link a {display:inline-block;padding:8px 0 7px;color:#000}
#bo_v_link a:focus,
#bo_v_link a:hover,
#bo_v_link a:active {text-decoration:none}
.bo_v_link_cnt {display:inline-block;margin:0 10px}
#bo_v_link li {padding:0 10px;border-bottom:1px solid #eee;background:#f5f6fa}
#bo_v_link a {display:inline-block;padding:8px 0 7px;width:100%;color:#000;word-wrap:break-word}
#bo_v_link a:focus, #bo_v_link a:hover, #bo_v_link a:active {text-decoration:none}
.bo_v_link_cnt {display:inline-block;margin:0 0 3px 22px}
#bo_v_top {margin:0 0 10px;padding:10px 0;zoom:1}
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_top ul {list-style:none}
#bo_v_top ul {margin:0;padding:0;list-style:none}
#bo_v_bot {zoom:1}
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
@ -108,7 +105,7 @@
.bo_v_com li {float:left;margin-left:5px}
#bo_v_atc {min-height:200px;height:auto !important;height:200px}
#bo_v_atc_title {position:absolute;font-size:0;line-height:0;overflow:hidden}}
#bo_v_atc_title {position:absolute;font-size:0;line-height:0;overflow:hidden}
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden:zoom:1}
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
@ -123,27 +120,24 @@
#bo_v_act span {display:inline-block;margin-right:5px;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:top}
#bo_v_act strong {color:#ff3061}
#bo_v_act_good,
#bo_v_act_nogood {position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#bo_v_act_nogood {position:absolute;font-size:0;line-height:0;overflow:hidden}
#bo_v form {padding-top:20px}
/* 게시판 댓글 */
#bo_vc {margin:0 0 10px;padding:20px 20px 10px;border-top:1px solid #cfded8;border-bottom:1px solid #cfded8;background:#f7f7f2}
#bo_vc {padding:20px 20px 10px;border-top:1px solid #cfded8;border-bottom:1px solid #cfded8;background:#f5f6fa}
#bo_vc h2 {margin-bottom:10px}
#bo_vc article {padding:0 0 10px;border-top:1px dotted #ccc}
#bo_vc header {position:relative;padding:15px 0 5px}
#bo_vc header .icon_reply {position:absolute;top:15px;left:-20px}
#bo_vc .sv_wrap {margin-right:15px}
#bo_vc .member,
#bo_vc .guest,
#bo_vc .sv_member,
#bo_vc .sv_guest {font-weight:bold}
#bo_vc .member, #bo_vc .guest, #bo_vc .sv_member, #bo_vc .sv_guest {font-weight:bold}
.bo_vc_hdinfo {display:inline-block;margin:0 15px 0 5px}
#bo_vc h1 {width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#bo_vc h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#bo_vc a {color:#000;text-decoration:none}
#bo_vc p {padding:0 0 5px;line-height:1.8em}
#bo_vc p a {text-decoration:underline}
#bo_vc_empty {margin:0;padding:20px !important;border-bottom:1px dotted #ccc;text-align:center}
#bo_vc_empty {margin:0;padding:20px !important;text-align:center}
#bo_vc fieldset {margin:0 0 10px;padding:0}
#bo_vc #bo_vc_winfo {float:left}
#bo_vc footer {zoom:1}
@ -153,8 +147,8 @@
.bo_vc_act:after {display:block;visibility:hidden;clear:both;content:""}
.bo_vc_act li {float:left;margin-left:5px}
#bo_vc_w {position:relative;margin-bottom:10px;padding:0 20px 20px;border-bottom:1px solid #cfded8}
#bo_vc_w h2 {padding:15px 0 5px}
#bo_vc_w #char_cnt {display:block;margin-bottom:5px}
#bo_vc_w {position:relative;margin:0 0 10px;padding:0 0 20px;border-bottom:1px solid #cfded8}
#bo_vc_w h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#bo_vc_w #char_cnt {display:block;margin:0 0 5px}
#bo_vc form {padding:0}

View File

@ -5,17 +5,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css">
<div id="bo_v" style="width:<?php echo $width; ?>">
<div id="bo_v_table"><?php echo $board['bo_subject']; ?></div>
<p id="bo_v_cate">
<?php echo $board['bo_subject'] ?>
<?php if ($category_name) { // 분류가 지정되었다면 ?><?php echo ($category_name ? "{$view['ca_name']} " : ""); ?><?php } // 분류 출력 끝 ?>
</p>
<h1 id="bo_v_h1"><?php echo cut_str(get_text($view['wr_subject']), 70) // 글제목 출력 ?></h1>
<article id="bo_v" style="width:<?php echo $width; ?>">
<header>
<h1 id="bo_v_title">
<?php
if ($category_name) echo ($category_name ? $view['ca_name'].' | ' : ''); // 분류 출력 끝
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?>
</h1>
</header>
<section id="bo_v_info">
<h2>게시물 정보</h2>
<h2>페이지 정보</h2>
작성자 <strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo "&nbsp;($ip)"; } ?></strong>
<span class="sound_only">작성일</span><strong><?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
조회<strong><?php echo number_format($view['wr_hit']) ?>회</strong>
@ -87,8 +90,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
</section>
<?php } ?>
<nav id="bo_v_top">
<h2>게시물 상단 버튼</h2>
<div id="bo_v_top">
<?php
ob_start();
?>
@ -113,12 +115,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</nav>
</div>
<article id="bo_v_atc">
<header>
<h1 id="bo_v_atc_title">본문</h1>
</header>
<section id="bo_v_atc">
<h2 id="bo_v_atc_title">본문</h2>
<?php
// 파일 출력
@ -145,7 +145,6 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<?php if ($scrap_href || $good_href || $nogood_href) { ?>
<div id="bo_v_act">
<?php if ($scrap_href) { ?><a href="<?php echo $scrap_href; ?>" target="_blank" class="btn_b01" onclick="win_scrap(this.href); return false;">스크랩</a><?php } ?>
<?php if ($good_href) { ?>
<a href="<?php echo $good_href.'&amp;'.$qstr ?>" id="good_button" class="btn_b01">추천 <strong><?php echo number_format($view['wr_good']) ?></strong></a>
<b id="bo_v_act_good"></b>
@ -154,11 +153,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<a href="<?php echo $nogood_href.'&amp;'.$qstr ?>" id="nogood_button" class="btn_b01">비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
<b id="bo_v_act_nogood"></b>
<?php } ?>
</div>
<?php } else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
?>
?>
<div id="bo_v_act">
<?php if($board['bo_use_good']) { ?><span>추천 <strong><?php echo number_format($view['wr_good']) ?></strong></span><?php } ?>
<?php if($board['bo_use_nogood']) { ?><span>비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></span><?php } ?>
@ -166,10 +164,11 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
<?php
}
}
?>
</article>
?>
</section>
<?php
<?php
// SNS 보내기
include_once($board_skin_path."/view.sns.skin.php");
?>
@ -178,16 +177,12 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
include_once('./view_comment.php');
?>
<nav id="bo_v_bot">
<h2>게시물 하단 버튼</h2>
<div id="bo_v_bot">
<!-- 링크 버튼 -->
<?php echo $link_buttons ?>
</nav>
</div>
</div>
</article>
<script>
<?php if ($board['bo_download_point'] < 0) { ?>
@ -221,6 +216,35 @@ $(window).load(function() {
view_image_resize();
});
var now = new Date();
var timeout = false;
var millisec = 200;
var tid;
$(window).resize(function() {
now = new Date();
if (timeout === false) {
timeout = true;
if(tid != null)
clearTimeout(tid);
tid = setTimeout(resize_check, millisec);
}
});
function resize_check() {
if (new Date() - now < millisec) {
if(tid != null)
clearTimeout(tid);
tid = setTimeout(resize_check, millisec);
} else {
timeout = false;
view_image_resize();
}
}
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
@ -244,14 +268,34 @@ function view_image_resize()
{
var $img = $("#bo_v_atc img");
var img_wrap = $("#bo_v_atc").width();
var win_width = $(window).width() - 35;
var res_width = 0;
if(img_wrap < win_width)
res_width = img_wrap;
else
res_width = win_width;
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
$(this).addClass("img_fix");
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
$(this).removeClass("img_fix");
var img_height = $(this).height();
var this_width = $(this).data("width");
var this_height = $(this).data("height");
if(this_width == undefined) {
$(this).data("width", img_width); // 원래 이미지 사이즈
$(this).data("height", img_height);
this_width = img_width;
this_height = img_height;
}
if(this_width > res_width) {
$(this).width(res_width);
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
$(this).height(res_height);
} else {
$(this).width(this_width);
$(this).height(this_height);
}
});
}

View File

@ -114,7 +114,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
</tr>
<?php } ?>
<?php
<?php
include_once($board_skin_path."/view_comment.sns.skin.php");
?>

View File

@ -0,0 +1,118 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!$board['bo_use_sns']) return;
?>
<tr>
<th scope="row">SNS 등록</th>
<td>
<div id="sns_facebook">
<?php
//============================================================================
// 페이스북
//----------------------------------------------------------------------------
if ($config['cf_facebook_appid']) {
include_once(G4_SNS_PATH."/facebook/src/facebook.php");
$facebook = new Facebook(array(
'appId' => $config['cf_facebook_appid'],
'secret' => $config['cf_facebook_secret']
));
$facebook_user = $facebook->getUser();
if ($facebook_user) {
try {
$facebook_user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
$facebook_user = null;
}
}
if ($facebook_user) {
echo '<input type="checkbox" name="facebook_checked" id="facebook_checked" '.(get_cookie('ck_facebook_checked')?'checked':'').' value="1">';
echo '<img src="'.G4_SNS_URL.'/icon/facebook.png" id="facebook_icon">';
} else {
$facebook_url = $facebook->getLoginUrl(array("redirect_uri"=>G4_SNS_URL."/facebook/callback.php", "scope"=>"publish_stream,read_stream,offline_access", "display"=>"popup"));
echo '<input type="checkbox" name="facebook_checked" id="facebook_checked" disabled value="1">';
echo '<a href="'.$facebook_url.'" id="facebook_url" onclick="return false;"><img src="'.G4_SNS_URL.'/icon/facebook'.($facebook_user?'':'_off').'.png" id="facebook_icon"></a>';
echo '<script>$(function(){ $("#facebook_url").click(function(){ window.open(this.href, "facebook_url", "width=600,height=250"); }); });</script>';
}
}
//============================================================================
//============================================================================
// 트위터
//----------------------------------------------------------------------------
if ($config['cf_twitter_key']) {
include_once(G4_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
include_once(G4_SNS_PATH."/twitter/twitterconfig.php");
$twitter_user = false;
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
} else {
$access_token = $_SESSION['access_token'];
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
$content = $connection->get('account/verify_credentials');
//print_r2($content);
switch ($connection->http_code) {
case 200:
$twitter_user = true;
$twitter_url = $connection->getAuthorizeURL($token);
break;
default :
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
// 안먹히는 코드 ㅠㅠ
if ($member['mb_twitter_token'] && $member['mb_twitter_token_secret']) {
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $member['mb_twitter_token'], $member['mb_twitter_token_secret']);
$content = $connection->get('account/verify_credentials');
if (200 == $connection->http_code) {
$twitter_user = true;
$twitter_url = $connection->getAuthorizeURL($token);
}
}
}
}
if ($twitter_user) {
echo '<input type="checkbox" name="twitter_checked" id="twitter_checked" '.(get_cookie('ck_twitter_checked')?'checked':'').' value="1">';
echo '<img src="'.G4_SNS_URL.'/icon/twitter.png" id="twitter_icon">';
} else {
echo '<input type="checkbox" name="twitter_checked" id="twitter_checked" disabled value="1">';
echo '<a href="'.$twitter_url.'" id="twitter_url" onclick="return false;"><img src="'.G4_SNS_URL.'/icon/twitter'.($twitter_user?'':'_off').'.png" id="twitter_icon"></a>';
echo '<script>$(function(){ $("#twitter_url").click(function(){ window.open(this.href, "twitter_url", "width=600,height=250"); }); });</script>';
}
}
//============================================================================
//============================================================================
// 미투데이
//----------------------------------------------------------------------------
if ($config['cf_me2day_key']) {
$me2day_user = false;
if (empty($_SESSION['me2day']['user_id']) || empty($_SESSION['me2day']['user_key'])) {
$result = json_decode(file_get_contents("http://me2day.net/api/get_auth_url.json?akey=".$config['cf_me2day_key']));
$me2day_url = $result->url;
} else {
$me2day_user = true;
}
if ($me2day_user) {
echo '<input type="checkbox" name="me2day_checked" id="me2day_checked" '.(get_cookie('ck_me2day_checked')?'checked':'').' value="1">';
echo '<img src="'.G4_SNS_URL.'/icon/me2day.png" id="me2day_icon">';
} else {
echo '<input type="checkbox" name="me2day_checked" id="me2day_checked" disabled value="1">';
echo '<a href="'.$me2day_url.'" id="me2day_url" onclick="return false;"><img src="'.G4_SNS_URL.'/icon/me2day'.($me2day_user?'':'_off').'.png" id="me2day_icon"></a>';
echo '<script>$(function(){ $("#me2day_url").click(function(){ window.open(this.href, "me2day_url", "width=1000,height=800"); }); });</script>';
}
}
//============================================================================
?>
</div>
</td>
</tr>