This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
The RBL License
Copyright (c) 2020 Redblock, Inc.

View File

@@ -0,0 +1,6 @@
# 게시판 테마 입니다.
기본형 데스크탑 목록형 게시판 테마 입니다.
## 주요기능
- 글쓰기 기능

View File

@@ -0,0 +1,148 @@
<!-- 첨부파일 접근권한 -->
<?php if ($d['bbs']['perm_l_down'] <= $my['level'] && (strpos($d['bbs']['perm_g_down'],'['.$my['mygroup'].']') === false)): ?>
<!-- 사진 -->
<?php if ($R['upload']): ?>
<?php
$img_files = array();
$audio_files = array();
$video_files = array();
$down_files = array();
foreach($d['upload']['data'] as $_u){
if($_u['type']==2 and $_u['hidden']==0) array_push($img_files,$_u);
else if($_u['type']==4 and $_u['hidden']==0) array_push($audio_files,$_u);
else if($_u['type']==5 and $_u['hidden']==0) array_push($video_files,$_u);
else if($_u['type']==1 || $_u['type']==6 || $_u['type']==7 and $_u['hidden']==0) array_push($down_files,$_u);
}
$attach_photo_num = count ($img_files);
$attach_video_num = count ($video_files);
$attach_audio_num = count ($audio_files);
$attach_down_num = count ($down_files);
?>
<div class="attach-section clearfix my-5">
<?php if($attach_photo_num>0):?>
<div class="float-left">
<ul class="list-inline mb-1 gallery animated fadeIn delay-1" data-plugin="photoswipe">
<?php foreach($img_files as $_u):?>
<?php
$img_origin=$_u['host'].'/'.$_u['folder'].'/'.$_u['tmpname'];
$thumb_list=getPreviewResize($img_origin,'180x120'); // 미리보기 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
$thumb_modal=getPreviewResize($img_origin,'c'); // 정보수정 모달용 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
?>
<figure class="list-inline-item">
<a class="" href="<?php echo $img_origin ?>" data-size="<?php echo $_u['width']?>x<?php echo $_u['height']?>" title="<?php echo $_u['name']?>">
<img src="<?php echo $thumb_list ?>" alt="" class="border">
</a>
<figcaption itemprop="caption description" class="f12 p-3">
<div class="media">
<div class="mr-2"><i class="fa fa-file-image-o fa-lg text-primary" aria-hidden="true"></i></div>
<div class="media-body">
<p class="mb-2 font-weight-bold"><?php echo $_u['name']?></p>
<small data-role="caption"><?php echo $_u['caption']?></small>
<small><?php echo getSizeFormat($_u['size'],1)?></small>
</div>
</div>
</figcaption>
<div class="card__corner">
<div class="card__corner-triangle"></div>
</div>
</figure>
<?php endforeach?>
</ul>
</div>
<?php endif?>
<?php if($attach_down_num>0):?>
<div class="float-left">
<ul class="list-inline mb-1 gallery animated fadeIn delay-1">
<?php foreach($down_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<li class="list-inline-item">
<div class="card f12" style="width: 180px">
<div class="card__corner">
<div class="card__corner-triangle"></div>
</div>
<div class="card-block d-flex justify-content-center align-items-center" style="height:87px">
<i class="fa fa-3x fa-file<?php echo $ext_icon?>-o text-muted"></i>
</div>
<div class="card-footer p-2 text-truncate text-muted bg-light">
<i class="fa fa-download" aria-hidden="true"></i> <?php echo $_u['name']?>
</div>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=mediaset&amp;a=download&amp;uid=<?php echo $_u['uid']?>" class="card-img-overlay bg-light text-muted p-3">
<div class="media">
<div class="mr-2"><i class="fa fa-file<?php echo $ext_icon?>-o fa-lg text-primary" aria-hidden="true"></i></div>
<div class="media-body">
<p class="mb-2 font-weight-bold"><?php echo $_u['name']?></p>
<small data-role="caption"><?php echo $_u['caption']?></small>
<small><?php echo getSizeFormat($_u['size'],1)?></small>
<span class="ml-2">
<i class="fa fa-download" aria-hidden="true"></i>
<small class="text-muted"><?php echo number_format($_u['down'])?></small>
</span>
</div>
</div>
</a>
</div>
</li>
<?php endforeach?>
</ul>
</div>
<?php endif?>
</div>
<?php if($attach_video_num>0):?>
<div class="card-deck">
<?php foreach($video_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<video width="320" height="240" controls data-plugin="mediaelement" class="card-img-top">
<source src="<?php echo $_u['host']?>/<?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="video/<?php echo $_u['ext']?>">
</video>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
</div><!-- /.card-deck -->
<?php endif?>
<?php if($attach_audio_num>0):?>
<div class="card-deck">
<?php foreach($audio_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<audio controls data-plugin="mediaelement" class="card-img-top w-100">
<source src="<?php echo $_u['host']?>/<?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="audio/mp3">
</audio>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
</div><!-- /.card-deck -->
<?php endif?>
<?php endif; ?>
<?php endif; ?>

View File

@@ -0,0 +1,105 @@
<?php
// 댓글 일반 사항
/*
1) 댓글 저장 테이블 : rb_s_comment
2) 한줄의견 저장 테이블 : rb_s_oneline
3) rb_s_comment 의 parent 필드 저장형식 ==> p_modulep_uid
예를 들어, 게시판 모듈의 uid = 3 인 글의 댓글은 아래와 같이 저장됩니다.
====> bbs3
4) 테마 css 는 테마/css/style.css 이며 댓글박스 가져올때 자동으로 함께 링크를 가져옵니다.
이 css 를 삭제하면 안되며 필요없는 경우 공백으로 처리하는 방법으로 하시기 바랍니다.
현재, notify 부분에 대한 css 가 있어서 삭제하면 안됩니다.
*/
// 댓글 출력 함수
// 함수 호출 방식으로 하면 모달 호출시에도 적용하기 편합니다.
/*
1) module = 부모모듈 : 댓글의 부모 모듈 id ( ex: bbs, post, forum ...)
2) parent_uid = 부모 uid : 댓글의 부모 포스트 uid
3) parent_table = 부모 테이블 : p_uid 가 소속된 테이블명 ( ex : rb_bbs_data, rb_blog_data, rb_chanel_data ...)
(댓글, 한줄의견 추가/삭제시 합계 업데이트시 필요)
*/
?>
<div id="commentting-container">
<!-- 댓글 출력 -->
</div>
<!-- theme css : 삭제금지, 불필요한 경우 해당 파일 내용을 비움. -->
<link href="<?php echo $g['url_root']?>/modules/comment/themes/<?php echo $d['bbs']['c_skin']?>/css/style.css" rel="stylesheet">
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>comment/';// 파일 업로드 폴더
var attach_module_theme = '<?php echo $d['theme']['upload_theme'] ?>';// attach 모듈 테마
$(function () {
// 댓글 출력 함수 실행
var p_module = '<?php echo $m?>';
var p_table = '<?php echo $table[$m.'data']?>';
var p_uid = '<?php echo $uid?>';
var agent = navigator.userAgent.toLowerCase();
if ((navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || (agent.indexOf("msie") != -1) ) {
var theme = '_desktop/bs4-classic'; // 인터넷 익스플로러 브라우저, 일반 코멘트 적용
} else {
var theme = '<?php echo $d['bbs']['c_skin'] ?>'; // 인터넷 익스플로러 브라우저가 아닌 경우, ckeditor5 기반 코멘트 적용
}
var commentting_container = $('#commentting-container');
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
commentting_container.Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'rb-commentting', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 15, // 출력갯수
commentPlaceHolder : '댓글을 입력해 주세요..',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 500, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload','bold','link'] // 툴바 항목
});
}
get_Rb_Comment(p_module,p_table,p_uid,theme);
// 댓글이 초기화 된 후
commentting_container.on('shown.rb.comment',function(){
var hash = $(location).attr('hash'); //URL에서 해시추출
if (hash) {
setTimeout(function(){
location.href = hash;
$(hash).addClass('highlight');
}, 500); //해시가 있을 경우, 해당 댓글(한줄의견)으로 이동
}
});
// 댓글이 등록된 후에
commentting_container.on('saved.rb.comment',function(){
$('[data-toggle="tooltip"]').tooltip()
})
// 댓글이 수정된 후에
commentting_container.on('edited.rb.comment',function(){
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'success'});
})
// 한줄의견이 등록된 후에
commentting_container.on('saved.rb.oneline',function(){
$('[data-toggle="tooltip"]').tooltip()
})
commentting_container.on('edited.rb.oneline',function(){
$.notify({message: '의견이 수정 되었습니다.'},{type: 'success'});
})
})
</script>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 픗터 파일 -->
<?php if ($g['add_footer_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_footer_img'] ?>" alt="" class="img-fluid my-3">
</div>
<?php endif; ?>
<!-- 게시판 픗터 코드 -->
<?php if ($g['add_footer_inc']) include_once $g['add_footer_inc'];?>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 헤더 파일 -->
<?php if ($g['add_header_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_header_img'] ?>" alt="" class="img-fluid">
</div>
<?php endif; ?>
<!-- 게시판 헤더 코드 -->
<?php if ($g['add_header_inc']) include_once $g['add_header_inc'];?>

View File

@@ -0,0 +1,47 @@
<?php
// seo 데이타 -- 전송되는 타이틀 추출
$_MSEO = getDbData($table['s_seo'],'rel=1 and parent='.$_HM['uid'],'*');
$_PSEO = getDbData($table['s_seo'],'rel=2 and parent='.$_HP['uid'],'*');
$_WTIT=strip_tags($g['meta_tit']);
$_link_url=$g['url_root'].$_SERVER['REQUEST_URI'];
?>
<ul class="list-inline" data-role="linkshare">
<li data-toggle="tooltip" title="페이스북" class="list-inline-item">
<a href="" role="button" onclick="snsWin('f');">
<img src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북공유" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="카카오스토리" class="list-inline-item">
<a href="" role="button" onclick="snsWin('ks');">
<img src="<?php echo $g['img_core']?>/sns/kakaostory.png" alt="카카오스토리" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="네이버" class="list-inline-item">
<a href="" role="button" onclick="snsWin('n');">
<img src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="트위터" class="list-inline-item">
<a href="" role="button" onclick="snsWin('t');">
<img src="<?php echo $g['img_core']?>/sns/twitter.png" alt="트위터" class="rounded-circle" width="50">
</a>
</li>
</ul>
<script type="text/javascript">
// sns 이벤트
function snsWin(sns) {
var snsset = new Array();
var enc_sbj = "<?php echo urlencode($_WTIT)?>";
var enc_url = "<?php echo urlencode($_link_url)?>";
var enc_tag = "<?php echo urlencode(str_replace(',',' ',$R['tag']))?>";
snsset['t'] = 'https://twitter.com/intent/tweet?url=' + enc_url + '&text=' + enc_sbj;
snsset['f'] = 'http://www.facebook.com/sharer.php?u=' + enc_url;
snsset['n'] = 'http://share.naver.com/web/shareView.nhn?url=' + enc_url + '&title=' + enc_sbj;
snsset['ks'] = 'https://story.kakao.com/share?url=' + enc_url + '&title=' + enc_sbj;
window.open(snsset[sns]);
}
</script>

View File

@@ -0,0 +1,153 @@
@charset "utf-8";
/*!
* kimsQ Rb v2.4.5 데스크탑 기본형 게시판 테마 스타일 (bs4-default)
* Homepage: http://www.kimsq.com
* Copyright 2020 redblock inc
* Licensed under RBL
* Based on Bootstrap v4
*/
/**
* 목차:
*
* 1 - 공통 rb-bbs
* 2 - 목록 rb-bbs-list
* 3 - 보기 rb-bbs-view
* 4 - 쓰기 rb-bbs-write
* 5 - 컴포넌트 Component
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
/**
* 1 - 공통 rb-bbs
* ----------------------------------------------------------------------------
*/
/**
* 2 - 목록 rb-bbs-list
* ----------------------------------------------------------------------------
*/
.rb-bbs-list .ico-replay::before {
display: inline-block;
width: 13px;
height: 10px;
margin: 4px 4px 0 1px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAABkCAMAAACvvNBNAAAAclBMVEVMaXEtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUAAAAtlvXBtxldAAAAJHRSTlMAlgoDD071ePxpN7FZvfDjLRxb/gEGpEL5hxUkyNvqeXyAwuvQ8jQMAAAAqElEQVR42u2R1w7CMAxFu/feu4ze//9FWlRaWlwkBC9IPi+2cpzYSYTPUZwjk7rQaZNk8ENalfAC2pgoctqoRhzRxtKWERxlY+oO4pz2cKUnU7Ww5TkP/Sl/IDVo1srAW04QZBttRfcV0dW7aWHeEx2a9XJHQx1DFI9hz2kqz4tp88rS5Op4KDdr62hAlpDPI13gpkf/elYEhmGYXzAMrL5XO94phvlnbrKzELi3OthbAAAAAElFTkSuQmCC) 0 -30px no-repeat;
background-size: 13px 50px;
vertical-align: top;
content: '';
}
/* 포커스된 아이템 강조표시 */
[data-role="bbs-list"] tr:focus {
background-color: #F5FFFE !important;
}
[data-role="bbs-list"] tr a:focus {
outline: 0
}
/**
* 3 - 보기 rb-bbs-view
* ----------------------------------------------------------------------------
*/
.rb-bbs-view {
margin-top: 30px
}
.rb-bbs-view header .media-body h1 {
padding: 4px 0 8px 0;
margin: 0;
font-size: 14px;
font-weight: bold;
line-height: 1.5;
border-bottom: #dfdfdf dotted 1px;
}
.rb-bbs-view header .rb-meta {
color: #c0c0c0;
font-family: dotum;
font-size: 11px;
line-height: 20px;
}
.rb-bbs-view header .rb-meta .rb-divider:before {
content: '|';
color: #ddd;
}
.rb-bbs-view [data-role="linkshare"] img {
width: 38px
}
.active .fa-bookmark-o:before {
content: "\f02e" !important;
}
[data-role="btn_post_like"].active .fa-heart-o:before {
content: "\f004";
}
[data-role="btn_post_like"].active .fa,
[data-role="btn_post_dislike"].active .fa {
color: red;
}
[data-role="btn_post_like"].active.heartbeat .fa,
[data-role="btn_post_dislike"].active.heartbeat .fa {
animation: heartbeat .8s;
}
.tag .badge~.badge {
margin-left: .3rem
}
/**
* 4 - 쓰기 rb-bbs-write
* ----------------------------------------------------------------------------
*/
.rb-bbs-write {
margin-top: 30px
}
.rb-bbs-write .ck-editor__editable_inline {
min-height: 350px;
}
/**
* 5 - 컴포넌트 Component
* ----------------------------------------------------------------------------
*/
/**
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
@keyframes heartbeat
{
0%
{
transform: scale( 1.8 );
}
30%
{
transform: scale( 1 );
}
60%
{
transform: scale( 1.8 );
}
100%
{
transform: scale( 1 );
}
}

View File

@@ -0,0 +1,60 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.4.5 데스크탑 기본형 게시판 테마 스크립트 (bs4-default): _main.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2020 redblock inc
* --------------------------------------------------------------------------
*/
$(function () {
// 사용자 액션에 대한 피드백 메시지 제공을 위해 액션 실행후 쿠키에 저장된 결과 메시지를 출력시키고 초기화 시킵니다.
putCookieAlert('bbs_action_result') // 실행결과 알림 메시지 출력
$('[data-toggle="print"]').click(function() {
window.print()
});
$('[data-toggle="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
//게시물 목록에서 프로필 풍선(popover) 띄우기
$('[data-toggle="getMemberLayer"]').popover({
container: 'body',
trigger: 'manual',
html: true,
content: function () {
var uid = $(this).attr('data-uid')
var mbruid = $(this).attr('data-mbruid')
var type = 'popover'
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_profileData',{
mbruid : mbruid,
type : type
},function(response){
var result = $.parseJSON(response);
var profile=result.profile;
$('#popover-item-'+uid).html(profile);
});
return '<div id="popover-item-'+uid+'" class="p-1">불러오는 중...</div>';
}
})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});
})

View File

@@ -0,0 +1,39 @@
<div data-role="attach">
<?php if($d['theme']['perm_photo']<=$my['level']):?>
<?php endif?>
<!--
module : 첨부파일 사용 모듈 ,
theme : 첨부파일 테마 ,
attach_handler_file : 파일첨부 실행 엘리먼트 ,
attach_handler_photo : 사진첨부 실행 엘리먼트 ,
parent_data : 수정시 필요한 해당 포스트 데이타 배열 변수,
attach_handler_getModalList : 업로드 리스트 모달로 호출용 엘리먼트 (class 인 경우 . 까지 넘긴다.) -->
<?php
// 설정값 세팅
// $parent_table=$wdgvar['parent_table'];
// $parent_uid=$wdgvar['parent_uid'];
// $parent_field=$wdgvar['parent_field'];
// $attach_mod=$wdgvar['attach_mod']; // main, list...
// $attach_object_type=$wdgvar['attach_object_type'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_tmpcode=$wdgvar['attach_tmpcode'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_featuredImg_form_name=$wdgvar['featuredImg_form_name'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_wdgvar_id=$wdgvar['widget_uid'];
$attachSkin = $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); // 업로드 테마
$parent_module=$m; // 첨부파일 사용하는 모듈
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
$attach_module_theme=$attachSkin; // 첨부파일 테마
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
$editor_type=$editor_type; // 에디터 타입 : html,markdown
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
include $g['path_module'].'mediaset/attach.php'; // 함수 인클루드
?>
</div>

View File

@@ -0,0 +1,32 @@
<?php
// 공통
$d['theme']['profile_link'] = "1"; // 회원 프로필 링크 (사용=1/사용안함=0)
//목록
$d['theme']['show_catnum'] = "1"; //분류별등록수출력(출력=1/감춤=0)
$d['theme']['pagenum'] = "5"; //페이지스킵숫자갯수
$d['theme']['search'] = "1"; //검색폼출력(출력=1/감춤=0)
$d['theme']['timeago'] = "0"; //상대시간 표기(사용=1/날짜표기=0)
//본문
$d['theme']['date_viewf'] = "Y.m.d H:i"; //날짜포맷
$d['theme']['show_report'] = "1"; //신고사용(출력=1/감춤=0)
$d['theme']['show_print'] = "1"; //인쇄사용(출력1/감춤=0)
$d['theme']['show_saved'] = "1"; //링크저장사용(출력=1/감춤=0)
$d['theme']['use_reply'] = "1"; //관리자 답변사용(사용=1/사용안함=0)
$d['theme']['show_tag'] = "1"; //태그출력(출력=1/감춤=0)
$d['theme']['show_upfile'] = "1"; //첨부파일출력(출력=1/감춤=0)
$d['theme']['show_like'] = "1"; //좋아요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_dislike'] = "0"; //싫어요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_share'] = "1"; //SNS공유출력(출력=1/감춤=0)
$d['theme']['comment_theme'] = "_desktop/bs4-default"; //댓글 테마 (/modules/comment/themes/ 참고)
//글쓰기
$d['theme']['edit_height'] = "350"; //글쓰기폼높이(픽셀)
$d['theme']['show_edittoolbar'] = "1"; //에디터 툴바출력(출력=1/감춤=0)
$d['theme']['show_upload'] = "1"; //파일 업로더 출력 여부 (출력=1/감춤=0)
$d['theme']['upload_theme'] = "_desktop/bs4-default-attach"; //파일 업로드 테마 (/modules/mediaset/themes/ 참고)
$d['theme']['perm_upload'] = "1"; //파일첨부권한(등급이상)
$d['theme']['show_wtag'] = "1"; //태그필드출력(출력=1/감춤=0)
$d['theme']['use_hidden'] = "1"; //비밀글(사용안함=0/유저선택사용=1/무조건비밀글=2)
?>

View File

