그누보드 플러그인 카카오 밴드 네이버 QR-CODE 등 SNS 버튼 최종 소스
♨ 카랜더 일정 :
80 부터 까지
링크
첨부
본문
그누보드 플러그인 카카오 밴드 네이버 QR-CODE 등 SNS 버튼 최종 소스
최종 스킨버전 저장은 링크 참조 드립니다
https://11q.kr/www/bbs/board.php?bo_table=co4&wr_id=527&page=1
파일 첨부 위치 \\192.168.0.6\web\www\plugin\gnuboard_plugin_view_sns_share (2).zip
SNS 삽입위치 : W:\www\theme\11q.kr_NB-Basic\layout\footer\footer-basic\footer.php
<!-- //XNS 소셜공유버튼 삽입코드 홈에서는 플러그인용이 보임-->
<hr class="hr"/>
<!-- W:wwwplugingnuboard_plugin_view_sns_shareplugin_view.plugin.skin.php -->
<!-- W:wwwtheme11q.kr_NB-Basiclayoutfooterfooter-basicfooter.php -->
<?php $plugin_path = G5_PATH.'/plugin/gnuboard_plugin_view_sns_share';?>
<?php include_once($plugin_path.'/plugin_view.plugin.skin_footer.php'); ?>
<hr class="hr"/>
<!-- //XNS 소셜공유버튼 삽입코드 홈에서는 플러그인용이 보임-->
QR-CODE 삽입
\\192.168.0.6\web\www\plugin\gnuboard_plugin_view_sns_share (3).zip
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// W:wwwskinboard11q_kr_pdf_viewer_skin_board★gnuboard_view_plugin_sns_shareview.plugin.skin.php
//플로그인 경로 설정
$plugin_path = $board_skin_path.'/gnuboard_view_plugin_sns_share';
$plugin_url = $board_skin_url.'/gnuboard_view_plugin_sns_share';
$plugin_path = G5_PATH.'/plugin/gnuboard_plugin_view_sns_share';
$plugin_url = G5_URL.'/plugin/gnuboard_plugin_view_sns_share';
$plugin_url_qrcode = G5_URL.'/plugin/qrcode';
// 스킨경로
// ======================
//fontawesome CSS 인클루드
add_stylesheet('<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" />', 0);
//echo '<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" />';
//스킨 CSS 인클루드
add_stylesheet('<link rel="stylesheet" href="'.$plugin_url.'/css/plugin.css?'.time().'" />', 0);
//공유버튼 제목 등 설정
$meta_title = $view['subject'];
$meta_description = $meta_title;
$item_url = $view['href'];
$meta_image = '';
$thumb = get_list_thumbnail($board['bo_table'], $wr_id, 200, 200, false, true);
$youtube_url = $view['wr_link1'];
$youtube_id = str_replace('http://youtu.be/','',$youtube_url);
$youtube_id = str_replace('https://youtu.be/','',$youtube_id);
if($youtube_id){
$meta_image = 'https://img.youtube.com/vi/'.$youtube_id.'/hqdefault.jpg';
} else if($thumb){
$meta_image = $thumb;
}
?>
<!-- QR code생성 -->
<!-- Mobile-Mode HomePC.11q.kr -->
<?php if (is_mobile()) { ?>
<a href="#" onclick=set_toggle('id_qrcode')>☎</a>
<? $url22="https://$_SERVER[HTTP_HOST]"."$_SERVER[REQUEST_URI]"; ?>
<div id="id_qrcode" style="z-index:10000;visibility:hidden;display:none">
<img src="http://chart.apis.google.com/chart?cht=qr&chs=130x130&choe=UTF-8&chld=H&chl=<?=urlencode($url22)?>&chld=L|0" title='QR코드. : <?=htmlspecialchars($g4['title'])?> <?=htmlspecialchars($url22)?>'>
</div>
<?php } else { ?>
pc-mode
<?php } ?>
<script>
function set_toggle(id) {
var disp=document.getElementById(id);
if (disp.style.visibility) {
disp.style.visibility="";
disp.style.display="block";
set_cookie("set_qrcode",1,30*24*3600);
}
else {
disp.style.visibility="hidden";
disp.style.display="none";
delete_cookie("set_qrcode");
}
}
var disp=document.getElementById('id_qrcode');
if (get_cookie("set_qrcode")) {
disp.style.visibility="";
disp.style.display="block";
}
else {
disp.style.visibility="hidden";
disp.style.display="none";
}
</script>
<!-- QR code생성 end -->
<div class="gnuboard_view_plugin_sns_share">
<div class="sns_area">
<div class="sns_btn_area">
<a id="kakao-link-btn" href="javascript:sendLink()">
<img src="//developers.kakao.com/assets/img/about/logos/kakaolink/kakaolink_btn_medium.png" width=31 height=31 margin-left=2px class="fa fa-windows" data-toggle="tooltip" data-original-title="카카오톡 전송 공유 합니다." />
</a>
<a class="band btn_sns" title="BAND" href="https://band.us/plugin/share?body=<?php echo urlencode($meta_title.' '.$item_url) ?>" target="_blank">
<img src="<?php echo $plugin_url ?>/images/icon_band.png" />
</a>
<a class="naver btn_sns" title="NAVER" href="https://share.naver.com/web/shareView.nhn?url='<?php echo urlencode($item_url) ?>&title=<?php echo urlencode($meta_title) ?>" target="_blank">
<img src="<?php echo $plugin_url ?>/images/icon_naver.png" />
</a>
<a class="facebook" title="FACEBOOK" href="//www.facebook.com/share.php?u=<?php echo urlencode($item_url) ?>" target="_blank">
<i class="fa fa-facebook-f"></i>
</a>
<a class="twitter" title="TWITTER" href="//twitter.com/intent/tweet?text=<?php echo urlencode($meta_title.' '.$item_url) ?>" target="_blank">
<i class="fab fa-twitter"></i>
</a>
<a class="item_copy" title="COPY" href="#" onclick="copyItemLink(); return false;">
<i class="fas fa-link"></i>
<input type="text" value="<?php echo $item_url ?>" id="input_copy_item_link" readonly style="position:absolute; top:-100px; width:1px; padding:0px; border:0px; display:inline-block;" />
</a>
<!-- =============================================== pc에서 s -->
<!-- W:wwwtheme11q.kr_NB-Basiclayoutheaderheader-basicheader.php -->
<!-- W:wwwplugingnuboard_plugin_view_sns_shareplugin_view.plugin.skin_footer.php -->
<a>
<?php if (is_mobile()) { ?>
<?php } else { ?>
<? $url22="https://$_SERVER[HTTP_HOST]"."$_SERVER[REQUEST_URI]"; ?>
<div id="id_qrcode" style="z-index:10000;visibility:hidden;display:none"></div>
<img onclick="CopyLink()" src="http://chart.apis.google.com/chart?cht=qr&chs=130x130&choe=UTF-8&chld=H&chl=<?=urlencode($url22)?>&chld=L|0" width=70 height=70 margin-left=2px class="fa fa-windows" data-toggle="tooltip" title='QR코드 스캔 하세요: <?=htmlspecialchars($g4['title'])?> <?=htmlspecialchars($url22)?>'>
<?php } ?>
</a>
<!-- =============================================== pc에서 e -->
</div>
<!-- ===================================== 모바일은 밑으로 표시s -->
<a>
<?php if (is_mobile()) { ?>
<? $url22="https://$_SERVER[HTTP_HOST]"."$_SERVER[REQUEST_URI]"; ?>
<div id="id_qrcode" style="z-index:10000;visibility:hidden;display:none"></div>
<img onclick="CopyLink()" src="http://chart.apis.google.com/chart?cht=qr&chs=130x130&choe=UTF-8&chld=H&chl=<?=urlencode($url22)?>&chld=L|0" width=150 height=150 margin-left=1px class="fa fa-windows" data-toggle="tooltip" title='QR코드 스캔 하세요[구글]: <?=htmlspecialchars($g4['title'])?> <?=htmlspecialchars($url22)?>'>
<?php } else { ?>
<?php } ?>
</a>
<!-- ===================================== 모바일은 밑으로 표시e -->
</div>
</div>
<script>
//공유링크 복사 함수
function copyItemLink(){
var copyText = document.getElementById("input_copy_item_link");
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
alert("공유링크가 복사되었습니다.");
}
</script>
<?php if($config['cf_kakao_js_apikey']) { ?>
<script src="//developers.kakao.com/sdk/js/kakao.min.js" charset="utf-8"></script>
<script type='text/javascript'>
// 사용할 앱의 Javascript 키를 설정해 주세요.
// Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
// Kakao.init('041e1aaa61d8a6e76cd1a3e9368eeddd');
//Kakao.init('874b01c24bc6aff4ab28f05a5ad1b3ef');
// 관리자/설정>기본환경 설정 사용할 앱의 Javascript 키를 설정해 주세요.
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
Kakao.Link.createDefaultButton({
container: "#btn_kakao_<?php echo $wr_id ?>",
objectType: "feed",
content: {
title: "<?php echo $meta_title ?>",
description: "<?php echo $meta_description ?>",
imageUrl: "<?php echo $meta_image ?>",
link: {
mobileWebUrl: "<?php echo $item_url ?>",
webUrl: "<?php echo $item_url ?>"
}
}
});
</script>
<?php } ?>
<!-- ================================================================================= -->
<!-- 스킨 view 파일의 마지막에 추가하세요 -->
<!-- 관리자모드에서 kakao api key 입력후 사용하세요. -->
<!-- 관련링크에서 테스트 하세요. -->
<!-- <a id="kakao-link-btn" href="javascript:sendLink()">
<img src="//developers.kakao.com/assets/img/about/logos/kakaolink/kakaolink_btn_medium.png" width=31 height=31 margin-left=2px />
</a> -->
<script src="//developers.kakao.com/sdk/js/kakao.min.js" charset="utf-8"></script>
<script type="text/javascript">
// input your appkey
Kakao.init('<?php echo $config['cf_kakao_js_apikey']; ?>')
function sendLink() {
var webUrl = location.protocol + "<?php echo '//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>",
// imageUrl = 'https://boilerplate.kr/images/trees-park1by1.jpg'; //이미지 주소
imageUrl = 'https://11q.kr/www/22.gif'; //이미지 주소
Kakao.Link.sendDefault({
objectType: 'feed',
content: {
title: "<?php echo str_replace(array('%27', '"', '"'), '', strip_tags($g5['title'])); ?>",
description: "HomePC.11q.kr 홈페이지는 HomePc 활용을 위한 정보나눔을 11q.kr과 함께 합니다.",
imageUrl: imageUrl,
link: {
mobileWebUrl: webUrl,
webUrl: webUrl
}
},
buttons: [{
title: '자세히 보기',
link: {
mobileWebUrl: webUrl,
webUrl: webUrl
}
}]
});
}
</script>
<!-- ================================================================================= -->
<!-- XNS 소셜공유버튼 삽입코드-->
<!-- 삽입위치 W:wwwskinboard11q_kr_pdf_viewer_skin_board★view.skin.php -->
<!-- 삽입위치 W:wwwtheme11q.kr_NB-Basiclayoutfooterfooter-basicfooter.php -->
<!-- <?php // include_once(G5_PATH.'/plugin/gnuboard_plugin_view_sns_share/view.plugin.skin.php'); ?> -->
<!--
현재 파일 위치 W:wwwskinboard11q_kr_pdf_viewer_skin_board★gnuboard_view_plugin_sns_shareview.plugin.skin.php
-->
모바일 모드에서 QR-CODE 사진 키움
뷰PDF 1,2
office view
관련자료
-
링크
-
이전
-
다음
댓글목록
등록된 댓글이 없습니다.