카카오톡링크 제거
This commit is contained in:
@ -1,95 +0,0 @@
|
||||
/*
|
||||
Copyright 2012 KAKAO
|
||||
*/
|
||||
|
||||
(function (window, undefined) {
|
||||
var kakao = {};
|
||||
window.kakao = window.kakao || kakao;
|
||||
|
||||
var uagent = navigator.userAgent.toLocaleLowerCase();
|
||||
if (uagent.search("android") > -1) {
|
||||
kakao.os = "android";
|
||||
if (uagent.search("chrome") > -1) {
|
||||
kakao.browser = "android+chrome";
|
||||
}
|
||||
} else if (uagent.search("iphone") > -1 || uagent.search("ipod") > -1 || uagent.search("ipad") > -1) {
|
||||
kakao.os = "ios";
|
||||
}
|
||||
|
||||
var app = {
|
||||
talk: {
|
||||
base_url: "kakaolink://sendurl?",
|
||||
apiver: "2.0.1",
|
||||
store: {
|
||||
android: "market://details?id=com.kakao.talk",
|
||||
ios: "http://itunes.apple.com/app/id362057947"
|
||||
},
|
||||
package: "com.kakao.talk"
|
||||
},
|
||||
story: {
|
||||
base_url: "storylink://posting?",
|
||||
apiver: "1.0",
|
||||
store: {
|
||||
android: "market://details?id=com.kakao.story",
|
||||
ios: "http://itunes.apple.com/app/id486244601"
|
||||
},
|
||||
package: "com.kakao.story"
|
||||
}
|
||||
};
|
||||
|
||||
kakao.link = function (name) {
|
||||
var link_app = app[name];
|
||||
if (!link_app) return { send: function () {
|
||||
throw "No App exists";
|
||||
}};
|
||||
return {
|
||||
send: function (params) {
|
||||
var _app = this.app;
|
||||
params['apiver'] = _app.apiver;
|
||||
var full_url = _app.base_url + serialized(params);
|
||||
|
||||
var install_block = (function (os) {
|
||||
return function () {
|
||||
window.location = _app.store[os];
|
||||
};
|
||||
})(this.os);
|
||||
|
||||
if (this.os == "ios") {
|
||||
var timer = setTimeout(install_block, 2 * 1000);
|
||||
window.addEventListener('pagehide', clearTimer(timer));
|
||||
window.location = full_url;
|
||||
} else if (this.os == "android") {
|
||||
if (this.browser == "android+chrome") {
|
||||
window.location = "intent:" + full_url + "#Intent;package=" + _app.package + ";end;";
|
||||
} else {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
iframe.src = full_url;
|
||||
iframe.onload = install_block;
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
}
|
||||
},
|
||||
app: link_app,
|
||||
os: kakao.os,
|
||||
browser: kakao.browser
|
||||
};
|
||||
|
||||
function serialized(params) {
|
||||
var stripped = [];
|
||||
for (var k in params) {
|
||||
if (params.hasOwnProperty(k)) {
|
||||
stripped.push(k + "=" + encodeURIComponent(params[k]));
|
||||
}
|
||||
}
|
||||
return stripped.join("&");
|
||||
}
|
||||
|
||||
function clearTimer(timer) {
|
||||
return function () {
|
||||
clearTimeout(timer);
|
||||
window.removeEventListener('pagehide', arguments.callee);
|
||||
};
|
||||
}
|
||||
};
|
||||
}(window));
|
||||
@ -1444,9 +1444,6 @@ function get_sns_share_link($sns, $url, $title, $img)
|
||||
case 'googleplus':
|
||||
$str = '<a href="https://plus.google.com/share?url='.urlencode($url).'" class="share-googleplus" target="_blank"><img src="'.$img.'" alt="구글플러스에 공유"></a>';
|
||||
break;
|
||||
case 'kakaotalk':
|
||||
$str = '<a href="'.G5_MSHOP_URL.'/kakaolinkform.php?url='.urlencode($url).'&title='.urlencode($title).'" target="_blank"><img src="'.$img.'" alt="카카오톡링크 보내기"></a>';
|
||||
break;
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$g5['title'] = '카카오톡 메세지 입력';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$skin = G5_MSHOP_SKIN_PATH.'/kakaolinkform.skin.php';
|
||||
|
||||
if(is_file($skin))
|
||||
include_once($skin);
|
||||
else
|
||||
echo '<div class="empty_list">'.str_replace(G5_PATH.'/', '', $skin).' 파일이 존재하지 않습니다.</div>';
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -65,7 +65,6 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0
|
||||
<?php echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png'); ?>
|
||||
<?php echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png'); ?>
|
||||
<?php echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png'); ?>
|
||||
<?php echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_kakao.png'); ?>
|
||||
</div>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakao.link.js"></script>
|
||||
|
||||
<div id="kakao_message" class="new_win">
|
||||
<h1 id="win_title">카카오톡으로 보내기</h1>
|
||||
|
||||
<form name="fkakao" class="win_desc" onsubmit="return kakaolink_send(this);">
|
||||
<div id="kakao_title"><?php echo $title; ?></div>
|
||||
<div class="tbl_frm01">
|
||||
<label for="message">메세지</label>
|
||||
<textarea id="message" name="message"></textarea>
|
||||
</div>
|
||||
<div class="win_btn">
|
||||
<input type="submit" value="보내기" class="btn_submit">
|
||||
<button type="button" onclick="window.close();">취소</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 카카오톡 링크 보내기
|
||||
function kakaolink_send(f)
|
||||
{
|
||||
var msg = f.message.value;
|
||||
if(!msg) {
|
||||
alert("메세지를 입력해 주세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
msg, url, appid, appname은 실제 서비스에서 사용하는 정보로 업데이트되어야 합니다.
|
||||
*/
|
||||
kakao.link("talk").send({
|
||||
msg : msg,
|
||||
url : "<?php echo $url; ?>",
|
||||
appid : "<?php echo $_SERVER['HTTP_HOST']; ?>",
|
||||
appver : "2.0",
|
||||
appname : "<?php echo $config['cf_title']; ?>",
|
||||
type : "link"
|
||||
});
|
||||
|
||||
return false;
|
||||
//window.close();
|
||||
}
|
||||
</script>
|
||||
@ -79,7 +79,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_kakao.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +79,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_kakao.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +79,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_kakao.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -251,10 +251,6 @@
|
||||
|
||||
#sit_qa_w {display:none}
|
||||
|
||||
/* 카카오톡 보내기 */
|
||||
#kakao_message label {display:block;margin:0 0 10px}
|
||||
#kakao_title {margin:0 0 20px}
|
||||
|
||||
/* 쇼핑몰 이벤트 */
|
||||
#sev {margin:0;padding:0;min-height:150px;list-style:none}
|
||||
#sev li {position:relative;margin:-1px 0 0;border-bottom:1px solid #e9e9e9}
|
||||
|
||||
Reference in New Issue
Block a user