@@ -0,0 +1,253 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-list">
<header class="d-flex justify-content-between align-items-center mb-4">
<span class="text-muted">
<small>총게시물 : <strong><?php echo number_format($NUM+count($NCD))?></strong> 건 (<?php echo $p?>/<?php echo $TPG?> page) </small>
</span>
<form class="form-inline" name="bbssearchf" action="<?php echo $g['s']?>/">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $bid?>">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
<input type="hidden" name="skin" value="<?php echo $skin?>">
<!-- 카테고리 출력부 -->
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<select name="category" class="form-control custom-select mr-2" onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();">
<option value="">
<?php echo $_catexp[0]?>
</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>" <?php if($_catexp[$i]==$cat):?> selected="selected"
<?php endif?>>
<?php echo $_catexp[$i]?>
<?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)
<?php endif?>
</option>
<?php endfor?>
</select>
<?php endif?>
<!-- 검색창 출력부 -->
<?php if($d['theme']['search']):?>
<div class="input-group">
<select class="custom-select rounded-0" name="where">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
<option value="term"<?php if($where=='term'):?> selected="selected"<?php endif?>>등록일</option>
</select>
<input type="text" class="form-control" name="keyword" value="<?php echo $_keyword?>" placeholder="검색어를 입력해주세요" style="min-width:200px">
<div class="input-group-append">
<button class="btn btn-light" type="submit">검색</button>
</div>
<?php if ($keyword): ?>
<div class="input-group-append">
<a class="btn btn-primary" href="<?php echo $g['bbs_reset'] ?>">리셋</a>
</div>
<?php endif; ?>
</div>
<?php endif?>
</form>
</header>
<div class="table-responsive-md">
<table class="table text-center bg-white" data-role="bbs-list">
<colgroup>
<col width="7%">
<col>
<col width="15%">
<col width="10%">
<col width="10%">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col"></th>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col">조회</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<!-- 공지사항 출력부 -->
<?php foreach($NCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr class="table-light" id="item-<?php echo $R['uid'] ?>">
<td>
<?php if($R['uid'] != $uid):?>
<span class="badge badge-light">공지</span>
<?php else:?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-secondary"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['comment']):?>
<span class="badge badge-light" data-role="total_comment">
<?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?>
</span>
<?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new"></span><?php endif?>
</td>
<td>
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</td>
<td class="text-muted"><?php echo $R['hit']?></td>
<td class="text-muted small">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
</td>
</tr>
<?php endforeach?>
<!-- 일반글 출력부 -->
<?php foreach($RCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr id="item-<?php echo $R['uid'] ?>">
<td class="text-muted small">
<?php if($R['uid'] != $uid):?>
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
<?php else:$_rec++?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['depth']):?>
<img src="<?php echo $g['img_core']?>/blank.gif" width="<?php echo ($R['depth']-1)*13?>" height="1">
<span class="ico-replay"></span>
<?php endif?>
<?php if($R['mobile']):?>
<span class="badge badge-light"><i class="fa fa-mobile fa-lg"></i></span>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-light"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?>
<span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
<?php if($R['comment']):?>
<span class="badge badge-light" data-role="total_comment">
<?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?>
</span>
<?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</td>
<td>
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</td>
<td><?php echo $R['hit']?></td>
<td class="text-muted small">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
</td>
</tr>
<?php endforeach?>
<?php if(!$NUM):?>
<tr>
<td class="text-muted p-5" colspan="5">
게시물이 없습니다.
</td>
</tr>
<?php endif?>
</tbody>
</table>
</div>
<footer class="d-flex justify-content-between align-items-center my-5">
<div class="btn-group">
<a class="btn btn-light" href="<?php echo $g['bbs_reset']?>">처음목록</a>
<a class="btn btn-light" href="<?php echo $g['bbs_list']?>">새로고침</a>
</div>
<ul class="pagination mb-0">
<?php echo getPageLink($d['theme']['pagenum'],$p,$TPG,'')?>
</ul>
<?php if($B['uid']):?>
<a class="btn btn-light" href="<?php echo $g['bbs_write']?>"><i class="fa fa-pencil"></i> 글쓰기</a>
<?php endif?>
</footer>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script>
//검색어가 있을 경우 검색어 input focus
<?php if ($keyword): ?>
$('[name="keyword"]').focus()
<?php endif; ?>
</script>

View File

@@ -0,0 +1 @@
부트스트랩 4 리스트 기본형

View File

@@ -0,0 +1,151 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-view">
<header>
<div class="media">
<span class="mr-3">
<img class="border rounded" src="<?php echo getAvatarSrc($R['mbruid'],'55') ?>" width="55" height="55" alt="">
</span>
<div class="media-body">
<h1 class="h4 mt-0">
<?php if($R['category']):?>
<span class="badge badge-light"><?php echo $R['category']?></span>
<?php endif?>
<?php echo $R['subject']?>
<?php if($R['hidden']):?>
<span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
</h1>
<div class="d-flex justify-content-between mt-2">
<ul class="rb-meta list-inline mb-0 text-muted">
<li class="list-inline-item">
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="#"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item"><?php echo getDateFormat($R['d_regis'],$d['theme']['date_viewf'])?></li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">조회 : <?php echo $R['hit']?></li>
</ul>
<div class="btn-group d-print-none">
<?php if($d['theme']['show_report']):?>
<a class="btn btn-link muted-link" href="<?php echo $g['bbs_action']?>singo&amp;uid=<?php echo $R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 신고하시겠습니까?');">
<i class="fa fa-meh-o"></i> 신고
</a>
<?php endif?>
<?php if($d['theme']['show_saved']):?>
<button type="button" class="btn btn-link muted-link<?php if($is_saved):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>saved&amp;uid=<?php echo $R['uid']?>"
data-role="btn_post_saved">
<i class="fa fa-bookmark-o"></i> 저장
</button>
<?php endif?>
<?php if($d['theme']['show_print']):?>
<button class="btn btn-link muted-link" data-toggle="print" type="button"><i class="fa fa-print"></i> 인쇄</button>
<?php endif?>
</div>
</div><!-- /.d-flex -->
</div><!-- /.media-body -->
</div><!-- /.media -->
</header>
<!-- 본문 -->
<article class="py-4 rb-article">
<?php echo getContents($R['content'],$R['html'])?>
</article>
<!-- 좋아요 or 싫어요 -->
<div class="text-center d-print-none">
<?php if($d['theme']['show_like']):?>
<button type="button" class="btn btn-light<?php if($is_liked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=like&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='likes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['likes']?></span>
</button>
<?php endif?>
<?php if($d['theme']['show_dislike']):?>
<button type="button" class="btn btn btn-light<?php if($is_disliked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=dislike&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_dislike">
<i class="fa fa-thumbs-o-down fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='dislikes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['dislikes']?></span>
</button>
<?php endif?>
</div>
<!-- 링크 공유 -->
<?php if($d['theme']['show_share']):?>
<div class="mt-4 d-print-none text-center">
<?php include $g['dir_module_skin'].'_linkshare.php'?>
</div>
<?php endif?>
<!-- 태그 -->
<?php if($R['tag']&&$d['theme']['show_tag']):?>
<div class="">
<?php $_tags=explode(',',$R['tag'])?>
<?php $_tagn=count($_tags)?>
<?php $i=0;for($i = 0; $i < $_tagn; $i++):?>
<?php $_tagk=trim($_tags[$i])?>
<a class="badge badge-secondary" href="<?php echo $g['bbs_orign']?>&amp;where=subject|tag&amp;keyword=<?php echo urlencode($_tagk)?>">
<?php echo $_tagk?>
</a>
<?php endfor?>
</div>
<?php endif?>
<!-- 첨부파일 인클루드 -->
<?php if($d['upload']['data']&&$d['theme']['show_upfile']&&$attach_file_num>0):?>
<aside class="mt-4">
<?php include $g['dir_module_skin'].'_attachment.php'?>
</aside>
<?php endif?>
<footer class="d-flex justify-content-between align-items-center mt-3 d-print-none">
<div class="btn-group">
<?php if($my['admin'] || $my['uid']==$R['mbruid']):?>
<a href="<?php echo $g['bbs_modify'].$R['uid']?>" class="btn btn-light">수정</a>
<a href="<?php echo $g['bbs_delete'].$R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');" class="btn btn-light">삭제</a>
<?php endif?>
<?php if($my['admin']&&$d['theme']['use_reply']):?>
<a href="<?php echo $g['bbs_reply'].$R['uid']?>" class="btn btn-light">답변</a>
<?php endif?>
</div>
<a href="<?php echo $g['bbs_list']?>" class="btn btn-light">목록</a>
</footer>
<!-- 댓글 인클루드 -->
<?php if(!$d['bbs']['c_hidden']):?>
<aside class="mt-4">
<?php include $g['dir_module_skin'].'_comment.php'?>
</aside>
<?php endif?>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<?php if($d['theme']['show_list']&&$print!='Y'):?>
<?php include_once $g['dir_module'].'mod/_list.php'?>
<?php include_once $g['dir_module_skin'].'list.php'?>
<?php endif?>

View File

@@ -0,0 +1,253 @@
<?php
if (!$_SESSION['upsescode']) {
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if($R['uid']){
$u_arr = getArrayString($R['upload']);
$_tmp=array();
$i=0;
foreach ($u_arr['data'] as $val) {
$U=getUidData($table['s_upload'],$val);
if(!$U['fileonly']) $_tmp[$i]=$val;
$i++;
}
$insert_array='';
// 중괄로로 재조립
foreach ($_tmp as $uid) {
$insert_array.='['.$uid.']';
}
}
if ($reply == 'Y') {
$submit_btn = '답변';
$submit_msg = '답변 게시물 등록중...';
$title_text = '게시물 답변 · ';
}
else if ($uid) {
$submit_btn = '수정';
$submit_msg = '게시물 수정중...';
$title_text = '게시물 수정 · ';
}
else {
$submit_btn = '등록';
$submit_msg = '게시물 등록중...';
$title_text = '새 게시물';
}
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-write">
<article>
<form name="writeForm" method="post" action="<?php echo $g['s']?>/" onsubmit="return writeCheck(this);" role="form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="write">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>">
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="reply" value="<?php echo $reply?>">
<input type="hidden" name="nlist" value="<?php echo $g['bbs_list']?>">
<input type="hidden" name="pcode" value="<?php echo $date['totime']?>">
<input type="hidden" name="html" value="HTML">
<input type="hidden" name="upfiles" id="upfilesValue" value="<?php echo $reply=='Y'?'':$R['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $R['featured_img'] ?>">
<?php if(!$my['id']):?>
<div class="form-group">
<label>이름</label>
<input type="text" name="name" placeholder="이름을 입력해 주세요." value="<?php echo $R['name']?>" id="" class="form-control">
</div>
<?php if(!$R['uid']||$reply=='Y'):?>
<div class="form-group">
<label>암호</label>
<input type="password" name="pw" placeholder="암호는 게시글 수정 및 삭제에 필요합니다." value="<?php echo $R['pw']?>" id="" class="form-control">
<small class="form-text text-muted">비밀답변은 비번을 수정하지 않아야 원게시자가 열람할 수 있습니다.</small>
</div>
<?php endif?>
<?php endif?>
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<div class="form-group">
<label>카테고리</label>
<select name="category" class="form-control custom-select">
<option value="">&nbsp;+ <?php echo $_catexp[0]?>선택</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>"<?php if($_catexp[$i]==$R['category']||$_catexp[$i]==$cat):?> selected="selected"<?php endif?>>ㆍ<?php echo $_catexp[$i]?><?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)<?php endif?></option>
<?php endfor?>
</select>
</div>
<?php endif?>
<div class="form-group">
<label for="">제목</label>
<input type="text" name="subject" placeholder="제목을 입력해 주세요." value="<?php echo $R['subject']?>" id="" class="form-control form-control-lg" autofocus autocomplete="off">
</div>
<div class="mb-3">
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>bbs/';// 파일 업로드 폴더
var attach_module_theme = '<?php echo $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); ?>';// attach 모듈 테마
</script>
<?php
$__SRC__ = htmlspecialchars($R['content']);
if ($g['broswer']!='MSIE 11' && $g['broswer']!='MSIE 10' && $g['broswer']!='MSIE 9') {
include $g['path_plugin'].'ckeditor5/import.classic.php';
} else {
include $g['path_plugin'].'ckeditor/import.desktop.php';
}
?>
</div>
<div class="form-group">
<label class="sr-only"></label>
<?php if($my['admin']):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="1"<?php if($R['notice']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="notice">공지글</label>
</div>
<?php endif?>
<?php if($d['theme']['use_hidden']==1):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="1"<?php if($R['hidden']):?> checked<?php endif?>>
<label class="custom-control-label" for="hidden">비밀글</label>
</div>
<?php elseif($d['theme']['use_hidden']==2):?>
<input type="hidden" name="hidden" value="1">
<?php endif?>
</div>
<!-- 첨부파일 업로드 -->
<?php if($d['theme']['show_upload']&&$d['theme']['perm_upload']<=$my['level']):?>
<?php if ($d['bbs']['attach']): ?>
<?php include $g['dir_module_skin'].'_uploader.php'?>
<?php endif; ?>
<?php endif?>
<?php if($d['theme']['show_wtag']):?>
<div class="form-group mt-4">
<label>태그<span class="rb-form-required text-danger"></span></label>
<input class="form-control" type="text" name="tag" placeholder="검색태그를 입력해 주세요." value="<?php echo $R['tag']?>">
<small class="form-text text-muted mt-2">이 게시물을 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요. 첫번째 항목이 대표 태그로 활용됩니다.</small>
</div>
<?php endif?>
<div class="form-group mt-5">
<label class="mr-3">등록 후</label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype1" name="backtype" value="list"<?php if(!$_SESSION['bbsback'] || $_SESSION['bbsback']=='list'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype1">목록으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype2" name="backtype" value="view"<?php if($_SESSION['bbsback']=='view'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype2">본문으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype3" name="backtype" value="now"<?php if($_SESSION['bbsback']=='now'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype3">이 화면 유지</label>
</div>
</div><!-- /.form-group -->
<footer class="text-center my-5">
<button class="btn btn-lg btn-light" type="button" onclick="cancelCheck();">취소</button>
<button class="btn btn-lg btn-primary js-submit" type="submit">
<?php echo $submit_btn ?>
</button>
</footer>
</form>
</article>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
// 글 등록 함수
var submitFlag = false;
function writeCheck(f) {
if (submitFlag == true) {
alert('게시물을 등록하고 있습니다. 잠시만 기다려 주세요.');
return false;
}
if (f.name && f.name.value == '') {
alert('이름을 입력해 주세요. ');
f.name.focus();
return false;
}
if (f.pw && f.pw.value == '') {
alert('암호를 입력해 주세요. ');
f.pw.focus();
return false;
}
<?php if ($B['category']): ?>
if (f.category && f.category.value == '') {
alert('카테고리를 선택해 주세요. ');
f.category.focus();
return false;
}
<?php endif; ?>
if (f.subject.value == '') {
alert('제목을 입력해 주세요. ');
f.subject.focus();
return false;
}
if (f.notice && f.hidden) {
if (f.notice.checked == true && f.hidden.checked == true) {
alert('공지글은 비밀글로 등록할 수 없습니다. ');
f.hidden.checked = false;
return false;
}
}
var editorData = editor.getData();
$('[name="content"]').val(editorData)
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = $('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = $(featured_img_input).val();
if(featured_img_uid ==''){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = $('.rb-attach-photo li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = $(first_attach_img_li).data('id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('input[name="upfiles"]').val(new_upfiles);
}
getIframeForAction(f);
submitFlag = true;
$('.js-submit').addClass('disabled').html('<i class="fa fa-spinner fa-spin"></i> <?php echo $submit_msg?>');
return submitFlag;
}
function cancelCheck() {
if (confirm('정말 취소하시겠습니까? ')){
history.back();
}
}
document.title = '<?php echo $title_text ?> · <?php echo $B['name']?>';
</script>

View File

@@ -0,0 +1,3 @@
The RBL License
Copyright (c) 2020 Redblock, Inc.

View File

@@ -0,0 +1,3 @@
# 게시판 테마 입니다.
기본형 데스크탑 갤러리형 게시판 테마 입니다.

View File

@@ -0,0 +1,437 @@
<?php
$img_files = array();
$audio_files = array();
$video_files = array();
$youtube_files = array();
$down_files = array();
foreach($d['upload']['data'] as $_u){
if($_u['type']==2 and $_u['hidden']==0) array_push($img_files,$_u);
else if($_u['type']==4 and $_u['hidden']==0) array_push($audio_files,$_u);
else if($_u['type']==5 and $_u['hidden']==0) array_push($video_files,$_u);
else if($_u['type']==1 || $_u['type']==6 || $_u['type']==7 and $_u['hidden']==0) array_push($down_files,$_u);
}
$attach_photo_num = count ($img_files);
$attach_video_num = count ($video_files);
$attach_audio_num = count ($audio_files);
$attach_down_num = count ($down_files);
?>
<?php if ($attach_photo_num==0): ?>
<div class="p-5 text-muted text-center border">
표시할 사진이 없습니다.<br>
이미지 숨김 처리여부를 확인해 주세요.
</div>
<?php endif; ?>
<?php if($attach_photo_num>0):?>
<h5>사진 <span class="text-danger"><?php echo $attach_photo_num?></span></h5>
<div class="list-inline mb-3 post-gallery" itemscope itemtype="http://schema.org/ImageGallery">
<?php foreach($img_files as $_u):?>
<?php
$thumb_list=getPreviewResize($_u['src'],$d['theme']['view_thumb']); // 미리보기 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
$thumb_modal=getPreviewResize($_u['src'],$_u['width'].'x'.$_u['height']); // 정보수정 모달용 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
?>
<figure class="list-inline-item">
<a href="<?php echo $thumb_modal ?>"
data-size="<?php echo $_u['width']?>x<?php echo $_u['height']?>"
title="<?php echo $_u['name']?>">
<img src="<?php echo $thumb_list ?>" alt="" class="border img-fluid">
</a>
<figcaption itemprop="caption description" hidden><?php echo $_u['caption']?></figcaption>
</figure>
<?php endforeach?>
</div>
<?php endif?>
<?php if($attach_down_num>0):?>
<div class="card">
<div class="card-header">
파일 (<span class="text-danger"><?php echo $attach_down_num ?></span>)
</div>
<ul class="list-group list-group-flush mb-0">
<?php foreach($down_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<i class="fa fa-file<?php echo $ext_icon?>-o fa-lg fa-fw"></i>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=mediaset&amp;a=download&amp;uid=<?php echo $_u['uid']?>" title="<?php echo $_u['caption']?>">
<?php echo $_u['name']?>
</a>
<small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small>
<span title="다운로드 수" data-toggle="tooltip" class="badge badge-light"><?php echo number_format($_u['down'])?></span>
</div>
</li>
<?php endforeach?>
</ul>
</div><!-- /.card -->
<?php endif?>
<?php if($attach_video_num>0):?>
<h5 class="mt-5">비디오 <span class="text-danger"><?php echo $attach_video_num?></span></h5>
<?php foreach($video_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<video width="320" height="240" controls class="card-img-top mejs-player">
<source src="<?php echo $_u['url']?><?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="video/<?php echo $_u['ext']?>">
</video>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
<?php endif?>
<?php if($attach_audio_num>0):?>
<h5 class="mt-5">오디오 <span class="text-danger"><?php echo $attach_audio_num?></span></h5>
<?php foreach($audio_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<audio controls class="card-img-top mejs-player w-100">
<source src="<?php echo $_u['url']?><?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="audio/<?php echo $_u['ext']?>">
</audio>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
<?php endif?>
<!-- 일반 포토모달 -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<!-- Controls are self-explanatory. Order can be changed. -->
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader-active when preloader is running -->
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<script>
var initPhotoSwipeFromDOM = function(gallerySelector) {
var subject= '<?php echo $R['subject']?>'
var orgin_title = document.title
var modal = $('.pswp')
// parse slide data (url, title, size ...) from DOM elements
// (children of gallerySelector)
var parseThumbnailElements = function(el) {
var thumbElements = el.childNodes,
numNodes = thumbElements.length,
items = [],
figureEl,
linkEl,
size,
item;
for (var i = 0; i < numNodes; i++) {
figureEl = thumbElements[i]; // <figure> element
// include only element nodes
if (figureEl.nodeType !== 1) {
continue;
}
linkEl = figureEl.children[0]; // <a> element
size = linkEl.getAttribute('data-size').split('x');
// create slide object
item = {
src: linkEl.getAttribute('href'),
w: parseInt(size[0], 10),
h: parseInt(size[1], 10)
};
if (figureEl.children.length > 1) {
// <figcaption> content
item.title = figureEl.children[1].innerHTML;
}
if (linkEl.children.length > 0) {
// <img> thumbnail element, retrieving thumbnail url
item.msrc = linkEl.children[0].getAttribute('src');
}
item.el = figureEl; // save link to element for getThumbBoundsFn
items.push(item);
}
return items;
};
// find nearest parent element
var closest = function closest(el, fn) {
return el && (fn(el) ? el : closest(el.parentNode, fn));
};
// triggers when user clicks on thumbnail
var onThumbnailsClick = function(e) {
e = e || window.event;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
var eTarget = e.target || e.srcElement;
// find root element of slide
var clickedListItem = closest(eTarget, function(el) {
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
});
if (!clickedListItem) {
return;
}
// find index of clicked item by looping through all child nodes
// alternatively, you may define index via data- attribute
var clickedGallery = clickedListItem.parentNode,
childNodes = clickedListItem.parentNode.childNodes,
numChildNodes = childNodes.length,
nodeIndex = 0,
index;
for (var i = 0; i < numChildNodes; i++) {
if (childNodes[i].nodeType !== 1) {
continue;
}
if (childNodes[i] === clickedListItem) {
index = nodeIndex;
break;
}
nodeIndex++;
}
if (index >= 0) {
// open PhotoSwipe if valid index found
openPhotoSwipe(index, clickedGallery);
}
return false;
};
// parse picture index and gallery index from URL (#&pid=1&gid=2)
var photoswipeParseHash = function() {
var hash = window.location.hash.substring(1),
params = {};
if (hash.length < 5) {
return params;
}
var vars = hash.split('&');
for (var i = 0; i < vars.length; i++) {
if (!vars[i]) {
continue;
}
var pair = vars[i].split('=');
if (pair.length < 2) {
continue;
}
params[pair[0]] = pair[1];
}
if (params.gid) {
params.gid = parseInt(params.gid, 10);
}
return params;
};
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
var pswpElement = document.querySelectorAll('.pswp')[0],
gallery,
options,
items;
items = parseThumbnailElements(galleryElement);
// define options (if needed)
options = {
history: true,
focus: false,
closeOnScroll: false,
closeOnVerticalDrag: false,
showAnimationDuration: 0,
hideAnimationDuration: 0,
timeToIdle: 4000,
// define gallery index (for URL)
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
getThumbBoundsFn: function(index) {
// See Options -> getThumbBoundsFn section of documentation for more info
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
rect = thumbnail.getBoundingClientRect();
return {
x: rect.left,
y: rect.top + pageYScroll,
w: rect.width
};
}
};
// PhotoSwipe opened from URL
if (fromURL) {
if (options.galleryPIDs) {
// parse real index when custom PIDs are used
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
for (var j = 0; j < items.length; j++) {
if (items[j].pid == index) {
options.index = j;
break;
}
}
} else {
// in URL indexes start from 1
options.index = parseInt(index, 10) - 1;
}
} else {
options.index = parseInt(index, 10);
}
// exit if index not found
if (isNaN(options.index)) {
return;
}
if (disableAnimation) {
options.showAnimationDuration = 0;
}
// Pass data to PhotoSwipe and initialize it
gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
//갤러리가 실행된 후에
gallery.listen('imageLoadComplete', function(index, item) {
var counter = '('+modal.find('.pswp__counter').text().replace(/ /g, '')+') ';
document.title = counter+subject+'-'+orgin_title // 브라우저 타이틀 재설정
$('body').addClass('modal-open') // 페이지 스크롤바 원상복귀를 위해
});
//슬라이드 갱신 후에
gallery.listen('afterChange', function() {
var counter = '('+modal.find('.pswp__counter').text().replace(/ /g, '')+') ';
document.title = counter+subject+'-'+orgin_title // 브라우저 타이틀 재설정
});
// 갤러리가 닫힐때
gallery.listen('close', function() {
$('body').removeClass('modal-open') // 페이지 스크롤바 원상복귀를 위해
});
};
// loop through all gallery elements and bind events
var galleryElements = document.querySelectorAll(gallerySelector);
for (var i = 0, l = galleryElements.length; i < l; i++) {
galleryElements[i].setAttribute('data-pswp-uid', i + 1);
galleryElements[i].onclick = onThumbnailsClick;
}
// Parse URL and open gallery if it contains #&pid=3&gid=1
var hashData = photoswipeParseHash();
if (hashData.pid && hashData.gid) {
openPhotoSwipe(hashData.pid, galleryElements[hashData.gid - 1], true, true);
}
};
$(function () {
// execute above function
initPhotoSwipeFromDOM('.post-gallery');
$('.post-gallery figure a').click(function(){
$(this).closest('figure').attr('tabindex','-1').focus();
});
})
</script>

View File

@@ -0,0 +1,88 @@
<?php
// 댓글 일반 사항
/*
1) 댓글 저장 테이블 : rb_s_comment
2) 한줄의견 저장 테이블 : rb_s_oneline
3) rb_s_comment 의 parent 필드 저장형식 ==> p_modulep_uid
예를 들어, 게시판 모듈의 uid = 3 인 글의 댓글은 아래와 같이 저장됩니다.
====> bbs3
4) 테마 css 는 테마/css/style.css 이며 댓글박스 가져올때 자동으로 함께 링크를 가져옵니다.
이 css 를 삭제하면 안되며 필요없는 경우 공백으로 처리하는 방법으로 하시기 바랍니다.
현재, notify 부분에 대한 css 가 있어서 삭제하면 안됩니다.
*/
// 댓글 출력 함수
// 함수 호출 방식으로 하면 모달 호출시에도 적용하기 편합니다.
/*
1) module = 부모모듈 : 댓글의 부모 모듈 id ( ex: bbs, post, forum ...)
2) parent_uid = 부모 uid : 댓글의 부모 포스트 uid
3) parent_table = 부모 테이블 : p_uid 가 소속된 테이블명 ( ex : rb_bbs_data, rb_blog_data, rb_chanel_data ...)
(댓글, 한줄의견 추가/삭제시 합계 업데이트시 필요)
*/
$comment_theme = $d['bbs']['c_skin']?$d['bbs']['c_skin']: ($d['theme']['comment_theme']?$d['theme']['comment_theme']:$d['bbs']['comment_main']);
?>
<div id="commentting-container">
<!-- 댓글 출력 -->
</div>
<link href="<?php echo $g['url_root']?>/modules/comment/themes/<?php echo $comment_theme?>/css/style.css" rel="stylesheet">
<script>
$(function () {
// 댓글 출력 함수 실행
var p_module = 'bbs';
var p_table = '<?php echo $table['bbsdata']?>';
var p_uid = '<?php echo $uid?>';
var theme = '<?php echo $comment_theme ?>';
var commentting_container = $('#commentting-container');
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
$('#commentting-container').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'rb-commentting', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 15, // 출력갯수
commentPlaceHolder : '댓글을 입력해 주세요..',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 500, // 댓글 입력 글자 수 제한
});
}
get_Rb_Comment(p_module,p_table,p_uid,theme);
// 댓글이 등록된 후에
commentting_container.on('saved.rb.comment',function(){
// $.notify({message:'댓글이 등록 되었습니다.'});
$('[data-toggle="tooltip"]').tooltip()
$('[data-role="comment-item"] article').autolink();
$(document).on('click','.add-comment',function(){
var uid = $(this).data('parent')
var textarea = $('[data-role="oneline-input-'+uid+'"]')
setTimeout(function(){ textarea.focus(); }, 200); // 한줄의견 추가시에 textarea focus 처리하기
});
})
// 댓글이 수정된 후에
commentting_container.on('edited.rb.comment',function(){
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'success'});
})
// 한줄의견이 등록된 후에
commentting_container.on('saved.rb.oneline',function(){
$('[data-toggle="tooltip"]').tooltip()
$('[data-role="oneline-item"] article').autolink();
})
commentting_container.on('edited.rb.oneline',function(){
$.notify({message: '의견이 수정 되었습니다.'},{type: 'success'});
})
})
</script>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 픗터 파일 -->
<?php if ($g['add_footer_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_footer_img'] ?>" alt="" class="img-fluid my-3">
</div>
<?php endif; ?>
<!-- 게시판 픗터 코드 -->
<?php if ($g['add_footer_inc']) include_once $g['add_footer_inc'];?>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 헤더 파일 -->
<?php if ($g['add_header_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_header_img'] ?>" alt="" class="img-fluid">
</div>
<?php endif; ?>
<!-- 게시판 헤더 코드 -->
<?php if ($g['add_header_inc']) include_once $g['add_header_inc'];?>

View File

@@ -0,0 +1,47 @@
<?php
// seo 데이타 -- 전송되는 타이틀 추출
$_MSEO = getDbData($table['s_seo'],'rel=1 and parent='.$_HM['uid'],'*');
$_PSEO = getDbData($table['s_seo'],'rel=2 and parent='.$_HP['uid'],'*');
$_WTIT=strip_tags($g['meta_tit']);
$_link_url=$g['url_root'].$_SERVER['REQUEST_URI'];
?>
<ul class="list-inline" data-role="linkshare">
<li data-toggle="tooltip" title="페이스북" class="list-inline-item">
<a href="" role="button" onclick="snsWin('f');">
<img src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북공유" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="카카오스토리" class="list-inline-item">
<a href="" role="button" onclick="snsWin('ks');">
<img src="<?php echo $g['img_core']?>/sns/kakaostory.png" alt="카카오스토리" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="네이버" class="list-inline-item">
<a href="" role="button" onclick="snsWin('n');">
<img src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="트위터" class="list-inline-item">
<a href="" role="button" onclick="snsWin('t');">
<img src="<?php echo $g['img_core']?>/sns/twitter.png" alt="트위터" class="rounded-circle" width="50">
</a>
</li>
</ul>
<script type="text/javascript">
// sns 이벤트
function snsWin(sns) {
var snsset = new Array();
var enc_sbj = "<?php echo urlencode($_WTIT)?>";
var enc_url = "<?php echo urlencode($_link_url)?>";
var enc_tag = "<?php echo urlencode(str_replace(',',' ',$R['tag']))?>";
snsset['t'] = 'https://twitter.com/intent/tweet?url=' + enc_url + '&text=' + enc_sbj;
snsset['f'] = 'http://www.facebook.com/sharer.php?u=' + enc_url;
snsset['n'] = 'http://share.naver.com/web/shareView.nhn?url=' + enc_url + '&title=' + enc_sbj;
snsset['ks'] = 'https://story.kakao.com/share?url=' + enc_url + '&title=' + enc_sbj;
window.open(snsset[sns]);
}
</script>

View File

@@ -0,0 +1,384 @@
@charset "utf-8";
/*!
* kimsQ Rb v2.4.5 데스크탑 갤러리 게시판 테마 스타일 (bs4-gallery)
* Homepage: http://www.kimsq.com
* Copyright 2020 redblock inc
* Licensed under RBL
* Based on Bootstrap v4
*/
/**
* 목차:
*
* 1 - 공통 rb-bbs
* 2 - 목록 rb-bbs-list
* 3 - 보기 rb-bbs-view
* 4 - 쓰기 rb-bbs-write
* 5 - 컴포넌트 Component
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
/**
* 1 - 공통 rb-bbs
* ----------------------------------------------------------------------------
*/
.badge-white {
background-color: #fff;
border: solid 1px #ddd;
color: #777;
letter-spacing: -1px;
font-weight: normal;
}
.active .fa-bookmark-o:before {
content: "\f02e" !important;
}
/**
* 2 - 목록 rb-bbs-list
* ----------------------------------------------------------------------------
*/
.rb-bbs-list .table {
border-bottom: 1px solid #ddd
}
.rb-bbs-list .table thead th {
color: #999;
font-size: 11px;
font-weight: normal
}
.rb-bbs-list .ico-replay::before {
display: inline-block;
width: 13px;
height: 10px;
margin: 4px 4px 0 1px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAABkCAMAAACvvNBNAAAAclBMVEVMaXEtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUAAAAtlvXBtxldAAAAJHRSTlMAlgoDD071ePxpN7FZvfDjLRxb/gEGpEL5hxUkyNvqeXyAwuvQ8jQMAAAAqElEQVR42u2R1w7CMAxFu/feu4ze//9FWlRaWlwkBC9IPi+2cpzYSYTPUZwjk7rQaZNk8ENalfAC2pgoctqoRhzRxtKWERxlY+oO4pz2cKUnU7Ww5TkP/Sl/IDVo1srAW04QZBttRfcV0dW7aWHeEx2a9XJHQx1DFI9hz2kqz4tp88rS5Op4KDdr62hAlpDPI13gpkf/elYEhmGYXzAMrL5XO94phvlnbrKzELi3OthbAAAAAElFTkSuQmCC) 0 -30px no-repeat;
background-size: 13px 50px;
vertical-align: top;
content: '';
}
.rb-bbs-list .card {
margin-bottom: 30px;
}
.rb-bbs-list .card:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
-webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
}
.rb-bbs-list .card .position-relative {
transition: all 0.3s ease;
max-width: 100%;
backface-visibility: hidden;
transform: translateZ(0px);
margin: 0px;
overflow: hidden;
color: #ccc
}
.rb-bbs-list .card .position-relative .card-img-top {
transition-timing-function: ease-in-out;
transition-property: all;
transition-duration: 0.5s;
transition-delay: 0s;
}
.rb-bbs-list .card:focus .position-relative .card-img-top,
.rb-bbs-list .card .position-relative:hover .card-img-top {
transform: scale3d(1.1, 1.1, 1.1);
}
.rb-bbs-list .card:focus .position-relative .opacity-0,
.rb-bbs-list .card .position-relative:hover .opacity-0 {
opacity: 1 !important;
transform: translate(0px, 0px);
transition-timing-function: ease-in;
transition-duration: 0.3s;
background-color: rgba(0, 0, 0, 0.6) !important;
}
.rb-bbs-list .card-body a {
display: -webkit-box;
overflow: hidden;
height: 38px;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.card-img-overlay .rb-hidden {
position: absolute;
top: 50%;
left: 50%;
margin-top: -30px;
margin-left: -30px;
font-size: 47px;
}
/**
* 3 - 보기 rb-bbs-view
* ----------------------------------------------------------------------------
*/
.rb-bbs-view header .media-body h1 {
padding: 4px 0 8px 0;
margin: 0;
font-size: 14px;
font-weight: bold;
border-bottom: #dfdfdf dotted 1px;
}
.rb-bbs-view header .rb-meta {
color: #c0c0c0;
font-family: dotum;
font-size: 11px;
line-height: 20px;
}
.rb-bbs-view header .rb-meta .rb-divider:before {
content: '|';
color: #ddd;
}
.rb-bbs-view .post-gallery figure:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
-webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
}
.post-gallery .list-inline-item:not(:last-child) {
margin-right: .2rem;
}
.rb-bbs-view [data-role="linkshare"] img {
width: 38px
}
[data-role="btn_post_like"].active .fa-heart-o:before {
content: "\f004";
}
[data-role="btn_post_like"].active .fa,
[data-role="btn_post_dislike"].active .fa {
color: red;
}
[data-role="btn_post_like"].active.heartbeat .fa,
[data-role="btn_post_dislike"].active.heartbeat .fa {
animation: heartbeat .8s;
}
.tag .badge~.badge {
margin-left: .3rem
}
/**
* 4 - 쓰기 rb-bbs-write
* ----------------------------------------------------------------------------
*/
.rb-bbs-write .ck-editor__editable_inline {
min-height: 250px;
}
/**
* 5 - 컴포넌트 Component
* ----------------------------------------------------------------------------
*/
.modal-lg {
max-width: calc(100vw - 12.53rem);
}
.modal-lg .modal-content {
/* min-height: calc(100vh - 5rem); */
}
.modal-lg .col-8 {
max-height: calc(100vh - 8rem);
overflow-y: auto;
}
/* modal-pswp */
.pswp-comment .pswp__scroll-wrap {
width: 60% !important;
left: 70px !important;
}
.pswp-comment:not(.pswp--fs) .pswp__scroll-wrap {
padding: 0;
box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
background-color: #000
}
.pswp-comment .rb__area {
position: absolute;
right: 70px;
width: 30%;
height: 100%;
overflow: hidden;
color: #333;
box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
background-color: #fff
}
.pswp-comment .pswp__bg {
opacity: 0.9 !important;
}
.pswp-comment .pswp__scroll-wrap,
.pswp-comment .rb__area {
top: 40px !important;
height: 90% !important;
}
.pswp--fs.pswp-comment .rb__area {
display: none
}
.pswp-comment .pswp__scroll-wrap {
transform: translate3d(0px, 0px, 0px);
}
.pswp--fs.pswp-comment .pswp__scroll-wrap {
transform: translate3d(190px, 0px, 0px);
}
.pswp-comment [data-role="article-body"] {
min-height: 150px;
max-height: 150px;
overflow-y: auto
}
.pswp-comment .pswp__button--fs,
.pswp-comment .pswp__button--arrow--left:before,
.pswp-comment .pswp__button--arrow--right:before {
background: url(./image/icon-set.png) 0 0 no-repeat;
background-repeat: no-repeat;
background-size: auto;
background-position: 0 0;
height: 48px;
width: 48px;
}
.pswp-comment .pswp__button--arrow--left:before {
background-position: 0 -49px;
}
.pswp-comment .pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 100px;
width: 100%;
transition: opacity .3s;
-webkit-font-smoothing: antialiased;
}
.pswp-comment:not(.pswp--fs) .pswp__ui--fit .pswp__top-bar,
.pswp-comment:not(.pswp--fs) .pswp__ui--fit .pswp__caption {
background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) !important;
}
.pswp-comment .pswp__ui--fit .pswp__top-bar,
.pswp-comment .pswp__ui--fit .pswp__caption {
background: transparent !important
}
.pswp-comment .pswp__button--fs {
margin: 30px;
background-position: 0 -98px;
height: 38px;
width: 38px;
}
.pswp-comment .pswp__ui--idle .pswp__button--arrow--left,
.pswp-comment .pswp__ui--idle .pswp__button--arrow--right {
transition: opacity .2s;
}
.pswp-comment .pswp__subject {
position: absolute;
left: 0;
top: 0;
font-size: 21px;
line-height: 1.28;
color: #FFF;
opacity: 0.75;
padding: 0 30px;
}
.pswp-comment .pswp__counter {
position: absolute;
left: 0;
top: 30px;
font-size: 12px;
line-height: 20px;
color: #ccc;
opacity: 0.75;
padding: 0 30px;
}
.pswp-comment .pswp__caption__center {
text-align: center;
}
.pswp-comment .btn-light {
background-color: #ffffff;
background-image: linear-gradient(-180deg, #fff 0%, #f5f5f5 90%);
}
.pswp-comment [data-role="article"] img {
max-width: 100%;
height: auto;
}
[data-role="btn_saved"].active::after {
content: '됨'
}
[data-role="comment-none"] > div {
height: 300px !important;
}
.pswp-comment [data-role="comment-main"] .timeline-vscroll {
max-height: calc(100vh - 32.3rem) !important;
}
/**
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
@keyframes heartbeat {
0% {
transform: scale( 1.8);
}
30% {
transform: scale( 1);
}
60% {
transform: scale( 1.8);
}
100% {
transform: scale( 1);
}
}

View File

@@ -0,0 +1,62 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.4.5 데스크탑 갤러리 게시판 테마 스크립트 (bs4-gallery): _main.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2020 redblock inc
* --------------------------------------------------------------------------
*/
$(function () {
// 사용자 액션에 대한 피드백 메시지 제공을 위해 액션 실행후 쿠키에 저장된 결과 메시지를 출력시키고 초기화 시킵니다.
putCookieAlert('bbs_action_result') // 실행결과 알림 메시지 출력
$('[data-toggle="print"]').click(function() {
window.print()
});
$('[data-toggle="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
//게시물 목록에서 프로필 풍선(popover) 띄우기
$('[data-toggle="getMemberLayer"]').popover({
container: 'body',
trigger: 'manual',
placement: 'auto',
html: true,
content: function () {
var uid = $(this).attr('data-uid')
var mbruid = $(this).attr('data-mbruid')
var type = 'popover'
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_profileData',{
mbruid : mbruid,
type : type
},function(response){
// modal.find('[data-role="article"]').loader("hide");
var result = $.parseJSON(response);
var profile=result.profile;
$('#popver-item-'+uid).html(profile);
});
return '<div id="popver-item-'+uid+'" class="p-1">불러오는 중...</div>';
}
})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});
})

