sns 사용 때 게시글 보기 로딩 속도 개선
This commit is contained in:
@ -98,7 +98,7 @@ if ($w == '') {
|
|||||||
if ($member['mb_id'])
|
if ($member['mb_id'])
|
||||||
alert('글을 답변할 권한이 없습니다.');
|
alert('글을 답변할 권한이 없습니다.');
|
||||||
else
|
else
|
||||||
alert('글을 답변할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?$qstr&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
alert('답변글을 작성할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp_point = isset($member['mb_point']) ? $member['mb_point'] : 0;
|
$tmp_point = isset($member['mb_point']) ? $member['mb_point'] : 0;
|
||||||
|
|||||||
@ -117,7 +117,14 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
include(G5_SNS_PATH."/view_comment_write.sns.skin.php");
|
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">SNS 동시등록</th>
|
||||||
|
<td id="bo_vc_send_sns"></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">내용</th>
|
<th scope="row">내용</th>
|
||||||
@ -298,5 +305,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
}
|
}
|
||||||
|
|
||||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
|
|
||||||
|
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
|
// sns 등록
|
||||||
|
$(function() {
|
||||||
|
$("#bo_vc_send_sns").load( "<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>" );
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -117,7 +117,14 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
include(G5_SNS_PATH."/view_comment_write.sns.skin.php");
|
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">SNS 동시등록</th>
|
||||||
|
<td id="bo_vc_send_sns"></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">내용</th>
|
<th scope="row">내용</th>
|
||||||
@ -298,5 +305,12 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
}
|
}
|
||||||
|
|
||||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
|
|
||||||
|
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
|
// sns 등록
|
||||||
|
$(function() {
|
||||||
|
$("#bo_vc_send_sns").load( "<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>" );
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
3
plugin/sns/_common.php
Normal file
3
plugin/sns/_common.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
include_once('../../common.php');
|
||||||
|
?>
|
||||||
@ -4,23 +4,26 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|||||||
if (!$board['bo_use_sns']) return;
|
if (!$board['bo_use_sns']) return;
|
||||||
|
|
||||||
$sns_msg = urlencode(str_replace('\"', '"', $view['subject']));
|
$sns_msg = urlencode(str_replace('\"', '"', $view['subject']));
|
||||||
$sns_url = googl_short_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
//$sns_url = googl_short_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||||
$msg_url = $sns_msg.' : '.$sns_url;
|
//$msg_url = $sns_msg.' : '.$sns_url;
|
||||||
|
|
||||||
// 카카오톡 매뉴얼 : https://github.com/kakao/kakaolink-web
|
// 카카오톡 매뉴얼 : https://github.com/kakao/kakaolink-web
|
||||||
$kakao_appid = $_SERVER['HTTP_HOST']; // Mobile Site Domain 정확히 입력하지 않을 경우 이용이 제한될 수 있습니다.
|
$kakao_appid = $_SERVER['HTTP_HOST']; // Mobile Site Domain 정확히 입력하지 않을 경우 이용이 제한될 수 있습니다.
|
||||||
$kakao_appname = urlencode(str_replace('\"', '"', $g5['title']));
|
$kakao_appname = urlencode(str_replace('\"', '"', $g5['title']));
|
||||||
|
|
||||||
|
/*
|
||||||
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
|
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
|
||||||
$twitter_url = 'http://twitter.com/home?status='.$msg_url;
|
$twitter_url = 'http://twitter.com/home?status='.$msg_url;
|
||||||
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
|
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
$sns_send = G5_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
$sns_send = G5_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||||
//$sns_send .= '&title='.urlencode(utf8_strcut(get_text($view['subject']),140));
|
//$sns_send .= '&title='.urlencode(utf8_strcut(get_text($view['subject']),140));
|
||||||
$sns_send .= '&title='.$sns_msg;
|
$sns_send .= '&title='.$sns_msg;
|
||||||
*/
|
|
||||||
|
|
||||||
|
$facebook_url = $sns_send.'&sns=facebook';
|
||||||
|
$twitter_url = $sns_send.'&sns=twitter';
|
||||||
|
$gplus_url = $sns_send.'&sns=gplus';
|
||||||
?>
|
?>
|
||||||
<ul id="bo_v_sns">
|
<ul id="bo_v_sns">
|
||||||
<li><a href="<?php echo $facebook_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 보내기"></a></li>
|
<li><a href="<?php echo $facebook_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 보내기"></a></li>
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!$board['bo_use_sns']) return;
|
if (!$board['bo_use_sns']) die('');
|
||||||
?>
|
?>
|
||||||
<tr>
|
|
||||||
<th scope="row">SNS 동시등록</th>
|
|
||||||
<td>
|
|
||||||
<ul id="bo_vc_sns">
|
<ul id="bo_vc_sns">
|
||||||
<?php
|
<?php
|
||||||
//============================================================================
|
//============================================================================
|
||||||
@ -108,5 +106,3 @@ if (!$board['bo_use_sns']) return;
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|||||||
@ -125,7 +125,14 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
include(G5_SNS_PATH."/view_comment_write.sns.skin.php");
|
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">SNS 동시등록</th>
|
||||||
|
<td id="bo_vc_send_sns"></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">내용</th>
|
<th scope="row">내용</th>
|
||||||
@ -306,6 +313,13 @@ function comment_delete()
|
|||||||
}
|
}
|
||||||
|
|
||||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
|
|
||||||
|
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
|
// sns 등록
|
||||||
|
$(function() {
|
||||||
|
$("#bo_vc_send_sns").load( "<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>" );
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<!-- } 댓글 쓰기 끝 -->
|
<!-- } 댓글 쓰기 끝 -->
|
||||||
@ -125,7 +125,14 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
include(G5_SNS_PATH."/view_comment_write.sns.skin.php");
|
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">SNS 동시등록</th>
|
||||||
|
<td id="bo_vc_send_sns"></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">내용</th>
|
<th scope="row">내용</th>
|
||||||
@ -306,6 +313,13 @@ function comment_delete()
|
|||||||
}
|
}
|
||||||
|
|
||||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
|
|
||||||
|
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
|
// sns 등록
|
||||||
|
$(function() {
|
||||||
|
$("#bo_vc_send_sns").load( "<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>" );
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<!-- } 댓글 쓰기 끝 -->
|
<!-- } 댓글 쓰기 끝 -->
|
||||||
Reference in New Issue
Block a user