From 4b30972b2ccaad4110e52c323cd7f46ed9ce32dc Mon Sep 17 00:00:00 2001 From: whitedot Date: Tue, 28 May 2013 16:49:46 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20=EA=B2=8C?= =?UTF-8?q?=EC=8B=9C=ED=8C=90=EC=8A=A4=ED=82=A8=20SNS=20=ED=8F=AC=ED=95=A8?= =?UTF-8?q?=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/sns/me2day/callback.php | 3 +- skin/board/basic/style.css | 4 +- skin/board/basic/view.skin.php | 110 +++++++++++------ skin/board/gallery/style.css | 48 ++++---- skin/board/gallery/view.skin.php | 110 +++++++++++------ skin/board/gallery/view_comment.skin.php | 2 +- skin/board/gallery/view_comment.skin.sns.php | 118 +++++++++++++++++++ 7 files changed, 298 insertions(+), 97 deletions(-) create mode 100644 skin/board/gallery/view_comment.skin.sns.php diff --git a/plugin/sns/me2day/callback.php b/plugin/sns/me2day/callback.php index 78a03a07d..82c8ba543 100644 --- a/plugin/sns/me2day/callback.php +++ b/plugin/sns/me2day/callback.php @@ -26,7 +26,8 @@ if ($result->code == 0) { document.write("미투데이에 승인이 되었습니다."); 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); diff --git a/skin/board/basic/style.css b/skin/board/basic/style.css index ef57989d8..0ffb30611 100644 --- a/skin/board/basic/style.css +++ b/skin/board/basic/style.css @@ -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} diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php index d46faf09c..678665bf1 100644 --- a/skin/board/basic/view.skin.php +++ b/skin/board/basic/view.skin.php @@ -5,17 +5,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); -
+
-

- - -

- -

+
+
+

+ +

+
-

게시물 정보

+

페이지 정보

작성자 작성일 조회회 @@ -87,8 +90,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
- +
-
-
-

본문

-
+
+

본문

스크랩 - 추천 @@ -154,11 +153,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); 비추천 -
+ ?>
추천 비추천 @@ -166,10 +164,11 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); -
+ ?> + - @@ -178,16 +177,12 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); include_once('./view_comment.php'); ?> - - - - + + '; + } + } + //============================================================================ + + + //============================================================================ + // 트위터 + //---------------------------------------------------------------------------- + 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 ''; + echo ''; + } else { + echo ''; + echo ''; + echo ''; + } + } + //============================================================================ + + + //============================================================================ + // 미투데이 + //---------------------------------------------------------------------------- + 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 ''; + echo ''; + } else { + echo ''; + echo ''; + echo ''; + } + } + //============================================================================ + ?> + + +