View File

@@ -0,0 +1,39 @@
<div data-role="attach">
<?php if($d['theme']['perm_photo']<=$my['level']):?>
<?php endif?>
<!--
module : 첨부파일 사용 모듈 ,
theme : 첨부파일 테마 ,
attach_handler_file : 파일첨부 실행 엘리먼트 ,
attach_handler_photo : 사진첨부 실행 엘리먼트 ,
parent_data : 수정시 필요한 해당 포스트 데이타 배열 변수,
attach_handler_getModalList : 업로드 리스트 모달로 호출용 엘리먼트 (class 인 경우 . 까지 넘긴다.) -->
<?php
// 설정값 세팅
// $parent_table=$wdgvar['parent_table'];
// $parent_uid=$wdgvar['parent_uid'];
// $parent_field=$wdgvar['parent_field'];
// $attach_mod=$wdgvar['attach_mod']; // main, list...
// $attach_object_type=$wdgvar['attach_object_type'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_tmpcode=$wdgvar['attach_tmpcode'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_featuredImg_form_name=$wdgvar['featuredImg_form_name'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_wdgvar_id=$wdgvar['widget_uid'];
$attachSkin = $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); //테마
$parent_module=$m; // 첨부파일 사용하는 모듈
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
$attach_module_theme=$attachSkin; // 첨부파일 테마
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
$editor_type=$editor_type; // 에디터 타입 : html,markdown
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
include $g['path_module'].'mediaset/attach.php'; // 함수 인클루드
?>
</div>

View File

@@ -0,0 +1,43 @@
<?php
// 공통
$d['theme']['profile_link'] = "1"; // 회원 프로필 링크 (사용=1/사용안함=0)
//목록
$d['theme']['xl_item'] = "4"; // ≥ 1200px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['lg_item'] = "3"; // ≥ 992px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['md_item'] = "3"; // ≥ 768px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['sm_item'] = "2"; // ≥ 576px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['xs_item'] = "1"; // < 576px 미디어에서한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['list_thumb'] = "n"; //섬네일사이즈(s=75x75/q=150x150/t=100x67/m=240x160/n=320x213/z=640x427/c=800x534, htaccess 참고)
$d['theme']['use_rss'] = "1"; //rss발행사용(사용=1/사용안함=0)
$d['theme']['show_catnum'] = "1"; //분류별등록수출력(출력=1/감춤=0)
$d['theme']['pagenum'] = "5"; //페이지스킵숫자갯수
$d['theme']['search'] = "1"; //검색폼출력(출력=1/감춤=0)
$d['theme']['timeago'] = "1"; //상대시간 표기(사용=1/일시표기=0)
//본문
$d['theme']['view_thumb'] = "s"; //섬네일사이즈(s=75x75/q=150x150/t=100x67/m=240x160/n=320x213/z=640x427, htaccess 참고)
$d['theme']['date_viewf'] = "Y.m.d H:i"; //날짜포맷
$d['theme']['show_report'] = "1"; //신고사용(사용=1/사용안함=0)
$d['theme']['show_print'] = "1"; //인쇄사용(사용=1/사용안함=0)
$d['theme']['show_saved'] = "1"; //링크저장사용(사용=1/사용안함=0)
$d['theme']['use_reply'] = "0"; //답변사용(사용=1/사용안함=0)
$d['theme']['show_tag'] = "1"; //태그출력(출력=1/감춤=0)
$d['theme']['show_upfile'] = "1"; //첨부파일출력(출력=1/감춤=0)
$d['theme']['show_like'] = "1"; //좋아요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_dislike'] = "0"; //싫어요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_share'] = "1"; //SNS공유출력(출력=1/감춤=0)
$d['theme']['show_comment'] = "0"; //댓글출력(사용=1/사용안함=0)
$d['theme']['comment_theme'] = "_desktop/bs4-default"; //댓글 테마 (/modules/comment/themes/ 참고)
//글쓰기
$d['theme']['editor'] = "ckeditor"; //에디터 (ckeditor/summernote/simplemde)
$d['theme']['edit_height'] = "200"; //글쓰기폼높이(픽셀)
$d['theme']['show_edittoolbar'] = "0"; //에디터 툴바출력(출력=1/감춤=0)
$d['theme']['show_upload'] = "1"; //파일 업로드 출력 여부 (출력=1/감춤=0)
$d['theme']['upload_theme'] = "_desktop/bs4-gallery"; //파일 업로드 테마 (/modules/mediaset/themes/ 참고)
$d['theme']['upload_qty'] = "2"; //파일 업로드 출력 갯수
$d['theme']['perm_upload'] = "1"; //파일첨부권한(등급이상)
$d['theme']['show_wtag'] = "1"; //태그필드출력(출력=1/감춤=0)
$d['theme']['use_hidden'] = "1"; //비밀글(사용안함=0/유저선택사용=1/무조건비밀글=2)
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,252 @@
<?php
// 화면크기에 따라 한열에 배치할 아이템갯수와 관련된 class 산출
$col_xl_num = 12 /$d['theme']['xl_item'] ;
$col_lg_num = 12 /$d['theme']['lg_item'] ;
$col_md_num = 12 /$d['theme']['md_item'] ;
$col_sm_num = 12 /$d['theme']['sm_item'] ;
$col_xs_num = 12 /$d['theme']['xs_item'] ;
$col_xl = $d['theme']['xl_item']?' col-xl-'.$col_xl_num:'';
$col_lg = $d['theme']['lg_item']?' col-lg-'.$col_lg_num:'';
$col_md = $d['theme']['md_item']?' col-md-'.$col_md_num:'';
$col_sm = $d['theme']['sm_item']?' col-sm-'.$col_sm_num:'';
$col_xs = $d['theme']['xs_item']?' col-xs-'.$col_xs_num:'';
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-list">
<header class="d-flex justify-content-between align-items-center mb-4">
<span class="text-muted">
<small>총게시물 : <strong><?php echo number_format($NUM+count($NCD))?></strong> 건 (<?php echo $p?>/<?php echo $TPG?> page) </small>
</span>
<form class="form-inline" name="bbssearchf" action="<?php echo $g['s']?>/">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $bid?>">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
<input type="hidden" name="skin" value="<?php echo $skin?>">
<!-- 카테고리 출력부 -->
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<select name="category" class="form-control custom-select mr-2" onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();">
<option value="">
<?php echo $_catexp[0]?>
</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>" <?php if($_catexp[$i]==$cat):?> selected="selected"
<?php endif?>>
<?php echo $_catexp[$i]?>
<?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)
<?php endif?>
</option>
<?php endfor?>
</select>
<?php endif?>
<!-- 검색창 출력부 -->
<?php if($d['theme']['search']):?>
<div class="input-group">
<select class="custom-select rounded-0" name="where">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
<option value="term"<?php if($where=='term'):?> selected="selected"<?php endif?>>등록일</option>
</select>
<input type="text" class="form-control" name="keyword" value="<?php echo $_keyword?>" placeholder="검색어를 입력해주세요" style="min-width:200px">
<div class="input-group-append">
<button class="btn btn-light" type="submit">검색</button>
</div>
<?php if ($keyword): ?>
<div class="input-group-append">
<a class="btn btn-primary" href="<?php echo $g['bbs_reset'] ?>">리셋</a>
</div>
<?php endif; ?>
</div>
<?php endif?>
</form>
</header>
<div class="table-responsive-md">
<table class="table text-center">
<colgroup>
<col width="7%">
<col>
<col width="10%">
</colgroup>
<tbody>
<!-- 공지사항 출력부 -->
<?php foreach($NCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr class="table-light">
<td>
<?php if($R['uid'] != $uid):?>
<span class="badge badge-white">공지</span>
<?php else:?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-secondary"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-white" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-white" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['comment']):?><span class="badge badge-white"><?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?></span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</td>
<td class="text-muted small"><?php echo getDateFormat($R['d_regis'],'Y.m.d')?></td>
</tr>
<?php endforeach?>
</tbody>
</table>
<?php if ($NUM): ?>
<div class="row gutter-half">
<!-- 일반글 출력부 -->
<?php foreach($RCD as $R):?>
<?php
$R['mobile']=isMobileConnect($R['agent']);
$d['upload'] = getArrayString($R['upload']);
?>
<div class="<?php echo $col_xl.$col_lg.$col_md.$col_sm.$col_xs ?>">
<div class="card" id="item-<?php echo $R['uid']?>">
<a class="position-relative" href="<?php echo $g['bbs_view'].$R['uid']?>">
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'640x360') ?>" alt="" class="card-img-top">
<div class="card-img-overlay opacity-0">
<div class="d-flex flex-column w-100 h-100">
<?php if ($R['hidden']): ?>
<div class="rb-hidden">
<i class="fa fa-lock fa-fw"></i>
</div>
<?php else: ?>
<?php if($R['category']):?>
<h2 class="align-self-start list-inline mb-auto mr-auto mb-0">
<span class="badge badge-pill badge-secondary">
<?php echo $R['category']?>
</span>
</h2>
<?php endif?>
<ul class="align-self-end list-inline mt-auto ml-auto mb-0">
<li class="list-inline-item">
<i class="fa fa-heart-o" aria-hidden="true"></i>
<span data-role="likes"><?php echo $R['likes']?></span>
</li>
<li class="list-inline-item">
<i class="fa fa-eye" aria-hidden="true"></i>
<?php echo $R['hit']?>
</li>
<li class="list-inline-item">
<i class="fa fa-clone" aria-hidden="true"></i>
<?php echo $d['upload']['count'] ?>
</li>
<li class="list-inline-item">
<i class="fa fa-comment-o" aria-hidden="true"></i>
<span data-role="total_comment"><?php echo $R['comment']?></span>
</li>
</ul>
<?php endif; ?>
</div>
</div>
</a><!-- /.position-relative -->
<div class="card-body">
<a class="muted-link" href="<?php echo $g['bbs_view'].$R['uid']?>">
<?php echo getStrCut($R['subject'],100,'')?>
</a>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<span class="text-muted">
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
</span>
<small class="text-muted">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</small>
</div>
</div><!-- /.card -->
</div>
<?php endforeach?>
</div>
<?php else: ?>
<div class="d-flex align-items-center justify-content-center text-muted" style="height: 350px">
<div class="text-xs-center">
<div class="display-1">
<i class="fa fa-folder-open-o" aria-hidden="true"></i>
</div>
<p>게시물이 없습니다.</p>
</div>
</div>
<?php endif; ?>
</div>
<footer class="d-flex justify-content-between align-items-center my-5">
<div class="btn-group">
<a class="btn btn-light" href="<?php echo $g['bbs_reset']?>">처음목록</a>
<a class="btn btn-light" href="<?php echo $g['bbs_list']?>">새로고침</a>
</div>
<ul class="pagination mb-0">
<?php echo getPageLink($d['theme']['pagenum'],$p,$TPG,'')?>
</ul>
<?php if($B['uid']):?>
<a class="btn btn-light" href="<?php echo $g['bbs_write']?>"><i class="fa fa-pencil"></i> 글쓰기</a>
<?php endif?>
</footer>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script>
//검색어가 있을 경우 검색어 input focus
<?php if ($keyword): ?>
$('[name="keyword"]').focus()
<?php endif; ?>
<?php if (!$c): ?>
document.title = '<?php echo $B['name']?> · <?php echo $g['browtitle']?>' // 브라우저 타이틀 재설정
<?php endif; ?>
</script>

View File

@@ -0,0 +1 @@
부트스트랩 4 갤러리 기본형

View File

