first
This commit is contained in:
3
modules/bbs/themes/_desktop/bs4-default/LICENSE
Normal file
3
modules/bbs/themes/_desktop/bs4-default/LICENSE
Normal file
@@ -0,0 +1,3 @@
|
||||
The RBL License
|
||||
|
||||
Copyright (c) 2020 Redblock, Inc.
|
||||
6
modules/bbs/themes/_desktop/bs4-default/README.md
Normal file
6
modules/bbs/themes/_desktop/bs4-default/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# 게시판 테마 입니다.
|
||||
|
||||
기본형 데스크탑 목록형 게시판 테마 입니다.
|
||||
|
||||
## 주요기능
|
||||
- 글쓰기 기능
|
||||
148
modules/bbs/themes/_desktop/bs4-default/_attachment.php
Normal file
148
modules/bbs/themes/_desktop/bs4-default/_attachment.php
Normal 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?>&m=mediaset&a=download&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; ?>
|
||||
105
modules/bbs/themes/_desktop/bs4-default/_comment.php
Normal file
105
modules/bbs/themes/_desktop/bs4-default/_comment.php
Normal 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>
|
||||
9
modules/bbs/themes/_desktop/bs4-default/_footer.php
Normal file
9
modules/bbs/themes/_desktop/bs4-default/_footer.php
Normal 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'];?>
|
||||
9
modules/bbs/themes/_desktop/bs4-default/_header.php
Normal file
9
modules/bbs/themes/_desktop/bs4-default/_header.php
Normal 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'];?>
|
||||
47
modules/bbs/themes/_desktop/bs4-default/_linkshare.php
Normal file
47
modules/bbs/themes/_desktop/bs4-default/_linkshare.php
Normal 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>
|
||||
153
modules/bbs/themes/_desktop/bs4-default/_main.css
Normal file
153
modules/bbs/themes/_desktop/bs4-default/_main.css
Normal 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 );
|
||||
}
|
||||
}
|
||||
60
modules/bbs/themes/_desktop/bs4-default/_main.js
Normal file
60
modules/bbs/themes/_desktop/bs4-default/_main.js
Normal 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);
|
||||
});
|
||||
|
||||
})
|
||||
39
modules/bbs/themes/_desktop/bs4-default/_uploader.php
Normal file
39
modules/bbs/themes/_desktop/bs4-default/_uploader.php
Normal 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>
|
||||
32
modules/bbs/themes/_desktop/bs4-default/_var.php
Normal file
32
modules/bbs/themes/_desktop/bs4-default/_var.php
Normal 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)
|
||||
?>
|
||||
253
modules/bbs/themes/_desktop/bs4-default/list.php
Normal file
253
modules/bbs/themes/_desktop/bs4-default/list.php
Normal 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">>></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">>></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>
|
||||
1
modules/bbs/themes/_desktop/bs4-default/name.txt
Normal file
1
modules/bbs/themes/_desktop/bs4-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
부트스트랩 4 리스트 기본형
|
||||
151
modules/bbs/themes/_desktop/bs4-default/view.php
Normal file
151
modules/bbs/themes/_desktop/bs4-default/view.php
Normal 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&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&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&opinion=like&uid=<?php echo $R['uid']?>&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&opinion=dislike&uid=<?php echo $R['uid']?>&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']?>&where=subject|tag&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?>
|
||||
253
modules/bbs/themes/_desktop/bs4-default/write.php
Normal file
253
modules/bbs/themes/_desktop/bs4-default/write.php
Normal 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=""> + <?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>
|
||||
Reference in New Issue
Block a user