@@ -0,0 +1,155 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-view">
<header>
<div class="media">
<img class="mr-3 border rounded" src="<?php echo getAvatarSrc($R['mbruid'],'55') ?>" width="55" height="55" alt="">
<div class="media-body">
<h1 class="h4 mt-0">
<?php if($R['category']):?>
<span class="badge badge-white"><?php echo $R['category']?></span>
<?php endif?>
<?php echo $R['subject']?>
<?php if($R['hidden']):?>
<span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
</h1>
<div class="d-flex justify-content-between mt-2">
<ul class="rb-meta list-inline mb-0 text-muted">
<li class="list-inline-item">
<a class="muted-link" href="#"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">
<?php echo getDateFormat($R['d_regis'],$d['theme']['date_viewf'])?>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">조회 : <?php echo $R['hit']?></li>
</ul>
<div class="btn-group d-print-none">
<?php if($d['theme']['show_report']):?>
<a class="btn btn-link muted-link" href="<?php echo $g['bbs_action']?>report&amp;uid=<?php echo $R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 신고하시겠습니까?');">
<i class="fa fa-user-secret fw"></i> 신고
</a>
<?php endif?>
<?php if($d['theme']['show_saved']):?>
<button type="button" class="btn btn-link muted-link<?php if($is_saved):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>saved&amp;uid=<?php echo $R['uid']?>"
data-role="btn_post_saved">
<i class="fa fa-bookmark-o"></i> 저장
</button>
<?php endif?>
<?php if($d['theme']['show_print']):?>
<button class="btn btn-link muted-link" data-toggle="print" type="button"><i class="fa fa-print"></i> 인쇄</button>
<?php endif?>
</div>
</div><!-- /.d-flex -->
</div><!-- /.media-body -->
</div><!-- /.media -->
</header>
<main class="row mt-4">
<article class="col-7">
<!-- 첨부파일 인클루드 -->
<?php if($d['upload']['data']&&$d['theme']['show_upfile']):?>
<?php include $g['dir_module_skin'].'_attachment.php'?>
<?php endif?>
<!-- 좋아요 or 싫어요 -->
<div class="text-center d-print-none mt-5">
<?php if($d['theme']['show_like']):?>
<button type="button" class="btn btn-light btn-lg js-action-iframe<?php if($is_liked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=like&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='likes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['likes']?></span>
</button>
<?php endif?>
<?php if($d['theme']['show_dislike']):?>
<button type="button" class="btn btn-light btn-lg<?php if($is_disliked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=dislike&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_dislike">
<i class="fa fa-thumbs-o-down fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='dislikes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['dislikes']?></span>
</button>
<?php endif?>
</div>
<!-- 본문 -->
<article class="py-4 rb-article">
<?php echo getContents($R['content'],$R['html'])?>
</article>
<!-- 링크 공유 -->
<?php if($d['theme']['show_share']):?>
<div class="my-4 d-print-none text-center">
<?php include $g['dir_module_skin'].'_linkshare.php'?>
</div>
<?php endif?>
<!-- 태그 -->
<?php if($R['tag']&&$d['theme']['show_tag']):?>
<div class="py-3">
<?php $_tags=explode(',',$R['tag'])?>
<?php $_tagn=count($_tags)?>
<?php $i=0;for($i = 0; $i < $_tagn; $i++):?>
<?php $_tagk=trim($_tags[$i])?>
<a class="badge badge-secondary" href="<?php echo $g['bbs_orign']?>&amp;where=subject|tag&amp;keyword=<?php echo urlencode($_tagk)?>">
<?php echo $_tagk?>
</a>
<?php endfor?>
</div>
<?php endif?>
<footer class="d-flex justify-content-between align-items-center my-3 d-print-none">
<div class="btn-group">
<?php if($my['admin'] || $my['uid']==$R['mbruid']):?>
<a href="<?php echo $g['bbs_modify'].$R['uid']?>" class="btn btn-light">수정</a>
<a href="<?php echo $g['bbs_delete'].$R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');" class="btn btn-light">삭제</a>
<?php endif?>
<?php if($my['admin']&&$d['theme']['use_reply']):?>
<a href="<?php echo $g['bbs_reply'].$R['uid']?>" class="btn btn-light">답변</a>
<?php endif?>
</div>
<a href="<?php echo $g['bbs_list']?>" class="btn btn-light">목록</a>
</footer>
</article>
<aside class="col-5 border-left d-print-none">
<!-- 댓글 인클루드 -->
<?php if(!$d['bbs']['c_hidden']):?>
<?php include $g['dir_module_skin'].'_comment.php'?>
<?php endif?>
</aside>
</main>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
$(window).on("load", function(){
initPhotoSwipeFromDOM('.post-gallery');
});
</script>

View File

@@ -0,0 +1,262 @@
<?php
if (!$_SESSION['upsescode'])
{
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if($R['uid']){
$u_arr = getArrayString($R['upload']);
$_tmp=array();
$i=0;
foreach ($u_arr['data'] as $val) {
$U=getUidData($table['s_upload'],$val);
if(!$U['fileonly']) $_tmp[$i]=$val;
$i++;
}
$insert_array='';
// 중괄로로 재조립
foreach ($_tmp as $uid) {
$insert_array.='['.$uid.']';
}
}
if ($uid) {
$submit_btn = '수정';
$submit_msg = '게시물 수정중...';
$title_text = '게시물 수정 · '.$B['name'];
}
else {
$submit_btn = '등록';
$submit_msg = '게시물 등록중...';
$title_text = '새 게시물';
}
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-write">
<article class="mt-4">
<form name="writeForm" method="post" action="<?php echo $g['s']?>/" onsubmit="return writeCheck(this);" role="form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="write">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>">
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="reply" value="<?php echo $reply?>">
<input type="hidden" name="nlist" value="<?php echo $g['bbs_list']?>">
<input type="hidden" name="pcode" value="<?php echo $date['totime']?>">
<input type="hidden" name="html" value="HTML">
<input type="hidden" name="upfiles" id="upfilesValue" value="<?php echo $reply=='Y'?'':$R['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $R['featured_img'] ?>">
<div class="row">
<div class="col-6">
<!-- 첨부파일 업로드 -->
<?php if($d['theme']['show_upload']&&$d['theme']['perm_upload']<=$my['level']):?>
<?php if ($d['bbs']['attach']): ?>
<?php include $g['dir_module_skin'].'_uploader.php'?>
<?php endif; ?>
<?php endif?>
</div><!-- /.col-6 -->
<div class="col-6">
<?php if(!$my['id']):?>
<div class="form-group">
<label>이름</label>
<input type="text" name="name" placeholder="이름을 입력해 주세요." value="<?php echo $R['name']?>" id="" class="form-control">
</div>
<?php if(!$R['uid']||$reply=='Y'):?>
<div class="form-group">
<label>암호</label>
<input type="password" name="pw" placeholder="암호는 게시글 수정 및 삭제에 필요합니다." value="<?php echo $R['pw']?>" id="" class="form-control">
<small class="form-text text-muted">비밀답변은 비번을 수정하지 않아야 원게시자가 열람할 수 있습니다.</small>
</div>
<?php endif?>
<?php endif?>
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<div class="form-group">
<label>카테고리</label>
<select name="category" class="form-control custom-select form-control-lg">
<option value="">&nbsp;+ <?php echo $_catexp[0]?>선택</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>"<?php if($_catexp[$i]==$R['category']||$_catexp[$i]==$cat):?> selected="selected"<?php endif?>>ㆍ<?php echo $_catexp[$i]?><?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)<?php endif?></option>
<?php endfor?>
</select>
</div>
<?php endif?>
<div class="form-group">
<label for="">제목</label>
<input type="text" name="subject" placeholder="제목을 입력해 주세요." value="<?php echo $R['subject']?>" id="" class="form-control form-control-lg" autofocus autocomplete="off">
</div>
<div class="mb-3">
<label>본문</label>
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>bbs/';// 파일 업로드 폴더
var attach_module_theme = '_desktop/bs4-gallery';// attach 모듈 테마
</script>
<?php
$__SRC__ = htmlspecialchars($R['content']);
if ($g['broswer']!='MSIE 11' && $g['broswer']!='MSIE 10' && $g['broswer']!='MSIE 9') {
include $g['path_plugin'].'ckeditor5/import.classic.php';
} else {
include $g['path_plugin'].'ckeditor/import.desktop.post.php';
}
?>
</div>
<?php if($d['theme']['show_wtag']):?>
<div class="form-group mt-4">
<label>태그<span class="rb-form-required text-danger"></span></label>
<input class="form-control form-control-lg" type="text" name="tag" placeholder="검색태그를 입력해 주세요." value="<?php echo $R['tag']?>">
<small class="form-text text-muted">이 게시물을 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요.</small>
</div>
<?php endif?>
<div class="form-group">
<label class="sr-only"></label>
<?php if($my['admin']):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="1"<?php if($R['notice']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="notice">공지글</label>
</div>
<?php endif?>
<?php if($d['theme']['use_hidden']==1):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="1"<?php if($R['hidden']):?> checked<?php endif?>>
<label class="custom-control-label" for="hidden">비밀글</label>
</div>
<?php elseif($d['theme']['use_hidden']==2):?>
<input type="hidden" name="hidden" value="1">
<?php endif?>
</div>
<div class="form-group mt-5">
<label class="mr-3">등록 후</label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype1" name="backtype" value="list"<?php if(!$_SESSION['bbsback'] || $_SESSION['bbsback']=='list'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype1">목록으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype2" name="backtype" value="view"<?php if($_SESSION['bbsback']=='view'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype2">본문으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype3" name="backtype" value="now"<?php if($_SESSION['bbsback']=='now'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype3">이 화면 유지</label>
</div>
</div><!-- /.form-group -->
<footer class="text-center my-3">
<button class="btn btn-lg btn-outline-primary btn-block js-submit" type="submit"><?php echo $submit_btn ?></button>
<button class="btn btn-lg btn-light btn-block" type="button" onclick="cancelCheck();">취소</button>
</footer>
</div><!-- /.col-6 -->
</div><!-- /.row -->
</form>
</article>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
// 글 등록 함수
var submitFlag = false;
function writeCheck(f) {
if (submitFlag == true) {
alert('게시물을 등록하고 있습니다. 잠시만 기다려 주세요.');
return false;
}
if (f.name && f.name.value == '') {
alert('이름을 입력해 주세요. ');
f.name.focus();
return false;
}
if (f.pw && f.pw.value == '') {
alert('암호를 입력해 주세요. ');
f.pw.focus();
return false;
}
<?php if ($B['category']): ?>
if (f.category && f.category.value == '') {
alert('카테고리를 선택해 주세요. ');
f.category.focus();
return false;
}
<?php endif; ?>
if (f.subject.value == '') {
alert('제목을 입력해 주세요. ');
f.subject.focus();
return false;
}
if (f.notice && f.hidden) {
if (f.notice.checked == true && f.hidden.checked == true) {
alert('공지글은 비밀글로 등록할 수 없습니다. ');
f.hidden.checked = false;
return false;
}
}
var editorData = editor.getData();
$('[name="content"]').val(editorData)
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = $('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = $(featured_img_input).val();
if(!featured_img_uid){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = $('.rb-attach-photo li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = $(first_attach_img_li).data('id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('input[name="upfiles"]').val(new_upfiles);
}
if ( !$('[name="upfiles"]').val() && !$('[name="notice"]').prop("checked") ) {
alert('사진파일을 첨부해 주세요. ');
$('[data-role="attach-handler-file"]').focus()
return false;
}
getIframeForAction(f);
submitFlag = true;
$('.js-submit').addClass('disabled').html('<i class="fa fa-spinner fa-spin"></i> <?php echo $submit_msg?>');
return submitFlag;
}
function cancelCheck() {
if (confirm('정말 취소하시겠습니까? ')){
history.back();
}
}
document.title = '<?php echo $title_text ?> · <?php echo $B['name']?>';
</script>

View File

@@ -0,0 +1,64 @@
<?php
// 댓글 일반 사항
/*
1) 댓글 저장 테이블 : rb_s_comment
2) 한줄의견 저장 테이블 : rb_s_oneline
3) rb_s_comment 의 parent 필드 저장형식 ==> p_modulep_uid
예를 들어, 게시판 모듈의 uid = 3 인 글의 댓글은 아래와 같이 저장됩니다.
====> bbs3
4) 테마 css 는 테마/css/style.css 이며 댓글박스 가져올때 자동으로 함께 링크를 가져옵니다.
이 css 를 삭제하면 안되며 필요없는 경우 공백으로 처리하는 방법으로 하시기 바랍니다.
현재, notify 부분에 대한 css 가 있어서 삭제하면 안됩니다.
*/
// 댓글 출력 함수
// 함수 호출 방식으로 하면 모달 호출시에도 적용하기 편합니다.
/*
1) module = 부모모듈 : 댓글의 부모 모듈 id ( ex: bbs, post, forum ...)
2) parent_uid = 부모 uid : 댓글의 부모 포스트 uid
3) parent_table = 부모 테이블 : p_uid 가 소속된 테이블명 ( ex : rb_bbs_data, rb_blog_data, rb_chanel_data ...)
(댓글, 한줄의견 추가/삭제시 합계 업데이트시 필요)
*/
?>
<div id="commentting-container">
<!-- 댓글 출력 -->
</div>
<!-- theme css : 삭제금지, 불필요한 경우 해당 파일 내용을 비움. -->
<link href="<?php echo $g['url_root']?>/modules/comment/themes/<?php echo $d['bbs']['c_mskin']?>/css/style.css" rel="stylesheet">
<script>
$(function () {
// 댓글 출력 함수 실행
var p_module = '<?php echo $m?>';
var p_table = '<?php echo $table[$m.'data']?>';
var p_uid = '<?php echo $uid?>';
var theme = '<?php echo $d['bbs']['c_mskin'] ?>';
var commentting_container = $('#commentting-container');
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
$('#commentting-container').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'rb-commentting', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 5, // 출력갯수
commentPlaceHolder : '비방 및 욕설이 들어간 댓글은 별다른 고지 없이 삭제 될 수 있습니다.',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 500, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload'] // 툴바 항목
});
}
get_Rb_Comment(p_module,p_table,p_uid,theme);
})
</script>

View File

@@ -0,0 +1,44 @@
<li class="table-view-cell" id="item-{$uid}" data-plugin="markjs">
<span class="badge badge-default badge-outline text-xs-center rounded">
<strong data-role="total_comment">{$comment}</strong><br>
<small>댓글</small>
</span>
<a data-title="{$bname}"
data-toggle="page"
data-target="#page-bbs-view"
data-start="#page-bbs-list"
data-subject="{$subject}"
data-cat="{$category}"
data-url="/{$r}/b/{$bid}/{$uid}"
data-avatar="{$avatar}"
data-mbruid="{$mbruid}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-bid="{$bid}" data-uid="{$uid}" role="button">
<img class="media-object pull-left bg-faded border img-circle" src="{$avatar}" width="42" data-role="avatar">
<div class="media-body">
<span class="line-clamp-2">
<span class="rb-new mr-1 {$new}"></span>
<span class="badge badge-default badge-inverted {$hidden}"><i class="fa fa-lock fa-lg"></i></span>
<span data-role="subject">{$subject}</span>
</span>
<p>
<small>{$name}</small>
<small class="ml-1">조회 {$hit}</small>
<small class="ml-1">추천 {$likes}</small>
<time class="small ml-1" {$timeago} datetime="{$d_regis_c}">{$d_regis}</time>
<small class="ml-1">{$category}</small>
<small class="{$notice}">공지</small>
<span class="badge badge-default badge-inverted">{$bbs}</span>
</p>
</div>
</a>
</li>

View File

@@ -0,0 +1,9 @@
<ul class="table-view bg-white my-0 listMarkup-avatar border-top-0" data-role="list-wrapper" data-page="{$page}">
<li class="table-view-cell table-view-active text-muted d-none py-2" data-role="toolbar">
<i class="fa fa-folder-open-o fa-fw" aria-hidden="true"></i> <small>{$num}건</small>
</li>
{$items}
</ul>

View File

@@ -0,0 +1,34 @@
<nav class="bar bar-tab bar-light bg-white px-0 shadow-sm swiper-pagination-clickable swiper-pagination-bullets" data-role="bar-tab">
<a class="tab-item active" role="button" data-act="reset" data-role="list">
<span class="icon icon-list"></span>
<span class="tab-label">목록</span>
</a>
<a class="tab-item {$show_bbs_category}"
href="#page-bbs-category"
data-toggle="page"
data-start="#page-bbs-list"
data-role="category"
data-title="{$bbs_name}"
data-bid="{$bbs_id}" role="button">
<span class="icon fa fa-folder-o"></span>
<span class="tab-label">분류</span>
</a>
<a class="tab-item {$show_bbs_search}"
href="#modal-bbs-search"
data-toggle="modal"
data-title="{$bbs_name}"
data-bid="{$bbs_id}" data-role="search" role="button">
<span class="icon icon-search"></span>
<span class="tab-label">검색</span>
</a>
<a class="tab-item {$show_bbs_write}"
href="#modal-bbs-write"
data-toggle="modal"
data-mod="new"
data-url="{$bbs_write}"
data-title="{$bbs_name}"
data-bid="{$bbs_id}" role="button">
<span class="icon icon-compose"></span>
<span class="tab-label">쓰기</span>
</a>
</nav>

View File

@@ -0,0 +1,103 @@
<div class="card shadow-sm" id="item-{$uid}">
<header class="card-header bg-white d-flex align-items-center pl-2 pr-0 pt-2 pb-1">
<div class="media"
data-toggle="page"
data-start="#page-dashboard"
data-target="#page-member-profile"
data-mbruid="{$mbruid}"
data-url="/{$mbrid}"
data-title="{$nic}">
<img src="{$avatar}" class="img-circle mr-2" style="width:2.375rem;height:2.375rem">
<div>
<h6 class="mb-0">{$name}</h6>
<time class="text-muted small" {$timeago} datetime="{$d_regis_c}">{$d_regis}</time>
<span class="rb-new ml-1 {$new}"></span>
<small class="text-muted ml-1">{$category}</small>
<span class="badge badge-default badge-inverted">{$bbs}</span>
</div>
</div><!-- /.media -->
<a class="btn btn-link text-muted ml-auto p-x-1"
data-toggle="popup"
href="#popup-link-more"
data-link="/{$forum_id}/{$uid}"
data-uid="{$uid}">
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
</a>
</header>
<figure class="photo-mask mb-0 {$has_featured_img}" data-toggle="page"
data-target="#page-bbs-view"
data-start="#page-bbs-list"
data-bid="{$bid}"
data-cat="{$cat}"
data-uid="{$uid}"
data-url="/{$bid}/{$uid}"
data-avatar="{$avatar}"
data-mbruid="{$mbruid}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-subject="{$subject}"
data-title="{$bname}">
<span class="embed-responsive embed-responsive-16by9"><img class="card-img-top img-fluid" src="{$featured_img_lg}" alt="" data-role="featured_img"></span>
</figure>
<div class="card-block p-3" data-toggle="page"
data-target="#page-bbs-view"
data-start="#page-bbs-list"
data-bid="{$bid}"
data-cat="{$cat}"
data-uid="{$uid}"
data-url="/{$bid}/{$uid}"
data-subject="{$subject}"
data-avatar="{$avatar}"
data-mbruid="{$mbruid}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-title="{$bname}">
<p class="card-text text-muted line-clamp-2">
{$subject}
</p>
</div>
<footer class="card-footer bg-white p-0">
<div class="nav nav-control border-0">
<a class="nav-link" role="button" data-toggle="page" style="max-width: 50%"
href="#page-bbs-opinion"
data-start="#page-bbs-list"
data-bid="{$bid}"
data-cat="{$cat}"
data-uid="{$uid}"
data-url="/{$bid}/{$uid}"
data-opinion="like"
data-subject="{$subject}"
data-title="좋아요한 사람">
좋아요
<span data-role="likes" class="badge badge-inverted ml-1">{$likes}</span>
</a>
<a class="nav-link" role="button" data-toggle="page"
href="#page-bbs-view"
data-start="#page-bbs-list"
data-bid="{$bid}"
data-cat="{$cat}"
data-uid="{$uid}"
data-url="/{$bid}/{$uid}"
data-move="comment"
data-subject="{$subject}"
data-avatar="{$avatar}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-title="{$bname}">
댓글
<span data-role="comment" class="badge badge-inverted ml-1">{$comment}{$oneline}</span>
</a>
</div>
</footer>
</div>

View File

@@ -0,0 +1,8 @@
<ul class="table-view my-0 border-bottom-0 d-none" data-role="toolbar">
<li class="table-view-cell table-view-active text-muted">
<i class="fa fa-folder-open-o fa-fw" aria-hidden="true"></i> <small>{$num}건</small>
</li>
</ul>
<div class="listMarkup-card" data-role="list-wrapper" data-page="{$page}">
{$items}
</div>

View File

@@ -0,0 +1,6 @@
<li class="table-view-cell">
<a data-act="category" data-cat="{$category}" data-text="{$category} 분류" data-bname="{$bname}">
<i class="fa fa-folder-o fa-fw" aria-hidden="true"></i> {$category}
<span class="badge badge-pill">{$num}</span>
</a>
</li>

View File

@@ -0,0 +1,7 @@
<li class="table-view-cell radio">
<label class="custom-control custom-radio">
<input name="category_radio" type="radio" value="{$category}" class="custom-control-input">
<span class="custom-control-indicator"></span>
<span class="custom-control-description">{$category}</span>
</label>
</li>

View File

@@ -0,0 +1,4 @@
<ul class="table-view bg-white border-top-0 mt-0">
<li class="table-view-divider bg-white f12 text-muted">{$label}</li>
{$items}
</ul>

View File

@@ -0,0 +1,28 @@
<div class="col-xs-4 embed-responsive-1by1">
<figure class="photo-mask photo-mask-dark mb-0" data-toggle="page" role="button" id="item-{$uid}"
data-target="#page-bbs-view"
data-start="#page-bbs-list"
data-bid="{$bid}"
data-cat="{$cat}"
data-uid="{$uid}"
data-url="/{$bid}/{$uid}"
data-subject="{$subject}"
data-mbruid="{$mbruid}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-avatar="{$avatar}"
data-title="{$bname}">
<span class="embed-responsive embed-responsive-1by1">
<span class="label active" style="left:0;top:0">{$category}</span>
<span class="label" style="right:0.3125rem;bottom:0.3125rem">{$upload_count}</span>
<span class="position-absolute rb-new {$new}" style="right:0.4375rem;top:0.4375rem"></span>
<small class="nic-name">{$name}</small>
<img class="card-img-top img-fluid" src="{$featured_img_1by1_300}" alt="" data-role="featured_img">
</span>
</figure>
</div>

View File

@@ -0,0 +1,11 @@
<ul class="table-view my-0 border-bottom-0 d-none" data-role="toolbar">
<li class="table-view-cell table-view-active text-muted">
<i class="fa fa-folder-open-o fa-fw" aria-hidden="true"></i> {$cat} {$keyword} <small>({$num}건)</small>
<a class="btn btn-secondary js-btn-href" data-act="reset" data-text="전체글 보기.."><i class="fa fa-history fa-lg fa-fw" aria-hidden="true"></i> 전체글</a>
</li>
</ul>
<div class="rb-photogrid mb-0">
<div class="row gutter-half listMarkup-gallery" data-role="list-wrapper" data-page="{$page}">
{$items}
</div>
</div>

View File

@@ -0,0 +1,19 @@
<li class="table-view-cell"
id="item-{$uid}"
data-toggle="page"
data-target="#page-bbs-view"
data-start="#page-bbs-list" data-uid="{$uid}"
data-subject="{$subject}"
data-cat="{$category}"
data-avatar="{$avatar}"
data-name="{$name}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-url="/{$r}/b/{$bid}/{$uid}"
data-title="{$bname}"
data-bid="{$bid}" data-uid="{$uid}">
<span class="line-clamp-1">{$subject}</span>
<span class="badge badge-primary badge-outline">공지</span>
</li>

View File

@@ -0,0 +1,9 @@
<li class="table-view-cell animated fadeIn">
<a data-toggle="page" href="#page-bbs-view" data-start="#page-bbs-list" data-uid="{$uid}" data-title="{$title}">
{$subject}
<p>
<span class="badge badge-default badge-inverted">{$name}</span>
<span class="badge badge-default badge-inverted">{$d_regis}</span>
</p>
</a>
</li>

View File

@@ -0,0 +1,3 @@
<ul class="table-view bg-white mb-0 border-top-0" data-role="list-wrapper">
{$items}
</ul>

View File

@@ -0,0 +1,7 @@
<div class="content-padded">
<div class="bg-faded py-5 mb-3 text-muted text-xs-center" role="alert">
<i class="fa fa-lock fa-lg fa-4x"></i><br> 비밀글<br><small>작성자와 운영자만 조회할 수 있습니다.</small>
</div>
<button type="button" class="btn btn-secondary btn-block" data-history="back">되돌아 가기</button>
</div>

View File

@@ -0,0 +1,40 @@
<li class="table-view-cell" id="item-{$uid}" data-plugin="markjs">
<a data-title="{$bname}"
data-toggle="page"
data-target="#page-bbs-view"
data-start="#page-bbs-list"
data-subject="{$subject}"
data-cat="{$category}"
data-avatar="{$avatar}"
data-name="{$name}"
data-mbruid="{$mbruid}"
data-hit="{$hit}"
data-comment="{$comment}"
data-likes="{$likes}"
data-dregis="{$d_regis}"
data-url="{$url}"
data-bid="{$bid}" data-uid="{$uid}" role="button">
<figure class="media-object pull-left bg-faded photo-mask mb-0">
<span class="embed-responsive embed-responsive-4by3">
<img class="border {$has_featured_img}" src="{$featured_img_sm}" width="90" data-role="featured_img">
</span>
</figure>
<div class="media-body">
<span class="line-clamp-2">
<span class="rb-new mr-1 {$new}"></span>
<span class="badge badge-default badge-inverted {$hidden}"><i class="fa fa-lock fa-lg"></i></span>
<span data-role="subject">{$subject}</span>
</span>
<p>
<small>{$name}</small>
<small class="ml-1">조회 {$hit}</small>
<small class="ml-1">댓글 {$comment}</small>
<small class="ml-1">추천 {$likes}</small>
<time class="small ml-1" {$timeago} datetime="{$d_regis_c}">{$d_regis}</time>
<small class="ml-1">{$category}</small>
<small class="{$notice}">공지</small>
<span class="badge badge-default badge-inverted">{$bbs}</span>
</p>
</div>
</a>
</li>

View File

@@ -0,0 +1,11 @@
<ul class="table-view table-view-full bg-white my-0 listMarkup-media border-top-0" data-role="list-wrapper" data-page="{$page}">
<li class="table-view-cell table-view-info text-muted d-none py-2" data-role="toolbar">
<a data-act="reset">
<i class="fa fa-folder-open-o fa-fw" aria-hidden="true"></i> <small>{$num}건</small>
</a>
</li>
{$items}
</ul>

View File

@@ -0,0 +1,14 @@
<div data-role="empty">
<div class="d-flex justify-content-center align-items-center text-muted" style="height:82vh">
<div class="text-xs-center" data-act="reset">
<i class="material-icons d-block" style="font-size:5rem">
chat_bubble_outline
</i>
<span class="badge badge-default badge-outline">{$cat}</span>
<span class="badge badge-default badge-outline">{$keyword}</span>
<p class="mt-3 mb-0">
게시물이 없습니다.
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<li class="table-view-cell w-100">
<a href="#sheet-member-profile" class=""
data-toggle="sheet"
data-mbruid="{$mbruid}"
data-avatar="{$avatar}"
data-nic="{$nic}">
<span class="badge badge-default badge-inverted"></span>
<div class="position-relative pull-left mr-2">
<img class="media-object border rounded-circle" src="{$avatar}" style="width:2.625rem" data-toggle="tooltip" title="{$nic}" role="button">
<i class="position-absolute fa fa-heart text-danger" aria-hidden="true" style="bottom:0;right:0"></i>
</div>
<div class="media-body">
{$nic}
<p><time data-plugin="timeago" class="small">{$d_regis}</time></p>
</div>
</a>
</li>

View File

@@ -0,0 +1,13 @@
<div class="d-flex justify-content-center align-items-center" style="height:85vh">
<div class="py-5 mb-3 text-muted text-xs-center" role="alert">
<div class="d-block mb-3"><i class="fa fa-exclamation-circle fa-lg fa-4x"></i></div>
서비스 안내
<ul class="list-unstyled mt-3 small">
<li>요청하신 페이지는 권한이 있어야 접근하실 수 있습니다.</li>
<li>로그인하신 후에 이용하세요.</li>
<li>로그인을 하신 후에도 이 화면 출력되면<br>회원등급 권한이 없는 경우입니다.</li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<div class="d-flex justify-content-center align-items-center" style="height:85vh">
<div class="py-5 mb-3 text-muted text-xs-center" role="alert">
<div class="d-block mb-3"><i class="fa fa-exclamation-circle fa-lg fa-4x"></i></div>
포인트 체크
<ul class="list-unstyled mt-3 small">
<li>포인트 체크</li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,67 @@
<article class="content-padded">
<div data-role="article-body">
{$article}
</div>
</article>
<div class="tag content-padded mt-4" data-role="tags">
{$tag}
</div>
<div class="text-xs-center mb-4">
<button type="button" class="btn btn-outline-secondary btn-lg"
data-send="ajax"
data-toggle="opinion"
data-uid="{$uid}"
data-opinion="like"
data-effect="heartbeat"
data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw fa-lg" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-outline-secondary btn-lg"
data-send="ajax"
data-toggle="opinion"
data-uid="{$uid}"
data-opinion="dislike"
data-effect="heartbeat"
data-role="btn_post_dislike">
<i class="fa fa-thumbs-o-down fa-fw fa-lg" aria-hidden="true"></i>
<span data-role='dislikes_{$uid}' class="badge badge-inverted">{$dislikes}</span>
</button>
</div>
<div data-role="attach">
<!-- 비디오 -->
<div class="mb-3 hidden" data-role="attach-video">
</div>
<!-- 오디오 -->
<ul class="table-view table-view-full bg-white mb-3 hidden" data-role="attach-audio">
</ul>
<!-- 이미지 -->
<div class="card-group mb-3 hidden" data-role="attach-photo">
</div>
<!-- 기타파일 -->
<ul class="table-view table-view-full bg-white mb-3 hidden" data-role="attach-file">
</ul>
</div>
<ul class="table-view mb-0">
<li class="table-view-cell">
<a href="#page-bbs-opinion"
data-toggle="page"
data-start="#page-bbs-view"
data-bid="{$bid}"
data-opinion="like"
data-uid="{$uid}"
data-subject="{$subject}"
data-cat="{$category}"
class="navigate-right">
<span class="badge badge-default badge-inverted" data-role='likes_{$uid}'>{$likes}</span>
좋아요한 사람
</a>
</li>
</ul>

View File

@@ -0,0 +1,6 @@
<li class="table-view-cell">
<a class="navigate-right" href="#page-bbs-write-category" data-start="#page-bbs-write-main" data-toggle="page" data-bid="{$bid}">
<span class="badge badge-default badge-inverted" data-role="category"></span>
카테고리
</a>
</li>

View File

@@ -0,0 +1,6 @@
<li class="table-view-cell">
비밀글 <p><small class="text-muted">등록자와 관리자만 본 게시물을 조회할 수 있습니다.</small></p>
<div data-toggle="switch" class="switch" data-role="hidden">
<div class="switch-handle"></div>
</div>
</li>

View File

@@ -0,0 +1,6 @@
<li class="table-view-cell">
공지글 <p><small class="text-muted">공지글로 지정되면 목록 상단에 고정 됩니다.</small></p>
<div data-toggle="switch" class="switch" data-role="notice">
<div class="switch-handle"></div>
</div>
</li>

View File

@@ -0,0 +1,6 @@
<li class="table-view-cell">
<a class="navigate-right" href="#page-bbs-write-tag" data-start="#page-bbs-write-main" data-toggle="page">
태그
<div class="small text-muted" data-role="tag"></div>
</a>
</li>

View File

@@ -0,0 +1,820 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.5 모바일 기본형 게시판 테마 스크립트 (rc-default): component.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2018 redblock inc
* --------------------------------------------------------------------------
*/
var kakao_link_btn = $('#kakao-link-btn') //카카오톡 링크공유 버튼
var page_bbs_write_main = $('#page-bbs-write-main');
var page_bbs_write_category = $('#page-bbs-write-category');
var page_bbs_write_tag = $('#page-bbs-write-tag');
var page_bbs_list = $('#page-bbs-list');
var page_bbs_category = $('#page-bbs-category');
var page_bbs_result = $('#page-bbs-result');
var page_bbs_view = $('#page-bbs-view');
var modal_bbs_search = $('#modal-bbs-search');
var modal_bbs_write = $('#modal-bbs-write');
var modal_bbs_view = $('#modal-bbs-view');
var sheet_comment_write = $('#sheet-comment-write');
var popup_bbs_cancelCheck = $('#popup-bbs-cancelCheck');
var popup_comment_mypost = $('#popup-comment-mypost');
var popup_linkshare = $('#popup-link-share'); //링크공유 팝업
var popover_bbs_listMarkup = $('#popover-bbs-listMarkup');
var popover_bbs_view = $('#popover-bbs-view');
var editor_bbs;
var attach_file_saveDir = './files/bbs/';// 파일 업로드 폴더
var attach_module_theme = '_mobile/rc-post-file';// attach 모듈 테마
function overScrollEffect_bbs(page){
var page_startY = 0;
var page_endY = 0;
page.find('.content').on('touchstart',function(event){
page_startY = event.originalEvent.changedTouches[0].pageY;
});
page.find('.content').on('touchmove',function(event){
var page_moveY = event.originalEvent.changedTouches[0].pageY;
var page_contentY = $(this).scrollTop();
if (page_contentY === 0 && page_moveY > page_startY && !document.body.classList.contains('refreshing')) {
if (page_moveY-page_startY>50) {
edgeEffect(page,'top','show'); // 스크롤 상단 끝
}
}
if( (page_moveY < page_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (page_startY-page_moveY>50) {
edgeEffect(page,'bottom','show'); // 스크롤 하단 끝
}
}
});
}
function pullToRefresh_bbs(page){
var bid = page.attr('data-bid');
page.find('.content').on('touchstart',function(event){
page_startY = event.originalEvent.changedTouches[0].pageY;
});
page.find('.content').on('touchend',function(event){
var page_endY=event.originalEvent.changedTouches[0].pageY;
var page_contentY = $(this).scrollTop();
if (page_contentY === 0 && page_endY > page_startY ) {
if (page_endY-page_startY>150) {
resetBbsContent(page);
getBbsList(bid,'','','#page-bbs-list');
}
}
})
}
function resetBbsContent(page){
page.find('.content').empty();
var content_html = page.find('.content').clone();
page.find('.content').infinitescroll('destroy');
page.append(content_html);
page.find('[data-role="post"]').loader({ position: 'inside' });
activeBbsTab('list');
}
function activeBbsTab(item){
$('#page-bbs-list').find('.bar-tab .tab-item').removeClass('active');
$('#page-bbs-list').find('.bar-tab [data-role="'+item+'"]').addClass('active');
}
var p = page_bbs_list.find('[data-role="list-wrapper"]').attr('data-page');
page_bbs_list.on('show.rc.page', function (e) {
var button = $(e.relatedTarget);
var bid = button.attr('data-bid');
var page = $(this)
page.find('[data-toggle="popover"]').attr('data-bid',bid);
getBbsList(bid,'','','#page-bbs-list');
})
page_bbs_list.on('hidden.rc.page', function (e) {
var page = $(this);
page.find('[data-toggle="popover"]').removeAttr('data-bid');
resetBbsContent(page_bbs_list);
})
page_bbs_result.on('hidden.rc.page', function (e) {
var page = $(this);
page.find('[data-role="bname"]').text('');
page.find('[data-role="bbs-list"]').html('');
})
popover_bbs_listMarkup.find('[data-toggle="listMarkup"]').tap(function() {
var button = $(this)
var markup = button.attr('data-markup');
var bid = button.attr('data-bid');
history.back() // popover 닫기
localStorage.setItem('bbs-'+bid+'-listMarkup', markup);
resetBbsContent(page_bbs_list);
getBbsList(bid,'','','#page-bbs-list');
});
page_bbs_category.on('show.rc.page', function (e) {
var button = $(e.relatedTarget);
var bid = button.attr('data-bid');
var page = $(this)
page.attr('data-bid',bid);
setTimeout(function(){
page.find('.content').loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_categoryList',{
bid : bid,
},function(response){
var result = $.parseJSON(response);
var list=result.list;
page.find('.content').html(list)
})
}, 200);
})
page_bbs_category.on('hidden.rc.page', function (e) {
var page = $(this);
page.find('.content').html('');
})
page_bbs_category.on('click','[data-act="category"]',function(){
var bid = page_bbs_category.attr('data-bid');
var category = $(this).attr("data-cat");
var bname = $(this).attr("data-bname");
setTimeout(function(){
page_bbs_result.find('[data-role="bname"]').text(bname);
page_bbs_result.page({ start: '#page-bbs-category',title: category });
page_bbs_result.find('[data-role="bbs-list"]').loader({ position: 'inside' });
setTimeout(function(){
getBbsList(bid,category,'','#page-bbs-result');
}, 200);
}, 10);
});
page_bbs_view.on('click','[data-act="category"]',function(){
var category = $(this).attr("data-cat");
var bname = $(this).attr("data-bname");
var bid = page_bbs_view.find('[name="bid"]').val();
var start = page_bbs_view.attr('data-start');
getBbsList(bid,category,'','#page-bbs-result');
history.back(); //이전 페이지 이동
setTimeout(function(){
page_bbs_result.find('[data-role="bname"]').text(bname);
page_bbs_result.page({ start: start,title: category });
}, 300);
});
page_bbs_view.on('click','[data-act="tag"]',function(){
var tag = $(this).attr("data-tag");
var bname = $(this).attr("data-bname");
var bid = page_bbs_view.find('[name="bid"]').val();
var start = page_bbs_view.attr('data-start');
getBbsList(bid,'',tag+';tag','#page-bbs-result');
history.back(); //이전 페이지 이동
setTimeout(function(){
page_bbs_result.find('[data-role="bname"]').text(bname);
page_bbs_result.page({ start: start,title: '# '+tag });
}, 300);
});
modal_bbs_search.find('[data-role="search"]').submit(function(e){
e.preventDefault();
var form = $(this);
var bid = form.attr('data-bid');
var bname = form.attr('data-bname');
var keyword = form.find('[name="keyword"]').val();
var where = form.find('[name="where"]').val();
var search = keyword+';'+where;
history.back(); // 모달 닫기
form.find('[name="keyword"]').blur().val(''); //가상 키보드 내리기
setTimeout(function(){
page_bbs_result.find('[data-role="bname"]').text(bname);
page_bbs_result.page({ start: '#page-bbs-list',title: keyword+' 검색결과' });
page_bbs_result.find('[data-role="bbs-list"]').loader({ position: 'inside' });
setTimeout(function(){
getBbsList(bid,'',search,'#page-bbs-result');
}, 200);
}, 10);
});
$(document).on('tap','[data-act="reset"]',function() {
var bid = page_bbs_list.attr('data-bid');
resetBbsContent(page_bbs_list);
getBbsList(bid,'','','#page-bbs-list');
});
page_bbs_list.find('.content').on( 'scroll', function(){
var page = $(this);
var pos =$(this).scrollTop();
});
$('[data-act="opinion"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
// Popover : 리스트 마크업 목록
popover_bbs_listMarkup.on('show.rc.popover', function (e) {
var button = $(e.relatedTarget)
var bid = button.attr('data-bid')
$(this).find('.table-view-cell').attr('data-bid',bid)
var popover = $(this)
var _local_listMarkup = localStorage.getItem('bbs-'+bid+'-listMarkup');
var local_listMarkup = _local_listMarkup?_local_listMarkup:'media';
popover.find('[data-toggle="listMarkup"]').removeClass('table-view-info');
popover.find('[data-toggle="listMarkup"][data-markup="'+local_listMarkup+'"]').addClass('table-view-info');
})
// Popover : 게시물 관리
popover_bbs_view.on('show.rc.popover', function (e) {
var button = $(e.relatedTarget)
var bid = button.attr('data-bid');
var uid = button.attr('data-uid');
$(this).find('.table-view-cell').attr('data-bid',bid).attr('data-uid',uid)
var subject = button.attr('data-subject')
var popover = $(this)
var origin = $(location).attr('origin');
var path = button.attr('data-url')?button.attr('data-url'):'';
popover.find('[data-toggle="linkCopy"]').attr('data-clipboard-text',origin+path)
popover.find('[data-toggle="linkShare"]').attr('data-subject',subject).attr('data-url',origin+path)
})
modal_bbs_search.on('shown.rc.modal', function (e) {
var button = $(e.relatedTarget)
var bid = button.attr('data-bid');
var bname = button.attr('data-title');
var modal = $(this);
modal.find('form').attr('data-bid',bid).attr('data-bname',bname);;
setTimeout(function(){ modal.find('[name="keyword"]').focus(); }, 100);
});
modal_bbs_search.on('hidden.rc.modal', function (e) {
var modal = $(this);
modal.find('form').attr('data-bid','').attr('data-name','');
modal.find('[name="keyword"]').blur().val('');
});
//글쓰기 모달이 열릴때
modal_bbs_write.on('shown.rc.modal', function (e) {
var button = $(e.relatedTarget)
var modal = $(this);
var uid = modal.find('[name="uid"]').val();
var subject = page_bbs_view.find('[data-role="subject"]').text();
if (uid) var bid = modal.find('[name="bid"]').val();
else var bid = button.attr('data-bid');
modal.find('[data-act="submit"]').attr('disabled', false);
modal.find('[data-role="loader"]').removeClass('d-none') //로더 제거
modal.find('form').addClass('d-none')
modal.find('[data-act="submit"]').addClass('d-none');
if (bid) modal.find('[name="bid"]').val(bid);
setTimeout(function(){
// 글쓰기 권한 체크
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=check_permWrite',{
bid : bid
},function(response){
var result = $.parseJSON(response);
var main=result.main;
var pcode=result.pcode;
var isperm =result.isperm;
if (!isperm) {
history.back();
setTimeout(function(){
$.notify({message: '작성권한이 없습니다.'},{type: 'default'});
}, 300);
//modal.find('.page .content').html(main);
return false
} else {
modal.find('[name="pcode"]').val(pcode);
modal.find('[data-toggle="collapse"]').addClass('collapsed');
modal.find('.collapse').removeClass('in');
// 미디어셋 초기화
modal.find('[data-role="attach-files"]').RbUploadFile(bbs_upload_settings); // 아작스 폼+input=file 엘리먼트 세팅
modal.find('[data-role="attach-files"]').RbAttachTheme(bbs_attach_settings);
modal.find('[data-sortable="mediaset"]').sortable({
axis: 'y',
cancel: 'button',
delay: 250,
update: function( event, ui ) {
var attachfiles=modal.find('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
}
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=modifygid',{
attachfiles : new_upfiles
})
}
});
// 에디터 초기화
DecoupledEditor
.create( document.querySelector( '#modal-bbs-write [data-role="editor-body"]' ),{
placeholder: '본문 입력...',
toolbar: [ 'alignment:left','alignment:center','bulletedList','blockQuote','imageUpload','insertTable','undo'],
removePlugins: [ 'ImageToolbar', 'ImageCaption', 'ImageStyle',,'WordCount' ],
image: {},
language: 'ko',
extraPlugins: [rbUploadAdapterPlugin],
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
},
mediaEmbed: {
extraProviders: [
{
name: 'other',
url: /^([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)/
},
{
name: 'another',
url: /^([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)/
}
]
},
typing: {
transformations: {
include: [
'quotes',
'typography',
],
extra: [
// Add some custom transformations e.g. for emojis.
{ from: ':)', to: '🙂' },
{ from: ':+1:', to: '👍' },
{ from: ':tada:', to: '🎉' }
],
}
}
} )
.then( newEditor => {
console.log('editor_bbs init');
modal.find('[data-role="loader"]').addClass('d-none'); //로더 제거
modal.find('[data-act="submit"]').removeClass('d-none');
modal.find('form').removeClass('d-none');
editor_bbs = newEditor;
modal.find('.toolbar-container').html(editor_bbs.ui.view.toolbar.element)
editor_bbs.editing.view.document.on( 'change:isFocused', ( evt, name, value ) => {
if (value) {
console.log('editor_bbs focus');
modal.addClass('editor-focused');
} else {
console.log('editor_bbs blur');
modal.removeClass('editor-focused');
}
} );
if (uid) {
modal.find('[data-act="submit"] .not-loading').text('수정');
modal.find('[name="subject"]').val(subject);
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postData',{
bid : bid,
uid : uid,
mod : 'edit'
},function(response){
var result = $.parseJSON(response);
var content=result.content;
var category=result.category;
var notice=result.notice;
var hidden=result.hidden;
var tag=result.tag;
var adddata=result.adddata;
var featured_img=result.featured_img;
var attachNum=result.attachNum;
var attachFileTheme = result.theme_attachFile;
editor_bbs.setData(content);
modal.find('[name="category"]').val(category);
modal.find('[name="notice"]').val(notice);
modal.find('[name="hidden"]').val(hidden);
if (notice==1) modal.find('[data-role="notice"]').addClass('active');
else modal.find('[data-role="notice"]').removeClass('active');
if (hidden==1) modal.find('[data-role="hidden"]').addClass('active');
else modal.find('[data-role="hidden"]').removeClass('active');
if (category) {
page_bbs_write_main.find('[data-role="category"]').text(category);
} else {
page_bbs_write_main.find('[data-role="category"]').text('');
}
if (tag) {
modal.find('[name="tag"]').val(tag);
page_bbs_write_main.find('[data-role="tag"]').text(tag);
} else {
modal.find('[name="tag"]').val('');
page_bbs_write_main.find('[data-role="tag"]').text('');
}
if (attachNum) {
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=getAttachFileList',{
p_module : 'bbs',
uid : uid,
theme_file : attachFileTheme,
mod : 'upload'
},function(response){
var result = $.parseJSON(response);
var photo=result.photo;
var video=result.video;
var audio=result.audio;
var file=result.file;
var zip=result.zip;
var doc=result.doc;
modal.find('[name="featured_img"]').val(featured_img); // 대표이미지 셋팅
modal.find('[data-role="attach-preview-photo"]').html(photo);
modal.find('[data-role="attach-preview-video"]').html(video)
modal.find('[data-role="attach-preview-audio"]').html(audio)
modal.find('[data-role="attach-preview-file"]').html(file)
modal.find('[data-role="attachNum"]').text(attachNum)
});
} else {
modal.find('[data-role="attachNum"]').text('');
}
});
} else {
modal.find('[data-act="submit"] .not-loading').text('등록');
}
})
.catch( error => {
console.error( error );
} );
}
});
//부가항목 셋팅
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_writeMeta',{
bid : bid
},function(response){
var result = $.parseJSON(response);
var list=result.list;
var has_category = result.has_category;
modal.find('[data-role="bbs-meta"]').html(list)
//카테고리 불러오기
if (has_category) {
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_categoryList',{
mod: 'write',
bid : bid
},function(response){
var result = $.parseJSON(response);
var list=result.list;
var category = page_bbs_write_main.find('[data-role="category"]').text();
page_bbs_write_category.find('.content').html(list)
if (category) {
page_bbs_write_category.find('[name="category_radio"][value="'+category+'"]').prop('checked', true);
} else {
page_bbs_write_category.find('[name="category_radio"]').prop('checked', false);
}
})
}
// 비밀글 처리
modal.find('[data-role="hidden"]').on('changed.rc.switch', function () {
if ($(this).hasClass('active')) {
modal.find('[name="hidden"]').val(1)
} else {
modal.find('[name="hidden"]').val(0)
}
})
// 공지글 처리
modal.find('[data-role="notice"]').on('changed.rc.switch', function () {
if ($(this).hasClass('active')) {
modal.find('[name="notice"]').val(1)
} else {
modal.find('[name="notice"]').val(0)
}
})
})
}, 300);
})
//글쓰기 모달이 닫힐때
modal_bbs_write.on('hidden.rc.modal', function (e) {
var submitting = false;
var modal = modal_bbs_write;
if(modal.find('[data-act="submit"]').is(":disabled")) var submitting = true;
modal.find('[name="uid"]').val(''); // uid 초기화
modal.find('[name="pcode"]').val(''); // pcode 초기화
modal.find('[data-role="attach-files"]').html(''); // 첨부요소 destroy
modal.find('.ajax-file-upload-container').remove(); // 첨부요소 destroy
if (modal.find('.ck-editor__editable').length) {
var subject = modal.find('[name="subject"]').val();
var content = editor_bbs.getData();
editor_bbs.destroy(); //에디터 제거
console.log('editor_bbs.destroy');
if (!submitting && (content || subject)) {
setTimeout(function(){
popup_bbs_cancelCheck.popup({
backdrop: 'static'
}); // 글쓰기 취소확인 팝업 호출
}, 200);
}
}
})
// 글 등록
modal_bbs_write.find('[data-act="submit"]').click(function(event){
var modal = modal_bbs_write;
var bid = modal.find('[name="bid"]').val();
var uid = modal.find('[name="uid"]').val();
var theme = modal.find('[name="theme"]').val();
var notice = modal.find('[name="notice"]').val();
var hidden = modal.find('[name="hidden"]').val();
var category = modal.find('[name="category"]').val();
var tag = modal.find('[name="tag"]').val();
var backtype = modal.find('[name="backtype"]').val();
var nlist = modal.find('[name="nlist"]').val();
var pcode = modal.find('[name="pcode"]').val();
var upfiles = modal.find('[name="upfiles"]').val('');
var _markup = localStorage.getItem('bbs-'+bid+'-listMarkup');
var markup = _markup?_markup:'media'
if (!memberid) {
var name_el = modal.find('[name="name"]');
var name = name_el.val();
var pw_el = modal.find('[name="pw"]');
var pw = pw_el.val();
}
var subject_el = modal.find('[name="subject"]');
var subject = subject_el.val();
var editorData = editor_bbs.getData();
if (!subject_el.val()) {
subject_el.focus()
setTimeout(function(){$.notify({message: '제목을 입력해 주세요.'},{type: 'default'})}, 450);
return false;
}
if (editorData == '') {
editor_bbs.editing.view.focus();
setTimeout(function(){$.notify({message: '본문을 입력해 주세요.'},{type: 'default'})}, 450);
return false;
}
if (notice && hidden) {
if (notice == 1 && hidden == 1)
{
$.notify({message: '공지글은 비밀글로 등록할 수 없습니다.'},{type: 'default'});
return false;
}
}
if (category && category == '')
{
$.notify({message: '카테고리를 선택해 주세요.'},{type: 'default'});
page_bbs_write_category.page({ start: '#page-bbs-write-main' });
return false;
}
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = $('#modal-bbs-write').find('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = featured_img_input.val();
if(!featured_img_uid){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = $('#modal-bbs-write').find('[data-role="attach-preview-photo"] li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = first_attach_img_li.attr('data-id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('#modal-bbs-write').find('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('#modal-bbs-write').find('input[name="upfiles"]').val(new_upfiles);
}
var upfiles = modal.find('[name="upfiles"]').val();
var featured_img = modal.find('[name="featured_img"]').val();
$(this).attr("disabled",true);
if($('[data-role="bbs-list"] [data-role="post"] [data-role="list-wrapper"]').length > 0) var list_wrapper = 1;
else var list_wrapper = 0;
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=write',{
bid : bid,
uid : uid,
theme : theme,
name : name,
subject : subject,
content : editorData,
notice : notice,
hidden : hidden,
category : category,
tag : tag,
upfiles : upfiles,
featured_img : featured_img,
backtype : backtype,
pcode : pcode,
markup : markup,
list_wrapper: list_wrapper
},function(response){
var result = $.parseJSON(response);
var error = result.error;
var item = result.item;
var notice = result.notice;
var _uid = result.uid;
var subject = result.subject;
var content = result.content;
if (!error) {
history.back(); // 게시판 글쓰기 모달 닫기
setTimeout(function(){
if (!uid) {
$('[data-role="bbs-list"]').find('[data-role="empty"]').addClass('d-none');
$('[data-role="bbs-list"]').find('.content').animate({scrollTop : 0}, 100);
if (list_wrapper) {
if (notice==1) $('[data-role="bbs-list"] [data-role="notice"] [data-role="list-wrapper"]').prepend(item);
else $('[data-role="bbs-list"] [data-role="post"] [data-role="list-wrapper"]').prepend(item);
} else {
if (notice==1) $('[data-role="bbs-list"] [data-role="notice"]').prepend(item);
else $('[data-role="bbs-list"] [data-role="post"]').prepend(item);
}
$('[data-role="bbs-list"]').find('#item-'+_uid).addClass('animated fadeInDown').attr('tabindex','-1').focus();
} else {
// 게시물 수정일 경우
$('[data-role="bbs-view"]').find('[data-role="subject"]').text(subject);
$('[data-role="bbs-view"]').find('[data-role="article-body"]').html(content);
$('[data-role="bbs-list"]').find('#item-'+uid+' a').removeAttr('data-subject').attr('data-subject',subject);
$('[data-role="bbs-list"]').find('#item-'+uid+' [data-role="subject"]').text(subject);
$('[data-role="bbs-list"]').find('#item-'+uid).attr('tabindex','-1').focus();
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postData',{
bid : bid,
uid : uid,
mod : 'view'
},function(response){
var result = $.parseJSON(response);
var featured_img=result.featured_img;
var adddata=result.adddata;
var photo=result.photo;
var video=result.video;
var audio=result.audio;
var file=result.file;
var hidden=result.hidden;
$('[data-role="bbs-list"]').find('#item-'+uid+' [data-role="featured_img"]').attr('src',featured_img); //대표이미지 갱신
if (photo) { // 첨부 이미지가 있을 경우
$('[data-role="bbs-view"]').find('[data-role="attach-photo"]').removeClass('hidden').html(photo)
}
if (video) { // 첨부 비디오가 있을 경우
$('[data-role="bbs-view"]').find('[data-role="attach-video"]').removeClass('hidden').html(video)
$('[data-role="bbs-view"]').find('.mejs__overlay-button').css('margin','0') //mejs-player 플레이버튼 위치재조정
}
if (audio) { // 첨부 오디오가 있을 경우
$('[data-role="bbs-view"]').find('[data-role="attach-audio"]').removeClass('hidden').html(audio)
}
if (file) { // 첨부 기타파일이 있을 경우
$('[data-role="bbs-view"]').find('[data-role="attach-file"]').removeClass('hidden').html(file)
}
});
}
//글쓰기 모달 상태 초기화
$(this).attr('disabled', false); //글쓰기 전성버튼 상태 초기화
modal_bbs_write.find('[name="bid"]').val('');
modal_bbs_write.find('[name="subject"]').val(''); //제목 입력내용 초기화
modal_bbs_write.find('[name="featured_img"]').val(''); //대표이미지 입력내용 초기화
modal_bbs_write.find('[name="upfiles"]').val(''); //첨부파일 입력내용 초기화
modal_bbs_write.find('[name="notice"]').val(''); // 공지글 설정
modal_bbs_write.find('[name="hidden"]').val(''); // 비밀글 설정
modal_bbs_write.find('[data-role="editor-body"]').empty(); //본문내용 초기화
modal_bbs_write.find('[data-role="tap-attach"] .badge').text(''); //첨부수량 초기화
modal_bbs_write.find('[data-role="attach-preview-photo"]').html(''); //첨부사진 영역 초기화
modal_bbs_write.find('[data-role="attach-preview-video"]').html('');
modal_bbs_write.find('[data-role="attach-preview-audio"]').html('');
modal_bbs_write.find('[data-role="attach-preview-file"]').html('');
modal_bbs_write.find('[data-role="attach-files"]').html('');
modal_bbs_write.find('[data-role="bbs-meta"]').html('');
}, 600);
}
});
}, 300);
});
// 글쓰기 취소확인 처리
popup_bbs_cancelCheck.find('[data-toggle="cancelCheck"]').tap(function(event) {
event.preventDefault();
event.stopPropagation();
var value = $(this).attr('data-value');
if (value=='no') {
history.back();
setTimeout(function(){ modal_bbs_write.modal('show'); }, 10);
} else {
history.back();
modal_bbs_write.find('[name="bid"]').val('');
modal_bbs_write.find('[name="subject"]').val('') //제목 입력내용 초기화
modal_bbs_write.find('[name="featured_img"]').val('') //대표이미지 입력내용 초기화
modal_bbs_write.find('[name="hidden"]').val('') // 비밀글 설정 초기화
modal_bbs_write.find('[name="notice"]').val('') // 공지글 설정 초기화
modal_bbs_write.find('[name="category"]').val('') // 카테고리 설정 초기화
modal_bbs_write.find('[data-role="category"]').text('') // 카테고리 설정 초기화
modal_bbs_write.find('[name="tag"]').val('') // 태그 설정 초기화
modal_bbs_write.find('[data-role="tag"]').text('') // 태그 설정 초기화
modal_bbs_write.find('[name="upfiles"]').val('') //첨부파일 입력내용 초기화
modal_bbs_write.find('[data-role="editor-body"]').empty() //본문내용 초기화
modal_bbs_write.find('[data-role="attach-preview-photo"]').html(''); //첨부사진 영역 초기화
modal_bbs_write.find('[data-role="attach-preview-video"]').html('');
modal_bbs_write.find('[data-role="attach-preview-audio"]').html('');
modal_bbs_write.find('[data-role="attach-preview-file"]').html('');
modal_bbs_write.find('[data-role="attach-files"]').html('');
modal_bbs_write.find('[data-role="attachNum"]').text('');
modal_bbs_write.find('[data-role="bbs-meta"]').html('');
modal_bbs_write.find('[data-toggle="switch"]').removeClass('active');
page_bbs_write_category.find('[name="category_radio"]').prop('checked', false);
console.log('입력사항 초기화');
}
});
popup_comment_mypost.on('show.rc.popup', function (e) {
var button = $(e.relatedTarget);
var uid = button.attr('data-uid');
var type = button.attr('data-type');
var parent = button.attr('data-parent');
var notice = button.closest('[data-role="'+type+'-item"]').attr('data-notice');
var hidden = button.closest('[data-role="'+type+'-item"]').attr('data-hidden');
var popup = $(this);
popup.find('[data-role="comment"]').removeClass('d-none');
if (type=='oneline') popup.find('[data-role="comment"]').addClass('d-none');
if (notice=="true") popup.find('[data-kcact="notice"] span').text('해제')
else popup.find('[data-kcact="notice"] span').text('')
if (hidden=="true") popup.find('[data-act="edit"]').attr('data-hidden','true');
else popup.find('[data-act="edit"]').attr('data-hidden','false');
popup.find('.table-view-cell a').attr('data-uid',uid);
popup.find('.table-view-cell a').attr('data-type',type)
})
// 카테고리 항목 클릭에 글쓰기폼의 name="category" 에 값 적용하기
page_bbs_write_category.on('click','[type="radio"]',function(){
var radio_val = $(this).val()
modal_bbs_write.find('[name="category"]').val(radio_val);
modal_bbs_write.find('[data-role="category"]').text(radio_val)
});
// 태그 페이지가 닫힐때 태그폼의 내용을 추출하여 글쓰기폼의 name="tag" 에 값 적용하기
page_bbs_write_tag.on('shown.rc.page', function () {
var tag = $('#page-bbs-write-tag').find('[name="tag"]')
setTimeout(function(){ tag.focus() }, 300);
})
page_bbs_write_tag.on('hidden.rc.page', function () {
var tag_input = $('#page-bbs-write-tag').find('[name="tag"]');
var tag = tag_input.val()
tag_input.blur();
modal_bbs_write.find('[name="tag"]').val(tag);
page_bbs_write_main.find('[data-role="tag"]').text(tag);
})

View File

@@ -0,0 +1,157 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.5 모바일 기본형 게시판 테마 스크립트 (rc-default): list.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2019 redblock inc
* --------------------------------------------------------------------------
*/
function getBbsList(bid,cat,search,page){
var _markup = localStorage.getItem('bbs-'+bid+'-listMarkup');
var markup = _markup?_markup:'media';
var markup_list=markup+'-list'; // 목록 마크업
var markup_item=markup+'-item'; // 아이템 마크업
var page = $(page);
var container = page.find('[data-role="bbs-list"]');
if (search) {
var search = search.split(";");
var keyword = search[0];
var where = search[1] ;
} else {
var keyword = '';
var where = '';
}
page.attr('data-bid',bid);
page.find('[data-role="bar-tab"]').remove();
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_listData',{
bid : bid,
},function(response){
var result = $.parseJSON(response);
var error=result.error;
var theme=result.theme;
var theme_css = '/modules/bbs/themes/'+theme+'/_main.css';
var recnum=result.recnum;
var totalPage = result.TPG;
var totalNUM = result.NUM;
var sort=result.sort;
var orderby=result.orderby;
var bar_tab=result.bar_tab;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
if (error) {
history.back();
setTimeout(function(){ $.notify({message: error},{type: 'default'}) }, 500);
} else {
page.find('[data-role="bar-nav"]').after(bar_tab);
if (!$('link[href="'+theme_css+'"]').length)
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: theme_css
}).appendTo('head');
container.empty();
container.append('<div data-role="notice" class="d-none"></div><div data-role="post"></div>');
container.find('[data-role="post"]').loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postList',{
bid : bid,
sort: sort,
orderby: orderby,
recnum: recnum,
markup_list : markup_list,
markup_item : markup_item,
keyword : keyword,
where : where,
cat : cat,
p : 1
},function(response){
var result = $.parseJSON(response);
var error=result.error;
var list=result.list;
if (error) {
history.back();
setTimeout(function(){ $.notify({message: '다시 시도해 주세요.'},{type: 'default'}) }, 500);
} else {
var num=result.num;
var num_notice=result.num_notice;
var list_post=result.list_post;
var list_notice=result.list_notice;
// 상태 초기화
container.find('[data-role="post"]').html('');
container.find('[data-role="notice"]').html('');
container.find('[data-role="post"]').html(list_post);
container.find('[data-role="notice"]').html(list_notice);
container.find('[data-plugin="timeago"]').timeago();
container.find('[data-plugin="markjs"]').mark(keyword); // marks.js
container.find('[data-role="notice"]').removeClass('d-none');
if (cat || keyword) {
container.find('[data-role="post"] [data-role="toolbar"]').removeClass('d-none');
container.find('[data-role="notice"]').addClass('d-none');
container.find('[data-start]').attr('data-start','#page-bbs-result');
if (!num) {
container.find('[data-role="empty"] [type="button"]').removeClass('d-none');
}
}
overScrollEffect_bbs(page_bbs_list)
pullToRefresh_bbs(page_bbs_list)
//무한 스크롤
container.infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postList',{
bid : bid,
sort: sort,
orderby: orderby,
recnum: recnum,
markup_list : markup_list,
markup_item : markup_item,
keyword : keyword,
where : where,
cat : cat,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list_post;
var page=result.page;
if(error) alert(result.error_comment);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
container.find('[data-role="list-wrapper"]').attr('data-page',page);
container.find('[data-plugin="timeago"]').timeago();
//container.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : container.find('[data-role="post"] [data-role="list-wrapper"]'),
percentage : 75, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
}
});
}
})
}, 100);
};

View File

@@ -0,0 +1,703 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.5 모바일 기본형 게시판 테마 스크립트 (rc-default): view.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2019 redblock inc
* --------------------------------------------------------------------------
*/
function getBbsView(settings){
var type=settings.type; //컴포넌트 타입
var mid=settings.mid; // 컴포넌트 아이디
var ctheme=settings.ctheme; // 댓글테마
var landing = settings.landing;
var page = $('[data-role="bbs-view"]')
var sheet_comment_write = $('#sheet-comment-write') // 댓글 작성 sheet
var page_bbs_photo = $('#page-bbs-photo'); // 샤진 크게보기 페이지
var page_bbs_opinion = $('#page-bbs-opinion');
var popup_linkshare = $('#popup-link-share') //링크공유 팝업
var kakao_link_btn = $('#kakao-link-btn') //카카오톡 링크공유 버튼
var popover_bbs_view = $('#popover-bbs-view') // 게시물 관리 팝오버
// 게시물보기 모달이 보여질때 : 게시물 본문영역 셋팅
$(mid).on('show.rc.'+type, function(event) {
var ele = $(event.relatedTarget) // 모달을 호출한 아이템 정의
var start = $(ele).attr('data-start')?$(ele).attr('data-start'):''; // 시작페이지
var bid = $(ele).attr('data-bid')?$(ele).attr('data-bid'):''; // 게시판 아이디
var uid = $(ele).attr('data-uid')?$(ele).attr('data-uid'):''; // 대상 PK
var subject = $(ele).attr('data-subject')?$(ele).attr('data-subject'):''; // 제목
var cat = $(ele).attr('data-cat')?$(ele).attr('data-cat'):''; // 카테고리
var url = $(ele).attr('data-url')?$(ele).attr('data-url'):''; // url
var name = $(ele).attr('data-name')?$(ele).attr('data-name'):''; // name
var mbruid = $(ele).attr('data-mbruid')?$(ele).attr('data-mbruid'):''; // 작성자 회원 고유번호
var mbrid = $(ele).attr('data-mbrid')?$(ele).attr('data-mbrid'):''; // 작성자 회원아이디
var avatar = $(ele).attr('data-avatar')?$(ele).attr('data-avatar'):''; // avatar
var comment = $(ele).attr('data-comment')?$(ele).attr('data-comment'):''; // comment
var hit = $(ele).attr('data-hit')?$(ele).attr('data-hit'):''; // hit
var likes = $(ele).attr('data-likes')?$(ele).attr('data-likes'):''; // likes
var d_regis = $(ele).attr('data-dregis')?$(ele).attr('data-dregis'):''; // d_regis
var markup = $(ele).attr('data-markup')?$(ele).attr('data-markup'):''; // 마크업
var item = ele.closest('.table-view-cell')
var move = ele.attr('data-move');
item.attr('tabindex','-1').focus(); // 모달을 호출한 아이템을 포커싱 처리함 (css로 배경색 적용)
var modal = $(this);
if (start) page.attr('data-start',start);
page.find('[name="uid"]').val(uid);
page.find('[name="bid"]').val(bid);
page.find('[data-role="cat"]').text(cat).attr('data-cat',cat);
page.find('[data-role="name"]').text(name);
page.find('[data-role="total_comment"]').text(comment);
page.find('[data-target="#page-member-profile"]').attr('data-mbruid',mbruid).attr('data-url','/@'+mbrid);
page.find('[data-toggle="sheet"][data-avatar]').attr('data-nic',name).attr('data-avatar',avatar).attr('data-mbruid',mbruid);
page.find('[data-role="avatar"]').attr('src',avatar);
page.find('[data-role="hit"]').text(hit);
page.find('[data-role="likes"]').text(likes);
page.find('[data-role="likes"]').text(likes);
page.find('[data-role="d_regis"]').text(d_regis);
page.find('.bar-nav [data-role="toolbar"]').attr('data-uid',uid);
page.find('[data-role="article"]').loader({ // 로더 출력
position: "inside"
});
if (landing) {
page.find('[data-role="hback"]').addClass('d-none');
page.find('[data-role="gohome"]').removeClass('d-none');
} else {
page.find('[data-role="hback"]').removeClass('d-none');
page.find('[data-role="gohome"]').addClass('d-none');
}
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postData',{
bid : bid,
uid : uid,
markup_file : markup,
mod : 'view'
},function(response){
modal.find('[data-role="article"]').loader("hide");
var result = $.parseJSON(response);
var _uid=result.uid;
var article=result.article;
var featured_img = result.featured_img;
var adddata=result.adddata;
var attachNum = result.attachNum;
var attachFileTheme = result.theme_attachFile;
var hidden=result.hidden;
var hidden_attach=result.hidden_attach;
var mypost=result.mypost;
var bname=result.bname;
var is_post_liked=result.is_post_liked;
var is_post_disliked=result.is_post_disliked;
var is_post_tag=result.is_post_tag;
var bbs_c_hidden=result.bbs_c_hidden; // 댓글 사용여부
var theme=result.theme;
var theme_css = '/modules/bbs/themes/'+theme+'/_main.css';
var theme_use_reply=result.theme_use_reply;
var theme_show_tag=result.theme_show_tag;
var theme_show_upfile=result.theme_show_upfile;
var theme_show_like=result.theme_show_like;
var theme_show_dislike=result.theme_show_dislike;
var theme_show_share=result.theme_show_share;
if (!_uid) {
history.back();
setTimeout(function(){
$.notify({message: '존재하지 않는 게시물 입니다.'},{type: 'default'});
$('[data-role="bbs-list"]').find('#item-'+uid).slideUp();
}, 600);
}
if (!$('link[href="'+theme_css+'"]').length)
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: theme_css
}).appendTo('head');
page.find('[data-role="linkShare"]').attr('data-subject',subject).attr('data-image',featured_img).attr('data-url',url);
page.find('[data-role="article"]').html(article);
page.find('[data-act="category"]').attr('data-bname',bname);
page.find('[data-act="tag"]').attr('data-bname',bname);
Iframely('[data-role="article"] oembed[url]') // oembed 미디어 변환
page.find('[data-role="linkShare"]').attr('data-url',url);
page.find('.bar-nav [data-toggle="popover"]').attr('data-url',url).attr('data-bid',bid).attr('data-uid',uid);
if (is_post_liked) {
modal.find('[data-role="btn_post_like"]').addClass('active');
page_bbs_opinion.find('[data-role="btn_post_like"]').addClass('active');
}
if (is_post_disliked) {
modal.find('[data-role="btn_post_dislike"]').addClass('active');
page_bbs_opinion.find('[data-role="btn_post_dislike"]').addClass('active')
}
if (bbs_c_hidden) {
page.find('[data-role="btn_comment"]').remove() // 좋아요 버튼 제거
}
if (theme_show_like==0) {
page.find('[data-role="btn_post_like"]').remove() // 좋아요 버튼 제거
}
if (theme_show_dislike==0) {
page.find('[data-role="btn_post_dislike"]').remove() // 싫어요 버튼 제거
}
if (theme_show_share==0) {
page.find('[data-role="linkShare"]').remove() // sns공유 버튼 제거
}
if (theme_show_tag==0 || !is_post_tag) {
page.find('[data-role="post_tags"]').remove() // 테그목록 제거
}
// 첨부파일이 있을 경우
if (attachNum) {
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=getAttachFileList',{
p_module : 'bbs',
uid : uid,
theme_file : attachFileTheme,
mod : 'view'
},function(response){
var result = $.parseJSON(response);
var photo=result.photo;
var photo_full=result.photo_full;
var video=result.video;
var audio=result.audio;
var file=result.file;
var zip=result.zip;
var doc=result.doc;
if (photo) { // 첨부 이미지가 있을 경우
page.find('[data-role="attach-photo"]').removeClass('hidden').html(photo)
i=0;
page.find('[data-role="attach-photo"] [data-toggle="page"]').each(function(i) {
$(this).attr('data-index',i);i=++i;
});
page_bbs_photo.find('.swiper-wrapper').html(photo_full)
}
if (video) { // 첨부 비디오가 있을 경우
page.find('[data-role="attach-video"]').removeClass('hidden').html(video)
}
if (audio) { // 첨부 오디오가 있을 경우
page.find('[data-role="attach-audio"]').removeClass('hidden').html(audio)
}
if (doc) { // 첨부 문서 있을 경우
page.find('[data-role="attach-file"]').removeClass('hidden').html(doc)
}
if (zip) { // 첨부 압축파일이 있을 경우
page.find('[data-role="attach-file"]').removeClass('hidden').html(zip)
}
if (file) { // 첨부 기타파일이 있을 경우
page.find('[data-role="attach-file"]').removeClass('hidden').html(file)
}
if (theme_show_upfile==0) {
page.find('[data-role="attach"]').remove() // 첨부목록 제거
}
});
}
// 댓글 출력 함수 정의
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
modal.find('[data-role="comment_box"]').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 5, // 출력갯수
commentPlaceHolder : '댓글을 입력해주세요.',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 200, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload'] // 툴바 항목
});
}
// 댓글 출력 함수 실행
var p_module = 'bbs';
var p_table = 'rb_bbs_data';
var p_uid = uid; // 게시물 고유번호 적용
var theme = ctheme;
var comment_theme_css = '/modules/comment/themes/'+ctheme+'/css/style.css';
if (!hidden && _uid) {
if (!$('link[href="'+comment_theme_css+'"]').length)
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: comment_theme_css
}).appendTo('head');
get_Rb_Comment(p_module,p_table,p_uid,theme);
}
//댓글영역 바로가기 일 경우,
if (move=='comment') {
setTimeout(function(){
var top = page.find('[data-role="comment-box"]').offset().top; // 타켓의 위치값
var bar_height = page.find('.bar-nav').height(); // bar-nav의 높이값
page.find('.content').animate({ scrollTop: (top-bar_height)-15 }, 100);
}, 200);
}
$('#popover-bbs-view').find('[data-role="toolbar"]').remove(); //popover 항목 초기화
if (memberid) { // 로그인 상태 일때
var item_memberid = '<li class="table-view-cell" data-toggle="postSaved" data-send="ajax" data-role="toolbar" data-history="back">저장하기</li>';
$('#popover-bbs-view').find('.table-view').prepend(item_memberid) // 수정,삭제 버튼을 추가함
}
if (mypost) { // 내글이 아니거나 관리자 일때
var items_mypost = '<li class="table-view-cell" data-toggle="postEdit" data-history="back" data-role="toolbar">수정하기</li><li class="table-view-cell" data-toggle="PostDelete" data-role="toolbar">삭제하기</li>';
$('#popover-bbs-view').find('.table-view').prepend(items_mypost) // 수정,삭제 버튼을 추가함
}
if (hidden || hidden_attach) { // 권한이 없거나 비밀글 이거나 첨부파일 권한이 없을 경우 일때
modal.find('[data-role="attach-photo"]').empty()
modal.find('[data-role="attach-video"]').empty()
modal.find('[data-role="attach-audio"]').empty()
modal.find('[data-role="attach-file"]').empty()
}
});
}, 300);
})
// 게시물보기 모달이 보여진 후에..
$(mid).on('shown.rc.'+type, function(event) {
var ele = $(event.relatedTarget) // element that triggered the modal
var uid = ele.data('uid') // 게시물 고유번호 추출
var modal = $(this);
});
//링크공유 버튼을 터치 할때
$(mid).on('tap','#btn-linkShare',function(){
if (navigator.share === undefined) { //webshare.api가 지원되지 않는 환경
popup_linkshare.popup('show')
} else {
var ele = $(this)
var sbj = ele.attr('data-subject')?ele.attr('data-subject'):'' // 버튼에서 제목 추출
var desc = ele.attr('data-desc')?ele.attr('data-desc'):'' // 버튼에서 요약설명 추출
var host = $(location).attr('origin');
var path = ele.attr('data-url')?ele.attr('data-url'):''
var link = host+path // 게시물 보기 URL
navigator.share({
title: sbj,
text: desc,
url: link,
})
.then(() => console.log('성공적으로 공유되었습니다.'))
.catch((error) => console.log('공유에러', error));
}
});
//좋아요,싫어요
$(document).on('tap','[data-toggle="opinion"]',function(){
var send = $(this).data('send')
var uid = $(this).data('uid')
var opinion = $(this).data('opinion')
var effect = $(this).data('effect')
var myid = $(this).data('myid')
var bid = $(mid).find('[name="bid"]').val()
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=opinion',{
send : send,
opinion : opinion,
uid : uid,
memberid : memberid,
bid : bid
},function(response){
var result = $.parseJSON(response);
var error=result.error;
var is_post_liked=result.is_post_liked;
var is__post_disliked=result.is_post_disliked;
var likes=result.likes;
var dislikes=result.dislikes;
var msg=result.msg;
if (!error) {
if (opinion=='like') {
if (is_post_liked) {
var msg = '좋아요가 취소 되었습니다.';
$('[data-role="btn_post_like"]').removeClass('active '+effect);
}
else {
var msg = '좋아요가 추가 되었습니다.';
$('[data-role="btn_post_like"]').addClass('active '+effect);
$('[data-role="btn_post_dislike"]').removeClass('active '+effect);
}
}
if (opinion=='dislike') {
if (is_post_disliked) {
var msg = '싫어요 취소 되었습니다.';
$('[data-role="btn_post_dislike"]').removeClass('active '+effect);
}
else {
var msg = '싫어요 추가 되었습니다.';
$('[data-role="btn_post_dislike"]').addClass('active '+effect)
$('[data-role="btn_post_like"]').removeClass('active '+effect)
}
}
$('[data-role="likes_'+uid+'"]').text(likes)
$('[data-role="dislikes_'+uid+'"]').text(dislikes)
}
$.notify({message: msg},{type: 'default'});
});
});
//게시물 링크저장(스크랩)
$(document).on('tap','[data-toggle="postSaved"]',function(){
var send = $(this).data('send')
var uid = $(this).data('uid')
if(!memberid){
$('#modal-login').modal() // 비로그인 일 경우 로그인 모달 호출
return false;
}
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=saved',{
send : send,
uid : uid
},function(response){
var result = $.parseJSON(response);
var error=result.error;
var is_post_saved=result.is_post_saved;
var msg=result.msg;
var msgType=result.msgType;
if (!error) {
if (is_post_saved) {
var msg = '게시물이 저장함에서 삭제되었습니다.';
var msgType = 'successs';
$('[data-role="btn_post_saved"]').removeClass('active');
}
else {
var msg = '게시물이 저장함에 추가되었습니다.';
var msgType = 'successs';
$('[data-role="btn_post_saved"]').addClass('active');
}
}
$.notify({message: msg},{type: 'success'});
});
});
//게시물보기 모달(페이지)이 닫혔을 때
$(mid).on('hidden.rc.'+type, function() {
var modal = $(this);
var uid = modal.find('[name="uid"]').val()
var list_parent = $('[data-role="bbs-list"]').find('#item-'+uid)
modal.find('.bar-nav [data-role="toolbar"]').removeAttr('data-uid')
list_parent.attr('tabindex','-1').focus(); // 모달을 호출한 아이템을 포커싱 처리함 (css로 배경색 적용)
modal.find('[name="uid"]').val('')
modal.find('[data-role="article"]').html(''); // 본문영역 내용 비우기
modal.find('[data-role="hback"]').removeClass('d-none');
modal.find('[data-role="gohome"]').addClass('d-none');
modal.find('[data-role="attach-photo"]').addClass('hidden').empty() // 사진 영역 초기화
modal.find('[data-role="attach-video"]').addClass('hidden').empty() // 비디오 영역 초기화
modal.find('[data-role="attach-audio"]').addClass('hidden').empty() // 오디오 영역 초기화
modal.find('[data-role="attach-file"]').addClass('hidden').empty() // 기타파일 영역 초기화
modal.find('[data-role="comment_box"]').html(''); // 댓글영역 내용 비우기
page_bbs_photo.find('.swiper-wrapper').html('') // 사진크게보기 영역 초기화
});
// 게시물 보기 에서 댓글이 등록된 이후에 ..
$(mid).find('[data-role="comment_box"]').on('saved.rb.comment',function(){
window.history.back(); //댓글작성 sheet 내림
var modal = $(mid)
var bid = modal.find('[name="bid"]').val()
var uid = modal.find('[name="uid"]').val()
var theme = modal.find('[name="theme"]').val()
var list_item = $('[data-role="bbs-list"]').find('#item-'+uid)
var showComment_Ele_1 = modal.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postData',{
bid : bid,
uid : uid,
theme : theme
},function(response){
var result = $.parseJSON(response);
var total_comment=result.total_comment;
// $.notify({message: '댓글이 등록 되었습니다.'},{type: 'default'});
showComment_Ele_1.text(total_comment); // 모달 상단 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 게시물 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 게시물 보기 모달에서 한줄의견이 등록된 이후에..
$(mid).find('[data-role="comment_box"]').on('saved.rb.oneline',function(){
window.history.back(); //댓글작성 sheet 내림
var modal = $(mid)
var bid = modal.find('[name="bid"]').val()
var uid = modal.find('[name="uid"]').val()
var theme = modal.find('[name="theme"]').val()
var list_item = $('[data-role="bbs-list"]').find('#item-'+uid)
var showComment_Ele_1 = modal.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_postData',{
bid : bid,
uid : uid,
theme : theme
},function(response){
var result = $.parseJSON(response);
var total_comment=result.total_comment;
//$.notify({message: '한줄의견이 등록 되었습니다.'},{type: 'default'});
modal.find('[data-kcact="reload"]').click(); // 댓글 새로 불러오기
showComment_Ele_1.text(total_comment); // 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 게시물 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 댓글이 수정된 후에..
$(mid).find('[data-role="comment_box"]').on('edited.rb.comment',function(){
setTimeout(function(){
history.back()
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
// 한줄의견이 수정 후에
$(mid).find('[data-role="comment_box"]').on('edited.rb.oneline',function(){
setTimeout(function(){
history.back()
$.notify({message: '답글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
//링크 공유 팝업이 열릴때
popup_linkshare.on('shown.rc.popup', function (event) {
var ele = $(event.relatedTarget)
var path = ele.attr('data-url')?ele.attr('data-url'):''
var host = $(location).attr('origin');
var title= "게시물 공유"
var sbj = ele.attr('data-subject')?ele.attr('data-subject'):'' // 버튼에서 제목 추출
var email = ele.attr('data-email')?ele.attr('data-email'):'' // 버튼에서 이메일 추출
var desc = ele.attr('data-desc')?ele.attr('data-desc'):'' // 버튼에서 요약설명 추출
var image = ele.attr('data-image')?ele.attr('data-image'):'' // 버튼에서 대표이미지 경로 추출
var popup = $(this)
var link = host+path // 게시물 보기 URL
var enc_link = encodeURIComponent(host+path) // URL 인코딩
var imageUrl = host+image // 대표이미지 URL
var enc_sbj = encodeURIComponent(sbj) // 제목 인코딩
var facebook = 'http://www.facebook.com/sharer.php?u=' + enc_link;
var twitter = 'https://twitter.com/intent/tweet?url=' + enc_link + '&text=' + sbj;
var naver = 'http://share.naver.com/web/shareView.nhn?url=' + enc_link + '&title=' + sbj;
var kakaostory = 'https://story.kakao.com/share?url=' + enc_link + '&title=' + enc_sbj;
var email = 'mailto:' + email + '?subject=링크공유-' + enc_sbj+'&body='+ enc_link;
popup.find('[data-role="title"]').text(title)
popup.find('[data-role="share"]').val(host+path)
popup.find('[data-role="share"]').focus(function(){
$(this).on("mouseup.a keyup.a", function(e){
$(this).off("mouseup.a keyup.a").select();
});
});
popup.find('[data-role="facebook"]').attr('href',facebook)
popup.find('[data-role="twitter"]').attr('href',twitter)
popup.find('[data-role="naver"]').attr('href',naver)
popup.find('[data-role="kakaostory"]').attr('href',kakaostory)
popup.find('[data-role="email"]').attr('href',email)
//카카오 링크
function sendLink() {
Kakao.Link.sendDefault({
objectType: 'feed',
content: {
title: sbj,
description: desc,
imageUrl: imageUrl,
link: {
mobileWebUrl: link,
webUrl: link
}
},
buttons: [
{
title: '바로가기',
link: {
mobileWebUrl: link,
webUrl: link
}
},
]
});
}
//카카오톡 링크공유
kakao_link_btn.click(function() {
sendLink()
});
})
page_bbs_photo.on('show.rc.page', function (e) {
var ele = $(e.relatedTarget)
var index = ele.attr('data-index');
var uid = ele.attr('data-uid');
var page = $(this);
var title = page_bbs_view.find('[data-role="title"]').text();
var subject = page_bbs_view.find('[data-role="subject"]').text();
page.find('[data-role="title"]').text(title);
page.find('[data-role="subject"]').text(subject);
var bbs_photo_swiper = new Swiper('#page-bbs-photo .swiper-container', {
zoom: true,
initialSlide: index,
spaceBetween: 30,
pagination: {
el: '#page-bbs-photo .swiper-pagination',
type: 'fraction',
},
navigation: {
nextEl: '#page-bbs-photo .swiper-button-next',
prevEl: '#page-bbs-photo .swiper-button-prev',
},
on: {
init: function () {
page_bbs_photo.find('.swiper-container').css('height','100vh');
},
},
});
})
page_bbs_photo.on('hidden.rc.page', function () {
// swiper destroy
var bbs_photo_swiper = document.querySelector('#page-bbs-photo .swiper-container').swiper
bbs_photo_swiper.destroy(false, true);
// 줌상태 초기화
setTimeout(function(){
page_bbs_photo.find('.swiper-zoom-container').removeAttr('style');
page_bbs_photo.find('.swiper-zoom-container img').removeAttr('style');
}, 500);
})
//게시물 수정
$(document).on('tap','[data-toggle="postEdit"]',function() {
var bid = $(this).attr('data-bid');
var uid = $(this).attr('data-uid');
modal_bbs_write.find('[name="bid"]').val(bid);
modal_bbs_write.find('[name="uid"]').val(uid);
setTimeout(function(){modal_bbs_write.modal()}, 50);
});
// 게시물 삭제
$(document).on('tap','[data-toggle="PostDelete"]',function() {
var uid = $(this).data('uid');
var bid = $(mid).find('[name="bid"]').val();
history.back();
setTimeout(function(){
if (confirm('정말 삭제하시겠습니까? ')){
$('.content').loader({
text: "삭제중...",
position: "overlay"
});
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=delete',{
send : 'ajax',
uid : uid,
bid : bid
},function(response){
var result = $.parseJSON(response);
var error=result.error;
var num=result.num;
if (!error) {
$('.content').loader('hide');
history.back();
setTimeout(function(){
if (!num) location.reload();
else $('#item-'+uid).slideUp();
}, 700);
}
});
}
}, 10);
});
//첨부된 사진 크게보기 페이지 호출
$(document).on('click','figure.image',function(){
if (!$(this).hasClass('ck-widget')) {
var page_start = $(this).closest('.page').attr('id');
var src = $(this).find('img').attr('src')
$('#page-bbs-photo').page({ start: '#'+page_start });
$('#page-bbs-photo').find('.swiper-slide img').attr('src',src)
var swiper = new Swiper('#page-bbs-photo .swiper-container', {
zoom: true,
});
}
return false;
});
// 게시물 좋아요 목록보기
page_bbs_opinion.on('show.rc.page', function(event) {
var button = $(event.relatedTarget);
var page = $(this);
var bid = button.attr('data-bid');
var uid = button.attr('data-uid');
var url = button.attr('data-url');
var opinion = button.attr('data-opinion');
page.find('[name="uid"]').val(uid);
page.find('[name="bid"]').val(bid);
page.find('[data-toggle="opinion"]').attr('data-uid',uid);
page.find('[data-role="list"]').loader({ // 로더 출력
position: "inside"
});
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=bbs&a=get_opinionList',{
uid : uid,
opinion : opinion
},function(response){
page.find('[data-role="list"]').loader("hide");
var result = $.parseJSON(response);
var _uid=result.uid;
var list=result.list;
var num=result.num;
if (num) {
page.find('[data-role="list"]').html(list);
} else {
page.find('[data-role="list"]').html('<li class="table-view-cell text-muted">좋아요가 없습니다.</li>');
}
});
}, 300);
});
page_bbs_opinion.on('hidden.rc.page', function(event) {
var page = $(this);
var uid = page.find('[name="uid"]').val()
var list_parent = $('[data-slide="feed"]').find('#item-'+uid)
list_parent.attr('tabindex','-1').focus(); // 모달을 호출한 아이템을 포커싱 처리함 (css로 배경색 적용)
});
};

View File

@@ -0,0 +1,416 @@
@charset "utf-8";
/*!
* kimsQ Rb v2.4 게시판 모바일 기본형 테마 스타일 (rc-default)
* bbs theme Version: 1.0
* Homepage: http://www.kimsq.com
* Copyright 2019 redblock inc
* Licensed under RBL
* Based on RC v1
*/
/**
* 목차:
*
* 1 - 공통
* 2 - 게시물 목록
* 3 - 게시물 보기
* 4 - 게시물 쓰기
* ----------------------------------------------------------------------------
*/
/**
* 공통
* ----------------------------------------------------------------------------
*/
/**
* 게시물 목록
* ----------------------------------------------------------------------------
*/
.bar .nav-inline .nav-link:focus {
outline: 0
}
/* 게시물 없음 */
[data-role="bbs-list"] .rb-none {
height: calc(100vh - 12rem);
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #9a9eac;
line-height: 1
}
[data-role="bbs-list"] .table-view-cell {
padding-top: 0.625rem;
padding-bottom: 0.625rem
}
[data-role="bbs-list"] .table-view-cell a {
letter-spacing: -0.0625rem;
line-height: 1.4;
}
[data-role="bbs-list"] .table-view-cell a.js-btn-href {
font-size: .75rem;
letter-spacing: inherit;
line-height: 1;
}
/* 비밀글 */
[data-role="bbs-list"] .table-view-cell.secret {
color: #818a91 !important;
}
[data-role="bbs-list"] .table-view-cell.secret img {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
[data-role="bbs-list"] .table-view-cell.secret .btn-outline-secondary {
color: #ccc;
border-color: #eee;
}
[data-role="bbs-list"] .table-view-cell.secret .badge {
color: #999;
}
/* 포커싱된 항목을 배경색으로 강조표시 */
[data-role="bbs-list"] .table-view-cell:focus {
background-color: #f5f5f5 !important
}
[data-role="bbs-list"] .listMarkup-card .card .card-header .btn-link {
color: #ccc;
}
[data-role="bbs-list"] .listMarkup-card .card .card-footer .nav-control .nav-link {
font-size: 1rem;
color: #666;
background-color: #fff;
padding-top: .8rem;
padding-bottom: .8rem;
}
[data-role="bbs-list"] .listMarkup-card .card .card-footer .nav-control .nav-link:active {
background-color: #eee;
}
[data-role="bbs-list"] .listMarkup-card .card:focus {
border-color: #007bff;
}
/* photo-mask */
figure.photo-mask {
margin-bottom: 0;
position: relative;
}
.photo-mask::before {
position: absolute;
content: ' ';
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.1);
}
.photo-mask.photo-mask-dark::before {
background-color: rgba(0, 0, 0, 0.25);
}
.photo-mask:active::before,
.photo-mask:focus::before {
background-color: rgba(0, 0, 0, 0);
}
/* photo-grid */
.rb-photogrid .gutter-half {
margin-top: 2.3px;
margin-right: -1.5px;
margin-left: -1.5px;
}
.rb-photogrid .gutter-half > .col,
.rb-photogrid .gutter-half > [class*="col-"] {
padding-bottom: 2.5px;
padding-right: 1.5px;
padding-left: 1.5px;
box-sizing: border-box;
}
.rb-photogrid [class*="col-"] a {
position: relative;
display: inline-block;
}
.rb-photogrid [class*="col-"] .embed-responsive::before {
position: absolute;
content: ' ';
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.25);
}
.rb-photogrid .label {
position: absolute;
font-weight: normal;
color: white;
z-index: 99;
display: block;
padding-top: 3px;
padding-left: 5px;
padding-right: 5px;
font-size: 12px;
height: 22px;
text-align: center;
}
.rb-photogrid .label:empty {
display: none
}
.rb-photogrid .label.active {
background-color: #35C5F0;
}
.rb-photogrid .nic-name {
position: absolute;
bottom: 5px;
left: 7px;
font-weight: normal;
color: #fff;
z-index: 99;
font-size: 12px;
}
.rb-photogrid figure:focus {
border: 2px solid #35C5F0;
}
[data-role="post"] .table-view-info {
background-color: #F5FFFE !important;
}
/**
* rb-bbs-view 게시물 보기
* ----------------------------------------------------------------------------
*/
[data-role="bbs-view"] .bar-nav .title-left {
padding-right: 1.25rem
}
[data-role="bbs-view"] .bar-nav .title span {
display: -webkit-box;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
white-space: nowrap;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.rb-article-title {
margin-top: 0.25rem;
font-weight: normal;
font-size: 1.4375rem;
line-height: 1.8125rem;
letter-spacing: -0.0625rem;
}
.rb-meta {
line-height: 1.2
}
.rb-article {
line-height: 1.625;
font-size: 1.0625rem;
}
.rb-article figure.image img {
display: block;
max-width: 100%;
height: auto;
}
.card.figure .btn {
position: absolute;
bottom: .3rem;
right: .3rem;
padding: .5rem;
color: #fff;
background-color: rgba(0, 0, 0, 0.5);
/* border-radius: 50%; */
}
.popup .share .list-inline-item {
width: 27%;
text-align: center;
}
.popup .share img {
width: 3.5rem
}
.popup .share a {
color: #444
}
[data-role="btn_post_like"].active .fa-heart-o:before {
content: "\f004";
}
[data-role="btn_post_like"].active .fa,
[data-role="btn_post_dislike"].active .fa {
color: red;
}
[data-role="btn_post_like"].active.heartbeat .fa,
[data-role="btn_post_dislike"].active.heartbeat .fa {
animation: heartbeat .8s;
}
@keyframes heartbeat
{
0%
{
transform: scale( 1.8 );
}
30%
{
transform: scale( 1 );
}
60%
{
transform: scale( 1.8 );
}
100%
{
transform: scale( 1 );
}
}
.tag .badge {
margin-left: .3rem;
margin-bottom: .3rem
}
/**
* rb-bbs-write 게시물 쓰기
* ----------------------------------------------------------------------------
*/
/*글쓰기 전용*/
[data-role="write"] .form-list select,
[data-role="write"] .form-list textarea,
[data-role="write"] .form-list input[type="text"],
[data-role="write"] .form-list input[type="search"] {
border-color: rgba(0, 0, 0, 0.075);
}
[data-role="write"] input::placeholder {
color: #999;
}
[data-role="write"] .guide {
height: 50vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #9a9eac;
}
[data-role="write"] .rb-attach.active ~ .guide {
display: none
}
[data-role="write"] .ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused {
outline: none;
border: none;
box-shadow: none;
}
[data-role="write"] .ck.ck-placeholder:before,
[data-role="write"] .ck .ck-placeholder:before {
font-size: 1rem;
}
[data-role="write"] .ck-editor__editable_inline {
height: 6vh;
}
[data-role="write"].editor-focused .ck-editor__editable_inline {
height: auto;
}
.mac-os [data-role="write"].editor-focused .ck-editor__editable_inline {
min-height: 20vh;
}
[data-role="write"] [data-role="editor-nav"] {
display: none
}
[data-role="write"] [data-role="editor-nav"] {
display: none
}
[data-role="write"].editor-focused header,
[data-role="write"].editor-focused .form-list,
[data-role="write"].editor-focused .editor-focused-hide,
[data-role="write"].editor-focused [data-role="write-nav"] {
display: none
}
[data-role="write"].editor-focused [data-role="editor-nav"] {
display: block
}
.[data-role="write"].editor-focused .bar-nav ~ .content {
top: 2.75rem;
bottom: .5rem;
padding-top: 0;
}
[data-role="write"] .bar-nav .ck-toolbar {
border: none;
box-shadow: none;
background-color: inherit;
}
[data-role="write"] .bar-nav .ck-toolbar .ck-button {
padding: .2rem .3rem;
}
[data-role="write"] .bar-nav .ck-toolbar .ck.ck-icon {
font-size: 1em;
}
[data-role="write"] .ck-insert-table-dropdown__grid {
padding: .6rem!important;
}
[data-role="write"] .ck .ck-insert-table-dropdown-grid-box,
[data-role="write"] .ck-insert-table-dropdown__label {
display: none;
}
[data-role="write"] .ck .ck-insert-table-dropdown-grid-box{
-ms-flex: 1 1 auto!important;
flex: 1 1 auto!important;
height: 2rem!important;
}
[data-role="write"] .ck .ck-insert-table-dropdown-grid-box:nth-child(1),
[data-role="write"] .ck .ck-insert-table-dropdown-grid-box:nth-child(2),
[data-role="write"] .ck .ck-insert-table-dropdown-grid-box:nth-child(3 ) {
display: block;
}
[data-role="write"] .ck.ck-editor__editable > .ck-placeholder::before {
color: #999;
}
[data-role="write"] .spinner-border {
border-width : .15em;
}
[data-role="write"] .content .spinner-border {
width: 3rem;
height: 3rem;
}
[data-role="write"] [data-role="editor"] {
max-height: 65px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
[data-role="write"].editor-focused [data-role="editor"] {
max-height: calc(100vh - 42px);
overflow-y: auto;
-webkit-line-clamp : unset
}
[data-role="bbs-photo"] .swiper-slide {
overflow: visible !important;
}

View File

@@ -0,0 +1,14 @@
<?php
// 설정값 세팅
$attachSkin = $d['bbs']['a_mskin']?$d['bbs']['a_mskin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); // 업로드 테마
$parent_module=$m; // 첨부파일 사용하는 모듈
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
$attach_module_theme=$attachSkin; // 첨부파일 테마
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
// 함수 인클루드
include $g['path_module'].'mediaset/attach.php';
?>

View File

@@ -0,0 +1,28 @@
<?php
//목록
$d['theme']['listMarkup'] = "media"; //리스트 마크업(media/avatar/table/card/gallery)
$d['theme']['show_catnum'] = "1"; //분류별등록수출력(출력=1/감춤=0)
$d['theme']['pagenum'] = "5"; //페이지스킵숫자갯수
$d['theme']['search'] = "1"; //검색폼출력(출력=1/감춤=0)
$d['theme']['timeago'] = "1"; //상대시간 표기(사용=1/날짜표기=0)
//본문
$d['theme']['date_viewf'] = "Y.m.d H:i"; //날짜포맷
$d['theme']['use_reply'] = "0"; //답변사용(사용=1/사용안함=0)
$d['theme']['show_tag'] = "1"; //태그출력(출력=1/감춤=0)
$d['theme']['show_upfile'] = "1"; //첨부파일출력(출력=1/감춤=0)
$d['theme']['show_like'] = "1"; //좋아요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_dislike'] = "0"; //싫어요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_list'] = "0"; //열람시리스트출력(출력=1/감춤=0)
$d['theme']['show_share'] = "1"; //링크공유 출력(출력=1/감춤=0)
//글쓰기
$d['theme']['show_wtag'] = "1"; //태그필드출력(출력=1/감춤=0)
$d['theme']['use_hidden'] = "1"; //비밀글(사용안함=0/유저선택사용=1/무조건비밀글=2)
$d['theme']['perm_photo'] = "1"; //사진첨부권한(등급이상)
$d['theme']['num_photo'] = "2"; //사진첨부갯수
$d['theme']['perm_upload'] = "10"; //파일첨부권한(등급이상)
$d['theme']['num_upload'] = "1"; //파일첨부갯수
$d['theme']['upload_theme'] = "_mobile/rc-post-file"; //파일 업로드 테마 (/modules/mediaset/themes/ 참고)
$d['theme']['perm_upload'] = "1"; //파일첨부권한(등급이상)
?>

View File

@@ -0,0 +1,14 @@
<script>
$(function () {
getBbsView({
type : 'page', // 호출 컴포넌트 타입(modal,page)
mid : '#page-bbs-view', // 컴포넌트 아이디
ctheme : '<?php echo $d['bbs']['c_mskin']?$d['bbs']['c_mskin']:$d['comment']['skin_mobile']; ?>' //모달 댓글테마
});
})
</script>

View File

@@ -0,0 +1,478 @@
<!--
게시판 테마 컴포넌트 모음
1. Modal : 게시판 글쓰기
2. Popup : 글쓰기 취소확인
3. Popup : 댓글관리
4. Popover : 게시물 관리
5. Popover : 게시물 관리
6. Sheet : 신규 댓글작성
-->
<?php if ($m!='bbs'): ?>
<section id="page-bbs-list" class="page right" data-role="bbs-list">
<header class="bar bar-nav bar-light bg-white p-x-0" data-role="bar-nav">
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<a href="#popover-bbs-listMarkup" data-toggle="popover" data-bid="<?php echo $bid ?>" class="icon icon-more-vertical pull-right pl-2 pr-3"></a>
<h1 class="title title-left" data-role="title" data-history="back">게시판</h1>
</header>
<div class="content" data-role="bbs-list">
</div>
</section>
<?php endif; ?>
<!-- 게시판 카테고리 -->
<div id="page-bbs-category" class="page right" data-role="bbs-search">
<header class="bar bar-nav bar-light bg-white px-0 border-bottom-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back">arrow_back</a>
<h1 class="title title-left" data-history="back">분류 <span class="badge badge-default badge-inverted ml-2" data-role="title"></span></h1>
</header>
<div class="content">
</div>
</div>
<div id="page-bbs-result" class="page right">
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back">arrow_back</a>
<h1 class="title title-left" data-history="back">
<span data-role="title">게시판 검색결과</span>
<span data-role="bname" class="badge badge-default badge-inverted ml-2"></span>
</h1>
</header>
<div class="content" data-role="bbs-list">
</div>
</div>
<!-- Page : 게시물 보기 -->
<section id="page-bbs-view" class="page right" data-role="bbs-view">
<input type="hidden" name="bid" value="">
<input type="hidden" name="uid" value="">
<header class="bar bar-nav bar-light bg-white p-x-0" data-scroll-header>
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<a href="#popover-bbs-view" data-toggle="popover" class="icon icon-more-vertical pull-right pl-2 pr-3" data-role="owner" data-url=""></a>
<a class="icon material-icons pull-right px-3 mirror" id="btn-linkShare" data-role="linkShare">reply</a>
<h1 class="title title-left" data-role="title" data-history="back"></h1>
</header>
<main class="content">
<div class="d-flex justify-content-between align-items-center content-padded my-3">
<a class="media" style="width:15rem"
data-toggle="sheet"
data-avatar=""
data-mbruid=""
href="#sheet-member-profile">
<img class="media-object pull-left rb-avatar img-rounded bg-faded" src="" style="width:2.55rem;height:2.55rem" data-role="avatar">
<div class="media-body rb-meta ml-2" style="line-height: 1.2;">
<strong class="f14 text-black" data-role="name"></strong> <br>
<span class="badge badge-default badge-inverted font-weight-normal" data-role="d_regis"></span>
<span class="badge badge-default badge-inverted font-weight-normal">조회 <span data-role="hit"></span></span>
</div>
</a>
<div class="">
<button type="button" class="btn btn-outline-secondary"
data-toggle="move"
data-target="[data-role='comment-box']"
data-page="#page-bbs-view" data-role="btn_comment">
<i class="fa fa-comment-o" aria-hidden="true"></i>
<span data-role="total_comment" class="badge badge-default badge-inverted"></span>
</button>
</div>
</div><!-- /.clearfix -->
<div class="content-padded mt-4" data-role="post">
<span data-role="cat" data-act="category" class="badge badge-primary badge-inverted"></span>
<h3 data-role="subject" class="h5 font-weight-bold"></h3>
</div>
<div data-role="article">
<div class="text-xs-center">다시 시도해주세요.</div>
</div>
<!-- 댓글출력 -->
<div data-role="comment_box"></div>
</main>
</section>
<!-- Page : 게시물 사진 크게보기 -->
<section id="page-bbs-photo" class="page right" data-role="bbs-photo">
<header class="bar bar-nav bar-dark bg-black pl-0 border-bottom-0" style="opacity: 0.7;;height: 3.7rem;">
<a class="icon pull-left material-icons px-3 text-white" role="button" data-history="back">arrow_back</a>
<h1 class="title title-left" data-history="back" style="line-height: 1.2;padding-top: .75rem">
<div data-role="subject" class="pr-2 text-nowrap text-truncate"></div><small class="text-muted" data-role="title"></small>
</h1>
</header>
<div class="bar bar-footer bar-dark bg-black text-muted border-top-0" style="opacity: 0.7;">
<div class="swiper-pagination"></div>
</div>
<div class="content bg-black py-0">
<div class="d-flex" style="height:100vh">
<div class="swiper-container align-self-center" style="height:100vh">
<div class="swiper-wrapper align-items-center">
<div class="swiper-slide">
<div class="swiper-zoom-container">
<img src="">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Page : 게시물 좋아요한 사람 -->
<section id="page-bbs-opinion" class="page right" data-role="bbs-opinion">
<input type="hidden" name="bid" value="">
<input type="hidden" name="uid" value="">
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<h1 class="title title-left" data-history="back">좋아요한 사람</h1>
</header>
<div class="content">
<div class="content-padded" data-role="post">
<h3 data-role="subject" class="rb-article-title line-clamp-3"></h3>
<span data-role="cat" class="badge badge-primary badge-inverted"></span>
</div>
<div class="text-xs-center my-4">
<button type="button" class="btn btn-outline-secondary btn-lg" data-send="ajax" data-toggle="opinion" data-uid="" data-opinion="like" data-effect="heartbeat" data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw fa-lg" aria-hidden="true"></i>
<span data-role="likes_17351" class="badge badge-inverted"></span>
</button>
</div>
<!-- 좋아요 목록 -->
<ul class="table-view" data-role="list"></ul>
</div>
</section>
<!-- 게시물 보기 -->
<section id="modal-bbs-view" class="modal fast" data-role="bbs-view">
<input type="hidden" name="bid" value="">
<input type="hidden" name="uid" value="">
<input type="hidden" name="theme" value="">
<header class="bar bar-nav bar-light bg-white p-x-0" data-scroll-header>
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<a class="icon material-icons pull-left px-3" role="button" data-href="/" data-text="홈으로 이동" data-role="gohome">house</a>
<a href="#popover-bbs-view" data-toggle="popover" class="icon icon-more-vertical pull-right pl-2 pr-3" data-role="owner" data-url=""></a>
<a class="icon material-icons pull-right px-3 mirror" id="btn-linkShare"
data-role="linkShare"
data-subject="{$subject}"
data-url=""
data-likes="{$likes}"
data-image="{$featured_img}"
data-desc="">reply
</a>
</header>
<main class="content">
<div class="clearfix content-padded">
<div class="pull-xs-left">
<div class="media" style="width:15rem"
data-mbruid=""
data-toggle="sheet"
data-target="#sheet-member-profile">
<img class="media-object pull-left rb-avatar img-circle bg-faded" src="" style="width:2.25rem;height:2.25rem" data-role="avatar">
<div class="media-body rb-meta m-l-1">
<span class="badge badge-default badge-inverted" data-role="name"></span> <br>
<span class="badge badge-default badge-inverted" data-role="d_regis"></span>
<span class="badge badge-default badge-inverted">조회 <span data-role="hit"></span></span>
</div>
</div>
</div>
<div class="pull-xs-right pt-1">
<button type="button" class="btn btn-outline-secondary"
data-toggle="move"
data-target="[data-role='comment-box']"
data-page="#page-bbs-view" data-role="btn_comment">
<i class="fa fa-comment-o" aria-hidden="true"></i>
<span data-role="total_comment" class="badge badge-default badge-inverted"></span>
</button>
</div>
</div><!-- /.clearfix -->
<hr>
<div class="content-padded" data-role="post">
<span data-role="cat" class="badge badge-primary badge-inverted"></span>
<h3 data-role="subject" class="rb-article-title"></h3>
</div>
<div data-role="article" data-plugin="photoswipe">
<div class="p-4 text-xs-center">다시 시도해주세요.</div>
</div>
<!-- 댓글출력 -->
<div data-role="comment_box"></div>
</main>
</section>
<!-- 게시판 검색 -->
<div id="modal-bbs-search" class="modal fast">
<header class="bar bar-nav bar-light bg-white border-bottom-0 px-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back">arrow_back</a>
<h1 class="title title-left">검색 <span class="badge badge-default badge-inverted ml-2" data-role="title"></span></h1>
</header>
<div class="content">
<form class="content-padded" data-role="search">
<div class="form-group">
<label class="sr-only">검색어</label>
<input type="search" class="form-control" placeholder="검색어를 입력해주세요." name="keyword" value="" autocomplete="off" required>
</div>
<div class="form-group">
<label class="sr-only">검색범위</label>
<select class="form-control" name="where">
<option value="subject|tag">제목+태그</option>
<option value="content">본문</option>
<option value="name">이름</option>
<option value="nic">닉네임</option>
<option value="id">아이디</option>
</select>
</div>
</form>
</div>
</div>
<!-- 게시판 글쓰기 -->
<div id="modal-bbs-write" class="modal fast" data-role="write">
<input type="hidden" name="bid" value="">
<input type="hidden" name="name" value="<?php echo $my['name']?>">
<input type="hidden" name="uid" value="">
<input type="hidden" name="reply" value="">
<input type="hidden" name="notice" value="">
<input type="hidden" name="hidden" value="">
<input type="hidden" name="category" value="">
<input type="hidden" name="tag" value="">
<input type="hidden" name="featured_img" value="">
<input type="hidden" name="upfiles" id="upfilesValue" value="">
<input type="hidden" name="pcode" value="">
<input type="hidden" name="backtype" value="ajax">
<section id="page-bbs-write-main" class="page center">
<header class="bar bar-nav bar-light bg-white p-x-0" data-role="write-nav">
<a class="icon pull-left material-icons p-x-1" role="button" data-history="back">arrow_back</a>
<button class="btn btn-link btn-nav pull-right p-x-2 d-none" type="button" data-act="submit">
<span class="not-loading"></span>
<span class="is-loading">
<div class="spinner-border spinner-border-sm text-primary" role="status">
<span class="sr-only">저장중...</span>
</div>
</span>
</button>
<h1 class="title title-left" data-history="back">
글쓰기 <span class="badge badge-default badge-inverted ml-2" data-role="title"></span>
</h1>
</header>
<header class="bar bar-nav bar-light bg-white p-x-0 border-top" data-role="editor-nav">
<div class="d-flex align-items-center">
<div class="toolbar-container w-100"></div>
<?php if ($g['mobile']!='iphone' && $g['mobile']!='ipad'): ?>
<div class="flex-shrink-1 border-left text-xs-center" style="min-width:4rem">
<button class="btn btn-link" type="button">완료</button>
</div>
<?php endif; ?>
</div>
</header>
<div class="content">
<div data-role="loader">
<div class="d-flex justify-content-center align-items-center text-muted" style="height:70vh">
<div class="spinner-border text-primary mr-2" role="status"></div>
</div>
</div>
<form class="d-none">
<div class="form-list m-b-0">
<?php if(!$my['id']):?>
<div class="input-row">
<label>이름</label>
<input type="text" name="name" placeholder="이름을 입력해 주세요." value="" class="form-control" autocomplete="off">
</div>
<?php if(!$R['uid']||$reply=='Y'):?>
<div class="input-row">
<label>암호</label>
<input type="password" name="pw" placeholder="암호는 게시글 수정 및 삭제에 필요합니다." value="" class="form-control" autocomplete="off">
<?php if($R['hidden']&&$reply=='Y'):?>
<small class="form-text text-muted">비밀답변은 비번을 수정하지 않아야 원게시자가 열람할 수 있습니다.</small>
<?php endif?>
</div>
<?php endif?>
<?php endif?>
<input type="text" name="subject" placeholder="제목 입력..." value="" autocomplete="off">
</div><!-- /.form-list -->
<div data-role="editor" style="margin-top: -0.3125rem;" class="mb-5">
<div data-role="editor-body" class="editable-container" style="color:#55595c"></div>
</div>
<ul class="table-view table-view-full editor-focused-hide mb-0 bg-faded" id="bbs-attach-tree">
<li class="table-view-cell">
<a class="navigate-right collapsed" data-toggle="collapse" data-parent="#bbs-attach-tree" data-target="#bbs-collapse-attach-file">
<span class="badge badge-default badge-inverted" data-role="attachNum"></span>
사진 및 파일
</a>
<!-- 2depth -->
<div class="collapse mb-0" id="bbs-collapse-attach-file" role="tabpanel" >
<?php if ($m!='post') getWidget('_default/attach-rc',array('parent_module'=>'bbs','theme'=>'_mobile/rc-post-file','attach_handler_photo'=>'#modal-bbs-write [data-role="attach-handler-photo"]','parent_data'=>$R,'attach_object_type'=>'photo'));?>
</div>
</li>
<li class="table-view-cell">
<a class="navigate-right collapsed" data-toggle="collapse" data-parent="#bbs-attach-tree" data-target="#bbs-collapse-attach-link">
<span class="badge badge-default badge-inverted" data-role="linkNum"></span>
링크
</a>
<!-- 2depth -->
<div class="collapse mb-0" id="bbs-collapse-attach-link">
<?php if ($m!='post') getWidget('_default/attach-rc',array('parent_module'=>'bbs','theme'=>'_mobile/rc-post-link','parent_data'=>$R,'attach_object_type'=>'link'));?>
</div>
</li>
</ul>
<ul class="table-view editor-focused-hide bg-white border-top-0" data-role="bbs-meta">
</ul>
</form>
</div>
</section>
<section id="page-bbs-write-category" class="page right">
<header class="bar bar-nav bar-light bg-white p-x-0">
<a class="icon pull-left material-icons p-x-1" role="button" data-history="back">arrow_back</a>
<a class="icon icon-check pull-right text-primary p-x-1" role="button" data-history="back"></a>
<h1 class="title title-left" data-history="back">
카테고리
</h1>
</header>
<div class="content bg-white">
<ul class="table-view m-t-0 bg-white border-top-0">
<li class="table-view-divider f12 text-muted bg-white border-bottom-0"><?php echo $_catexp[0]?></li>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<li class="table-view-cell radio" >
<label class="custom-control custom-radio">
<input id="radio-<?php echo $_catexp[$i]?>" name="radio" type="radio" class="custom-control-input" value="<?php echo $_catexp[$i]?>" <?php if($_catexp[$i]==$R['category']||$_catexp[$i]==$cat):?> checked<?php endif?>>
<span class="custom-control-indicator"></span>
<span class="custom-control-description">
<?php echo $_catexp[$i]?>
</span>
</label>
</li>
<?php endfor?>
</ul>
</div>
</section>
<section id="page-bbs-write-attach" class="page right">
<header class="bar bar-nav bar-light bg-white p-x-0">
<button class="btn btn-link btn-nav pull-left p-x-1" type="button" data-history="back">
<span class="icon icon-left-nav"></span>
본문작성
</button>
<h1 class="title">
파일첨부
</h1>
</header>
<div class="bar bar-standard bar-footer bar-light bg-white">
<button class="btn btn btn-outline-primary btn-block" data-role="attach-handler-file" data-type="file" title="파일첨부" role="button" data-loading-text="업로드 중...">
<i class="fa fa-upload" aria-hidden="true"></i> 파일 불러오기
</button>
</div>
<div class="content bg-faded">
<!-- 첨부파일 업로드 -->
<?php //include $g['dir_module_skin'].'_uploader.php'?>
</div><!-- /.content -->
</section>
<section id="page-bbs-write-tag" class="page right">
<header class="bar bar-nav bar-light bg-white p-x-0">
<a class="icon pull-left material-icons p-x-1" role="button" data-history="back">arrow_back</a>
<a class="icon icon-check pull-right text-primary p-x-1" role="button" data-history="back"></a>
<h1 class="title title-left" data-history="back">
태그
</h1>
</header>
<div class="content bg-white">
<textarea class="form-control border-0" rows="5" name="tag" placeholder="콤마(,)로 구분하여 입력해주세요."><?php echo htmlspecialchars($R['tag'])?></textarea>
<div class="content-padded text-muted">
<small>이 게시물을 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요. 통합검색시에 검색어 추천시에 활용됩니다.</small>
</div>
</div>
</section>
</div>
<!-- 글쓰기 취소확인 -->
<div id="popup-bbs-cancelCheck" class="popup zoom">
<div class="popup-content">
<nav class="bar bar-tab">
<a class="tab-item" role="button" data-toggle="cancelCheck" data-value="no">
아니요
</a>
<a class="tab-item border-left text-primary" role="button" data-toggle="cancelCheck" data-value="yes">
</a>
</nav>
<div class="content" style="min-height: 7.1875rem;">
<div class="p-a-2 text-xs-center">글쓰기를 취소 하시겠습니까?</div>
</div>
</div>
</div>
<!-- 게시물 관리 -->
<div id="popover-bbs-view" class="popover">
<ul class="table-view">
<!-- 저장,수정,삭제 항목 동적 추가 -->
<li class="table-view-cell" data-toggle="linkCopy" data-history="back">URL 복사</li>
<li class="table-view-cell" data-toggle="linkShare" data-history="back">공유하기...</li>
</ul>
</div>
<!-- 게시물 관리 -->
<div id="popover-bbs-listMarkup" class="popover">
<ul class="table-view">
<li class="table-view-divider"><small>목록타입 변경</small></li>
<li class="table-view-cell" data-toggle="listMarkup" data-markup="media" data-bid="">
<i class="material-icons align-middle" style="vertical-align: middle;">view_list</i>
섬네일형
</li>
<li class="table-view-cell" data-toggle="listMarkup" data-markup="avatar" data-bid="">
<i class="material-icons align-middle" style="vertical-align: middle;">person_pin</i>
아바타형
</li>
<li class="table-view-cell" data-toggle="listMarkup" data-markup="card" data-bid="">
<i class="material-icons align-middle" style="vertical-align: middle;">view_stream</i>
카드형
</li>
<li class="table-view-cell" data-toggle="listMarkup" data-markup="gallery" data-bid="">
<i class="material-icons align-middle" style="vertical-align: middle;">view_module</i>
갤러리형
</li>
</ul>
</div>
<?php $bbs_theme_path = '/modules/bbs/themes/'.($bid?$d['bbs']['skin']:$d['bbs']['skin_mobile']);?>
<script src="<?php echo $bbs_theme_path ?>/_js/list.js<?php echo $g['wcache']?>" ></script>
<script src="<?php echo $bbs_theme_path ?>/_js/view.js<?php echo $g['wcache']?>" ></script>
<script src="<?php echo $bbs_theme_path ?>/_js/component.js<?php echo $g['wcache']?>" ></script>

View File

@@ -0,0 +1,39 @@
<section id="page-bbs-list" class="page center" data-role="bbs-list" data-snap-ignore="true">
<header class="bar bar-nav bar-light bg-white p-x-0" data-role="bar-nav">
<a href="#drawer-left" data-toggle="drawer" class="icon icon-bars pull-left p-x-1" role="button"></a>
<a href="#popover-bbs-listMarkup" data-toggle="popover" data-bid="<?php echo $bid ?>" class="icon icon-more-vertical pull-right pl-2 pr-3"></a>
<h1 class="title">
<a data-location="reload" data-text="새로고침..">
<?php echo $B['name']?$B['name']:($_HM['name']?$_HM['name']:$_HP['name'])?>
</a>
</h1>
</header>
<main class="content bg-white" data-role="bbs-list"></main>
</section>
<script>
var bid = '<?php echo $bid?>';
var local_listMarkup = localStorage.getItem('bbs-'+bid+'-listMarkup'); // 목록 마크업 (listMarkup)
if (local_listMarkup) {
var listMarkup = local_listMarkup;
} else {
var listMarkup = '<?php echo $d['theme']['listMarkup'] ?>';
localStorage.setItem('bbs-'+bid+'-listMarkup', listMarkup);
}
$( document ).ready(function() {
getBbsList(bid,'','','#page-bbs-list'); // 목록 셋팅
getBbsView({
type : 'page', // 타입(modal,page)
mid : '#page-bbs-view', // 컴포넌트 아이디
ctheme : '<?php echo $d['bbs']['c_mskin']?$d['bbs']['c_mskin']:$d['comment']['skin_mobile']; ?>' //모달 댓글테마
});
});
</script>

View File

@@ -0,0 +1 @@
모바일 목록형-01

View File

@@ -0,0 +1,75 @@
<header class="bar bar-nav bar-light bg-white p-x-0">
<a href="#drawer-left" data-toggle="drawer" class="icon icon-bars pull-left p-x-1" role="button"></a>
<a class="icon icon-home pull-right p-x-1" data-href="/" data-text="홈으로 이동" role="button"></a>
<h1 class="title">
<a data-href="<?php echo RW('m=bbs&bid='.$bid) ?>" data-text="이동중..">
<?php echo $B['name']?$B['name']:($_HM['name']?$_HM['name']:$_HP['name'])?>
</a>
</h1>
</header>
<main class="content">
<div data-role="loader">
<div class="d-flex justify-content-center align-items-center text-muted" style="height:90vh">
<div class="spinner-border" role="status"></div>
</div>
</div>
<div class="d-flex align-items-center text-muted" style="height:90vh">
<ul class="table-view">
<li class="table-view-cell media">
<a class="navigate-right" href="#modal-bbs-view" id ="veiw-<?php echo $R['uid'] ?>"
data-landing="true"
data-toggle="modal"
data-subject="<?php echo $R['subject'] ?>"
data-cat="<?php echo $R['category'] ?>"
data-avatar="<?php echo getAvatarSrc($R['mbruid'],'84'); ?>"
data-name="<?php echo $R['name'] ?>"
data-hit="<?php echo $R['hit'] ?>"
data-comment="<?php echo $R['comment'].($R['oneline']?'+'.$R['oneline']:'') ?>"
data-likes="<?php echo $R['likes'] ?>"
data-dregis="<?php echo getDateFormat($R['d_regis'],$d['theme']['date_viewf']); ?>"
data-bid="<?php echo $bid ?>" data-uid="<?php echo $R['uid'] ?>" role="button"
data-url="<?php echo $g['bbs_view'].$R['uid'] ?>">
<?php if ($R['featured_img']): ?>
<div class="pull-left">
<img class="media-object mr-2" src="<?php echo getPreviewResize(getUpImageSrc($R),'320x180'); ?>" alt="" data-role="featured" style="width:160px">
</div>
<?php endif; ?>
<div class="media-body pt-1">
<h4 class="media-heading f15 line-clamp-3"><?php echo stripslashes($R['subject']) ?></h4>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item"><?php echo $R[$_HS['nametype']]?></li>
<li class="list-inline-item">조회수 <?php echo number_format($R['hit'])?>회 </li>
<li class="list-inline-item">댓글 <?php echo number_format($R['comment'])?> </li>
</ul>
</div>
</a>
</li>
</ul>
</div>
</main>
<script>
$( document ).ready(function() {
var settings_view={
type : 'modal',
mid : '#modal-bbs-view', // 컴포넌트 아이디
ctheme : '<?php echo $d['bbs']['c_mskin']?>', //모달 댓글테마
landing : true
}
getBbsView(settings_view); // 게시물 보기
$('#veiw-<?php echo $R['uid'] ?>').click();
setTimeout(function(){ $('[data-role="loader"]').addClass('d-none'); }, 1000);
});
</script>