first
23
widgets/bs4-default/bbs/all/gallery-default/_var.config.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'gallery-default' => array(
|
||||
'최근 게시물 갤러리 기본형', //위젯명
|
||||
array(
|
||||
array('bid','bbs','게시판 선택',''),
|
||||
array('title','input','타이틀','전체 게시물'),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
array('link','input','링크연결','')
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
7
widgets/bs4-default/bbs/all/gallery-default/main.css
Normal file
@@ -0,0 +1,7 @@
|
||||
[data-role="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);
|
||||
}
|
||||
47
widgets/bs4-default/bbs/all/gallery-default/main.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
$B = getDbData($table['bbslist'],'id="'.$wdgvar['bid'].'"','uid');
|
||||
$size = '400x250'; // 사진 사이즈
|
||||
$_RCD=getDbArray($table['bbsdata'],($wdgvar['bid']?'bbs='.$B['uid'].' and ':'').'display=1 and notice=0 and site='.$_HS['uid'],'*','gid','asc',$wdgvar['limit'],1);
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
if (db_num_rows($_RCD) > $recnum) $totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
else $totalCardRow = 1;
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
?>
|
||||
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center py-2 border-bottom">
|
||||
<strong><?php echo $wdgvar['title']?></strong>
|
||||
<?php if($wdgvar['link']):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="muted-link small">
|
||||
더보기 <i class="fa fa-angle-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
<?php endif?>
|
||||
</header>
|
||||
|
||||
<div class="row gutter-half mt-3" data-role="bbs-list">
|
||||
|
||||
<?php $i=0;while($_R=db_fetch_array($_RCD)):$i++?>
|
||||
<div class="col">
|
||||
<div class="card" id="item-<?php echo $_R['uid'] ?>">
|
||||
<a class="text-nowrap text-truncate muted-link" href="<?php echo getBbsPostLink($_R)?>">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($_R),$size) ?>" alt="" class="card-img-top">
|
||||
</a>
|
||||
</div><!-- /.card -->
|
||||
</div><!-- /.col -->
|
||||
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
<?php if(!($i%$recnum)):?></div><div class="row gutter-half mt-3" data-role="bbs-list"><?php endif?>
|
||||
<?php endwhile?>
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):?>
|
||||
<div class="col"></div>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
</div> <!-- /.row -->
|
||||
</section><!-- /.widget -->
|
||||
1
widgets/bs4-default/bbs/all/gallery-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
게시판-갤러리형-01
|
||||
1
widgets/bs4-default/bbs/all/gallery-default/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
사용안내
|
||||
BIN
widgets/bs4-default/bbs/all/gallery-default/thumb.png
Normal file
|
After Width: | Height: | Size: 463 KiB |
22
widgets/bs4-default/bbs/all/list-default/_var.config.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'list-default' => array(
|
||||
'최근 게시물 리스트 기본형', //위젯명
|
||||
array(
|
||||
array('bid','bbs','게시판 선택',''),
|
||||
array('title','input','타이틀','전체 게시물'),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('link','input','링크연결','')
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
3
widgets/bs4-default/bbs/all/list-default/main.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.widget .list-group-item a {
|
||||
letter-spacing: -0.03125rem
|
||||
}
|
||||
29
widgets/bs4-default/bbs/all/list-default/main.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
$B = getDbData($table['bbslist'],'id="'.$wdgvar['bid'].'"','uid');
|
||||
?>
|
||||
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center py-2 border-bottom border-light">
|
||||
<strong><?php echo $wdgvar['title']?></strong>
|
||||
<?php if($wdgvar['link']):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="muted-link small">
|
||||
더보기 <i class="fa fa-angle-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
<?php endif?>
|
||||
</header>
|
||||
<ul class="list-group list-group-flush" data-role="bbs-list">
|
||||
|
||||
<?php $_RCD=getDbArray($table['bbsdata'],($wdgvar['bid']?'bbs='.$B['uid'].' and ':'').'display=1 and site='.$_HS['uid'],'*','gid','asc',$wdgvar['limit'],1)?>
|
||||
<?php while($_R=db_fetch_array($_RCD)):?>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center px-0" id="item-<?php echo $_R['uid'] ?>">
|
||||
<a class="text-nowrap text-truncate muted-link" href="<?php echo getBbsPostLink($_R)?>">
|
||||
<?php echo getStrCut($_R['subject'],$wdgvar['sbjcut'],'..')?>
|
||||
</a>
|
||||
<?php if(getNew($_R['d_regis'],24)):?><span class="rb-new mx-1"></span><?php endif?>
|
||||
<?php if($_R['comment']):?><span class="badge badge-light"><?php echo $_R['comment']?><?php if($_R['oneline']):?>+<?php echo $_R['oneline']?><?php endif?></span><?php endif?>
|
||||
</li>
|
||||
<?php endwhile?>
|
||||
<?php if(!db_num_rows($_RCD)):?><div class="none"></div><?php endif?>
|
||||
</ul>
|
||||
</section><!-- /.widget -->
|
||||
1
widgets/bs4-default/bbs/all/list-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
게시판-리스트형-01
|
||||
1
widgets/bs4-default/bbs/all/list-default/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
사용안내
|
||||
BIN
widgets/bs4-default/bbs/all/list-default/thumb.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'미디어셋 배너 점보트론', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀',''),
|
||||
array('category','mediasetcat','미디어셋 카테고리',''),
|
||||
array('limit','select','출력 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('autoplay','select','자동실행','2초=2000,3초=3000,4초=4000,5초=5000,안함=false','false'),
|
||||
array('linktarget','select','링크타켓','내부=_self,새창=_blank','_self'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
73
widgets/bs4-default/mediaset/banner/carousel-jumbo/main.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<style>
|
||||
.widget.carousel-jumbo .carousel-item {
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: auto auto
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$_mediasetque = 'site='.$s.' and category="'.$wdgvar['category'].'"';
|
||||
$_RCD=getDbArray($table['s_upload'],$_mediasetque,'*','pid','asc',$wdgvar['limit'],1);
|
||||
?>
|
||||
|
||||
<section class="widget carousel carousel-jumbo mb-4" class="carousel slide" data-ride="carousel" id="banner-main">
|
||||
|
||||
<?php if ($wdgvar['category']): ?>
|
||||
<ol class="carousel-indicators">
|
||||
<?php $i=0;foreach($_RCD as $_R):?>
|
||||
<li data-target="#banner-main" data-slide-to="<?php echo $i ?>" class="<?php echo $i==0?' active':'' ?>"></li>
|
||||
<?php $i++;endforeach?>
|
||||
</ol>
|
||||
|
||||
<div class="carousel-inner">
|
||||
<?php $i=0;foreach($_RCD as $_R):?>
|
||||
<div class="carousel-item<?php echo $i==0?' active':'' ?>" style="height: 350px;background-image: url('<?php echo $_R['src'] ?>')" >
|
||||
<?php if ($_R['linkurl']): ?>
|
||||
<a href="<?php echo $_R['linkurl'] ?>" target="<?php echo $wdgvar['linktarget'] ?>">
|
||||
<img src="/_core/images/blank.gif" alt="" style="width: 100%;height:350px">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5><?php echo $_R['caption'] ?></h5>
|
||||
<p><?php echo $_R['description'] ?></p>
|
||||
</div>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5><?php echo $_R['caption'] ?></h5>
|
||||
<p><?php echo $_R['description'] ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php $i++;endforeach?>
|
||||
</div>
|
||||
|
||||
<a class="carousel-control-prev" href="#banner-main" role="button" data-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">이전</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#banner-main" role="button" data-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">다음</span>
|
||||
</a>
|
||||
|
||||
<?php if(!db_num_rows($_RCD)):?>
|
||||
<div class="d-flex justify-content-center align-items-center text-muted bg-light" style="height: 350px">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="d-flex justify-content-center align-items-center text-muted bg-light" style="height: 350px">
|
||||
미디어셋 카테고리를 지정해 주세요.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$('.carousel').carousel({
|
||||
<?php if ($wdgvar['autoplay']!='false') echo 'interval: '.$wdgvar['autoplay'] ?>
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
배너 캐러셀점보
|
||||
BIN
widgets/bs4-default/mediaset/banner/carousel-jumbo/thumb.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'미디어셋 배너 그리드 기본형', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀',''),
|
||||
array('show_header','select','헤더출력','출력=show,숨김=hide','show'),
|
||||
array('category','mediasetcat','미디어셋 카테고리',''),
|
||||
array('line','select','한줄출력수','1개=col-12,2개=col-6,3개=col-4,4개=col-3,6개=col-2','col-6'),
|
||||
array('limit','select','전체출력수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','2'),
|
||||
array('linktarget','select','링크타켓','내부=_self,새창=_blank','_self'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
34
widgets/bs4-default/mediaset/banner/grid-default/main.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
$_mediasetque = 'site='.$s.' and category="'.$wdgvar['category'].'"';
|
||||
$_RCD=getDbArray($table['s_upload'],$_mediasetque,'*','pid','asc',$wdgvar['limit'],1);
|
||||
?>
|
||||
<section class="widget mb-3 ">
|
||||
|
||||
<div class="<?php echo $wdgvar['container']?$wdgvar['container']:$d['layout']['home_container'] ?>">
|
||||
|
||||
<div class="py-5">
|
||||
|
||||
<?php if ($wdgvar['show_header']=='show'): ?>
|
||||
<header>
|
||||
<h5 class="widget-title text-center mb-4">
|
||||
<?php echo $wdgvar['title'] ?>
|
||||
</h5>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row gutter-half">
|
||||
|
||||
<?php $i=0;foreach($_RCD as $_R):?>
|
||||
<div class="<?php echo $wdgvar['line'] ?>">
|
||||
<a href="<?php echo $_R['linkurl']?$_R['linkurl']:'#' ?>" target="<?php echo $wdgvar['linktarget'] ?>">
|
||||
<img src="<?php echo $_R['src'] ?>" class="img-fluid" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<?php $i++;endforeach?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
배너 그리드 기본
|
||||
@@ -0,0 +1 @@
|
||||
배너를 출력합니다.
|
||||
BIN
widgets/bs4-default/mediaset/banner/grid-default/thumb.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
25
widgets/bs4-default/member/best/card-default/_var.config.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'bs4-best-card' => array(
|
||||
'기간별 추천 채널', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀',''),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','노출갯수','1개=1,2개=2,3개=3,4개=4,5개=5'),
|
||||
array('line','select','한줄 아이템수','1개=1,2개=2,3개=3,4개=4,5개=5'),
|
||||
array('term','select','출력기간','최근1주=-1 week,최근2주=-2 week,최근3주=-3 week,최근1달=-4 week'),
|
||||
array('sort','select','정렬순','조회순=post_hit,좋아요순=post_likes,댓글순=post_comment'),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
103
widgets/bs4-default/member/best/card-default/main.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
$orderby = 'desc';
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$query = 'site='.$s.' and ';
|
||||
$_WHERE1= $query.'date >= '.date("Ymd", strtotime($wdgvar['term'])).' and '.$wdgvar['sort'].'>0';
|
||||
|
||||
if ($wdgvar['sort']=='post_hit') $_WHERE2= 'mbruid,sum(post_hit) as post_hit';
|
||||
if ($wdgvar['sort']=='post_likes') $_WHERE2= 'mbruid,sum(post_likes) as post_likes';
|
||||
if ($wdgvar['sort']=='post_dislikes') $_WHERE2= 'mbruid,sum(post_dislikes) as post_dislikes';
|
||||
if ($wdgvar['sort']=='post_comment') $_WHERE2= 'mbruid,sum(post_comment) as post_comment';
|
||||
if ($wdgvar['sort']=='follower') $_WHERE2= 'mbruid,sum(follower) as follower';
|
||||
|
||||
$_RCD = getDbSelect($table['s_mbrday'],$_WHERE1.' group by mbruid order by '.$wdgvar['sort'].' '.$orderby.' limit 0,'.$wdgvar['limit'],$_WHERE2);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['s_mbrdata'],'memberuid='.$_R['mbruid'],'*');
|
||||
?>
|
||||
|
||||
<section class="widget widget-profile-best-card mb-5">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="">
|
||||
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-2">emoji_events</i>
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<?php echo $wdgvar['title']?>
|
||||
<small class="ml-2 text-muted f13"><?php echo $wdgvar['subtitle']?></small>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo date("m/d", strtotime($wdgvar['term'])).'~'. date("m/d", strtotime("now")) ?>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm card-mask">
|
||||
<a href="<?php echo getProfileLink($R['memberuid']) ?>" class="position-relative">
|
||||
<img src="<?php echo getCoverSrc($R['memberuid'],600,350) ?>" class="card-img-top" alt="...">
|
||||
<span class="position-absolute badge badge-primary f15 px-2 rounded-0 rank-icon" style="left:0;top:0"><?php echo $i ?></span>
|
||||
<span class="position-absolute" data-role="avatar" style="left: 50%;bottom: -15px;margin-left: -32px;">
|
||||
<img src="<?php echo getAvatarSrc($R['memberuid'],'64') ?>" class="rounded-circle mr-3 shadow-sm" alt="..." style="width:64px">
|
||||
</span>
|
||||
</a>
|
||||
<div class="card-body pb-2 text-muted f14">
|
||||
<p class="card-text line-clamp-3 mb-2 text-center"><?php echo$R['nic'] ?></p>
|
||||
<p class="card-text mb-0">
|
||||
<span class="text-muted f13"><?php echo getStrCut(stripslashes($R['bio']),100,'..') ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer border-top-0 bg-white py-1 px-3 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">thumb_up</i>
|
||||
<span class="ml-1 f13"><?php echo $R['likes_post'] ?></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">thumb_down</i>
|
||||
<span class="ml-1 f13"><?php echo $R['dislikes_post'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">visibility</i>
|
||||
<span class="ml-1 f13"> <?php echo $R['hit_post'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if(!$_RCD):?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
</section>
|
||||
1
widgets/bs4-default/member/best/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -최신 포스트
|
||||
1
widgets/bs4-default/member/best/card-default/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
사용안내
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'최근 리스트', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀','최근 리스트'),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
array('link','input','링크연결',RW('m=post&mod=list'))
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
98
widgets/bs4-default/post/list/new/card-default/main.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$_WHERE = 'site='.$s;
|
||||
if ($my['uid']) $_WHERE .= ' and display > 3'; // 회원공개와 전체공개 리스트 출력
|
||||
else $_WHERE .= ' and display = 5'; // 전체공개 리스트만 출력
|
||||
|
||||
$RCD = getDbArray($table['postlist'],$_WHERE,'*','d_last','desc',$wdgvar['limit'],1);
|
||||
?>
|
||||
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="">
|
||||
|
||||
<div class="media align-items-center">
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<?php echo $wdgvar['title']?>
|
||||
<small class="ml-2 text-muted f13"><?php echo $wdgvar['subtitle']?></small>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<?php if($wdgvar['link']):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="btn btn-white btn-sm">더보기</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php if (db_num_rows($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm">
|
||||
<a class="position-relative" href="<?php echo getListLink($R,1) ?>">
|
||||
<img src="<?php echo getPreviewResize(getListImageSrc($R['uid']),'400x225') ?>" class="card-img-top" alt="...">
|
||||
<span class="list_mask">
|
||||
<span class="txt"><?php echo $R['num']?><i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
<div class="card-body p-3">
|
||||
|
||||
<div class="media mt-1">
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="mr-2">
|
||||
<img class="rounded-circle" src="<?php echo getAvatarSrc($R['mbruid'],'36') ?>" width="36" height="36" alt="">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h6 class="my-0 card-text line-clamp-1">
|
||||
<a class="text-reset text-decoration-none" href="<?php echo getListLink($R,1) ?>">
|
||||
<?php echo stripslashes($R['name']) ?>
|
||||
</a>
|
||||
</h6>
|
||||
<ul class="list-inline d-inline-block f13 text-muted mb-0">
|
||||
<li class="list-inline-item">
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="text-muted text-decoration-none">
|
||||
<?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
• <time class="text-muted" data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_last'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /.media -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php else:?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
</section>
|
||||
1
widgets/bs4-default/post/list/new/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -최신 리스트
|
||||
@@ -0,0 +1 @@
|
||||
신규등록된 리스트를 출력합니다.
|
||||
BIN
widgets/bs4-default/post/list/new/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'특정 리스트', //위젯명
|
||||
array(
|
||||
array('listid','postlist','내 리스트',''),
|
||||
array('title','hidden','',''),
|
||||
array('avatar','select','아바타 출력','출력=true,미출력=false','false'),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
102
widgets/bs4-default/post/list/view/card-default/main.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$LIST=getDbData($table['postlist'],"id='".$wdgvar['listid']."'",'*');
|
||||
|
||||
$_postque = 'site='.$s.' and list="'.$LIST['uid'].'"';
|
||||
$_RCD=getDbArray($table['postlist_index'],$_postque,'*','gid','asc',$wdgvar['limit'],1);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'uid='.$_R['data'],'*');
|
||||
?>
|
||||
|
||||
<?php if ($wdgvar['listid']): ?>
|
||||
<section class="widget mb-4">
|
||||
<div class="<?php echo $wdgvar['container']?$wdgvar['container']:$d['layout']['home_container'] ?>">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
|
||||
<?php if ($LIST['uid']): ?>
|
||||
<div class="">
|
||||
<div class="media align-items-center">
|
||||
<?php if ($wdgvar['avatar']=='true'): ?>
|
||||
<a href="<?php echo getProfileLink($LIST['mbruid']) ?>" class="mr-3">
|
||||
<img src="<?php echo getAvatarSrc($LIST['mbruid'],'32') ?>" class="rounded-circle" alt="..." style="width:32px">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="media-body">
|
||||
<h5 class="widget-title my-0">
|
||||
<a href="<?php echo getListLink($LIST,1) ?>" class="text-decoration-none text-reset">
|
||||
<?php echo $LIST['name'] ?>
|
||||
</a>
|
||||
<a href="<?php echo getProfileLink($LIST['mbruid']) ?>" class="ml-2 text-decoration-none text-muted f13">
|
||||
<?php echo getProfileInfo($LIST['mbruid'],'nic') ?>
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo getListLink($LIST,1) ?>" class="btn btn-white btn-sm">더보기</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-danger">
|
||||
리스트 아이디를 확인해주세요.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm">
|
||||
<a class="position-relative" href="<?php echo getPostLink($R,0) ?>">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'400x225') ?>" class="card-img-top" alt="...">
|
||||
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo getUpImageTime($R) ?></time>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<p class="card-text line-clamp-2 mb-2">
|
||||
<a class="text-reset text-decoration-none" href="<?php echo getPostLink($R,0) ?>">
|
||||
<?php echo getStrCut(stripslashes($R['subject']),100,'..') ?>
|
||||
</a>
|
||||
</p>
|
||||
<ul class="list-inline d-inline-block f13 text-muted mb-0">
|
||||
<li class="list-inline-item">조회수 <?php echo $R['hit']?>회</li>
|
||||
<li class="list-inline-item">
|
||||
•<time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if(!db_num_rows($_RCD)):?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
</div>
|
||||
</section>
|
||||
<?php else: ?>
|
||||
<div class="container">
|
||||
<div class="p-5 mb-4 text-muted text-center border">리스트 아이디를 지정해주세요.</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
1
widgets/bs4-default/post/list/view/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -리스트뷰
|
||||
@@ -0,0 +1 @@
|
||||
지정한 리스트의 포스트를 출력합니다.
|
||||
BIN
widgets/bs4-default/post/list/view/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'기간별 추천 포스트', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀',''),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
array('term','select','출력기간','최근1주=-1 week,최근2주=-2 week,최근3주=-3 week,최근1달=-4 week'),
|
||||
array('sort','select','정렬순','조회순=hit,좋아요순=likes,댓글순=comment'),
|
||||
array('link','input','링크연결','')
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
18
widgets/bs4-default/post/post/best/card-default/main.css
Normal file
@@ -0,0 +1,18 @@
|
||||
.widget-post-best-card .rank-icon {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.widget-post-best-card .card.card-mask .position-relative::before {
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.widget-post-best-card .card.card-mask .position-relative:hover::before {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
1
widgets/bs4-default/post/post/best/card-default/main.js
Normal file
@@ -0,0 +1 @@
|
||||
alert('bs4-post-best-card 입니다.')
|
||||
104
widgets/bs4-default/post/post/best/card-default/main.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
$query = 'site='.$s;
|
||||
if ($my['uid']) $query .= ' and display>3';
|
||||
else $query .= ' and display=5';
|
||||
|
||||
$_WHERE1= $query.' and date >= '.date("Ymd", strtotime($wdgvar['term'])).' and '.$wdgvar['sort'].'>0';
|
||||
|
||||
if ($wdgvar['sort']=='hit') $_WHERE2= 'data,sum(hit) as hit';
|
||||
if ($wdgvar['sort']=='likes') $_WHERE2= 'data,sum(likes) as likes';
|
||||
if ($wdgvar['sort']=='comment') $_WHERE2= 'data,sum(comment) as comment';
|
||||
|
||||
$orderby = 'desc';
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
|
||||
$_RCD = getDbSelect($table['postday'],$_WHERE1.' group by data order by '.$wdgvar['sort'].' '.$orderby.' limit 0,'.$wdgvar['limit'],$_WHERE2);
|
||||
|
||||
if (db_num_rows($_RCD) > $recnum) $totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
else $totalCardRow = 1;
|
||||
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'uid='.$_R['data'],'*');
|
||||
?>
|
||||
|
||||
<section class="widget widget-post-best-card mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="">
|
||||
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-2">emoji_objects</i>
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<?php echo $wdgvar['title']?>
|
||||
<small class="ml-2 text-muted f13"><?php echo $wdgvar['subtitle']?></small>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm card-mask">
|
||||
<a href="<?php echo getPostLink($R,0) ?>" class="position-relative">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'400x225') ?>" class="card-img-top" alt="...">
|
||||
<span class="position-absolute badge badge-primary f15 px-2 rounded-0 rank-icon" style="left:0;top:0"><?php echo $i ?></span>
|
||||
<time class="badge badge-dark rounded-0 position-absolute f14 font-weight-light" style="right:0;bottom:0"><?php echo getUpImageTime($R) ?></time>
|
||||
</a>
|
||||
<div class="card-body pb-0 f14">
|
||||
<a href="<?php echo getPostLink($R,0) ?>" class="text-reset text-decoration-none line-clamp-2 mb-1"><?php echo$R['subject'] ?></a>
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="d-block f13 text-muted text-decoration-none">
|
||||
<?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-footer border-top-0 bg-white py-1 px-3 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">thumb_up</i>
|
||||
<span class="ml-1 f13"><?php echo $R['likes'] ?></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">visibility</i>
|
||||
<span class="ml-1 f13"><?php echo $R['hit'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">comment</i>
|
||||
<span class="ml-1 f13"> <?php echo $R['comment'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
|
||||
</section>
|
||||
1
widgets/bs4-default/post/post/best/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -베스트 포스트
|
||||
@@ -0,0 +1 @@
|
||||
지정된 기간에서 조회수,댓글수,좋아요수 순으로 포스트를 출력합니다.
|
||||
BIN
widgets/bs4-default/post/post/best/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'특정 카테고리', //위젯명
|
||||
array(
|
||||
array('cat','postcat','카테고리',''),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
95
widgets/bs4-default/post/post/cat/card-default/main.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
$wdgvar['link'] = RW('mod=dashboard&page=post');
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$CAT = getDbData($table['postcategory'],"id='".$wdgvar['cat']."'",'*');
|
||||
|
||||
include_once $g['path_module'].'post/_main.php';
|
||||
|
||||
$_postque = 'site='.$s.' and ('.getPostCategoryCodeToSql($table['postcategory'],$wdgvar['cat']).')';
|
||||
if (!$my['uid']) $_postque .= ' and display<>4';
|
||||
|
||||
$_RCD=getDbArray($table['postcategory_index'],$_postque,'*','gid','asc',$wdgvar['limit'],1);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'uid='.$_R['data'],'*');
|
||||
?>
|
||||
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
|
||||
<?php if ($CAT['uid']): ?>
|
||||
<div class="">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-2">folder</i>
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<a href="#" class="text-reset text-decoration-none">
|
||||
<?php echo $CAT['name'] ?>
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="#" class="btn btn-white btn-sm">더보기</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-danger">
|
||||
카테고리 아이디를 확인해주세요.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm">
|
||||
<a class="position-relative" href="<?php echo getPostLink($R,0) ?>">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'400x225') ?>" class="card-img-top" alt="...">
|
||||
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo getUpImageTime($R) ?></time>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<p class="card-text line-clamp-2 mb-2">
|
||||
<a class="text-reset text-decoration-none" href="<?php echo getPostLink($R,0) ?>">
|
||||
<?php echo getStrCut(stripslashes($R['subject']),100,'..') ?>
|
||||
</a>
|
||||
</p>
|
||||
<ul class="list-inline d-inline-block f13 text-muted mb-0">
|
||||
<li class="list-inline-item">조회수 <?php echo $R['hit']?>회</li>
|
||||
<li class="list-inline-item">
|
||||
•<time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if(!$_RCD):?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
</section>
|
||||
1
widgets/bs4-default/post/post/cat/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -카테고리별 포스트
|
||||
@@ -0,0 +1 @@
|
||||
지정한 카테고리에 등록된 포스트를 출력합니다.
|
||||
BIN
widgets/bs4-default/post/post/cat/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'최근 포스트', //위젯명
|
||||
array(
|
||||
array('title','input','타이틀','최근 포스트'),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
array('link','input','링크연결',RW('m=post'))
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
85
widgets/bs4-default/post/post/new/card-default/main.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
if ($my['uid']) $_postque = 'site='.$s.' and display>3';
|
||||
else $_postque = 'site='.$s.' and display=5';
|
||||
|
||||
$_RCD=getDbArray($table['postindex'],$_postque,'*','gid','asc',$wdgvar['limit'],1);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
?>
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="">
|
||||
|
||||
<div class="media align-items-center">
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<?php echo $wdgvar['title']?>
|
||||
<small class="ml-2 text-muted f13"><?php echo $wdgvar['subtitle']?></small>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<?php if($wdgvar['link']):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="btn btn-white btn-sm">더보기</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm">
|
||||
<a class="position-relative" href="<?php echo getPostLink($R,0) ?>">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'400x225') ?>" class="card-img-top" alt="...">
|
||||
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo getUpImageTime($R) ?></time>
|
||||
</a>
|
||||
<div class="card-body py-3">
|
||||
<p class="card-text line-clamp-2 mb-2">
|
||||
<a class="text-reset text-decoration-none" href="<?php echo getPostLink($R,0) ?>">
|
||||
<?php echo getStrCut(stripslashes($R['subject']),100,'..') ?>
|
||||
</a>
|
||||
</p>
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="d-block f14 text-muted text-decoration-none">
|
||||
<?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?>
|
||||
</a>
|
||||
<ul class="list-inline d-inline-block f13 text-muted mb-0">
|
||||
<li class="list-inline-item">조회수 <?php echo $R['hit']?>회</li>
|
||||
<li class="list-inline-item">
|
||||
•<time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php else:?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
</section>
|
||||
1
widgets/bs4-default/post/post/new/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -최신 포스트
|
||||
@@ -0,0 +1 @@
|
||||
최근 포스트를 지정된 갯수만큼 출력합니다.
|
||||
BIN
widgets/bs4-default/post/post/new/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
//***********************************************************************************
|
||||
// 여기에 이 위젯에서 사용할 변수들을 정의합니다.
|
||||
// 변수 작성법은 매뉴얼을 참고하세요.
|
||||
//***********************************************************************************
|
||||
|
||||
$d['widget']['dom'] = array(
|
||||
|
||||
'card-default' => array(
|
||||
'특정 카테고리', //위젯명
|
||||
array(
|
||||
array('tag','input','태그',''),
|
||||
array('subtitle','input','보조 타이틀',''),
|
||||
array('limit','select','총 항목수','1개=1,2개=2,3개=3,4개=4,5개=5,6개=6,7개=7,8개=8,9개=9,10개=10,11개=11,12개=12','4'),
|
||||
array('line','select','한줄 항목수','1개=1,2개=2,3개=3,4개=4,5개=5','2'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
122
widgets/bs4-default/post/post/tag/card-default/main.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
$recnum = $wdgvar['line']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$where = $where?$where:'subject|tag|review';
|
||||
$sort = 'gid';
|
||||
$orderby= 'asc';
|
||||
|
||||
$_WHERE = 'site='.$s;
|
||||
if (!$my['uid']) $_WHERE .= ' and display=5';
|
||||
else $_WHERE .= ' and display>3';
|
||||
$_WHERE .= getSearchSql($where,$wdgvar['tag'],$ikeyword,'or');
|
||||
|
||||
$TCD = getDbArray($table['postdata'],$_WHERE,'*',$sort,$orderby,$wdgvar['limit'],1);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
?>
|
||||
|
||||
<?php if ($wdgvar['tag']): ?>
|
||||
<section class="widget mb-4">
|
||||
<header class="d-flex justify-content-between align-items-center mb-2">
|
||||
|
||||
<?php if ($wdgvar['tag']): ?>
|
||||
<div class="">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-2">flag</i>
|
||||
<div class="media-body">
|
||||
<h5 class="my-0">
|
||||
<?php if ($wdgvar['tag']): ?>
|
||||
#<?php echo $wdgvar['tag'] ?>
|
||||
<?php else: ?>
|
||||
<span class="text-danger">키워드를 설정해 주세요.</span>
|
||||
<?php endif; ?>
|
||||
<small class="ml-2 text-muted f13"><?php echo $wdgvar['subtitle'] ?></small>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo RW('m=post&mod=keyword&') ?>keyword=<?php echo $wdgvar['tag'] ?>" class="btn btn-white btn-sm">더보기</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-danger">
|
||||
태그를 설정해 주세요.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
|
||||
<div class="card-deck">
|
||||
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-white border-bottom-0 text-muted f13">
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="text-reset text-decoration-none">
|
||||
<img src="<?php echo getAvatarSrc($R['mbruid'],'24') ?>" class="rounded-circle mr-2" alt="" style="width:24px"> <?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?>
|
||||
<span class="ml-1">• <time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body pt-0 pb-2 f14">
|
||||
|
||||
<a href="<?php echo getPostLink($R,0) ?>" class="media text-reset text-decoration-none">
|
||||
<div class="media-body">
|
||||
<div class="line-clamp-1">
|
||||
<?php echo getStrCut(stripslashes($R['subject']),100,'..') ?>
|
||||
</div>
|
||||
<div class="line-clamp-4 f13 text-muted ">
|
||||
<?php echo $R['review'] ?>
|
||||
</div>
|
||||
</div>
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'100x100') ?>" class="ml-3" alt="...">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="card-footer border-top-0 bg-white py-1 px-3 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">thumb_up</i>
|
||||
<span class="ml-1 f13"><?php echo $R['likes'] ?></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">thumb_down</i>
|
||||
<span class="ml-1 f13"><?php echo $R['dislikes'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none">
|
||||
<i class="material-icons align-text-bottom f20">comment</i>
|
||||
<span class="ml-1 f13"><?php echo $R['comment'] ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
<?php if(!db_num_rows($TCD)):?>
|
||||
<div class="card text-center text-muted p-5">
|
||||
자료가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
</section>
|
||||
<?php else: ?>
|
||||
<div class="p-5 mb-4 text-muted text-center border">태그를 지정해 주세요.</div>
|
||||
<?php endif; ?>
|
||||
1
widgets/bs4-default/post/post/tag/card-default/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
데스크탑 -태그별 포스트
|
||||
@@ -0,0 +1 @@
|
||||
지정한 태그가 등록된 포스트를 출력합니다.
|
||||
BIN
widgets/bs4-default/post/post/tag/card-default/thumb.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
135
widgets/bs4-default/site/menu/navbar/dropdown-hover/main.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<style>
|
||||
[data-role="menu"] .dropdown>.dropdown-menu {
|
||||
margin-top: 0;
|
||||
transition: 0.3s all ease-in-out;
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown:hover>.dropdown-menu {
|
||||
display: block;
|
||||
top: 80%;
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown>.dropdown-toggle:active {
|
||||
/*Without this, clicking will make it sticky*/
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown-submenu>a:after {
|
||||
content: "\f0da";
|
||||
float: right;
|
||||
border: none;
|
||||
font-family: 'FontAwesome';
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown-submenu>.dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: 0px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
[data-role="menu"] .dropdown-submenu:hover>.dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
if (!function_exists('getMenuWidgetTree'))
|
||||
{
|
||||
function getMenuWidgetTree($site,$table,$is_child,$parent,$depth,$id,$w,$_C)
|
||||
{
|
||||
global $_CA;
|
||||
|
||||
if ($depth < $w['limit'])
|
||||
{
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'hidden=0 and parent='.$parent.' and depth='.($depth+1).($w['mobile']?' and mobile=1':'').' order by gid asc','*');
|
||||
echo "\n";
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
if($is_child)
|
||||
{
|
||||
echo "<ul".($w['dropdown']?' class="dropdown-menu" role="menu" aria-labelledby="dLabel"':'').">\n";
|
||||
if ($w['dropdown'] && $w['dispfmenu'])
|
||||
{
|
||||
echo $_C['link'];
|
||||
echo '<div class="dropdown-divider"></div>'."\n";
|
||||
}
|
||||
}
|
||||
if ($depth==1) echo '<span class="dropdown-menu-arrow"></span>';
|
||||
|
||||
$i=0;while($C=db_fetch_array($CD))
|
||||
{
|
||||
$i++;
|
||||
$_newTree = ($id?$id.'/':'').$C['id'];
|
||||
$_href = $w['link']=='bookmark'?' data-scroll href="#'.($C['is_child']&&$w['limit']>1&&!$parent&&$w['dropdown']?'':str_replace('/','-',$_newTree)).'"' : ' href="'.RW('c='.$_newTree).'"';
|
||||
$_dropdown = $w['dropdown']&&$C['is_child']&&$C['depth']==($w['depth']+1)&&$w['olimit']>1?' class=""':'';
|
||||
$_name = $C['name'];
|
||||
$_target = $C['target']=='_blank'?' target="_blank"':'';
|
||||
$_addattr = $C['addattr']?' '.$C['addattr']:'';
|
||||
|
||||
for ($i=0;$i<$C['depth'];$i++) echo "\t";
|
||||
|
||||
if ($_dropdown) echo '<li class="nav-item dropdown'.(in_array($C['id'],$_CA)?' active':'').'"><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
|
||||
else {
|
||||
if ($is_child) {
|
||||
echo '<li class="'.($C['is_child'] && ($i<$w['limit'])?'dropdown-submenu ':'').'"><a class="dropdown-item'.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
|
||||
} else {
|
||||
echo '<li'.(in_array($C['id'],$_CA)?' class="nav-item active"':' class="nav-item"').'><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($C['is_child'])
|
||||
{
|
||||
$C['link'] = '<li><a class="dropdown-item"'.$_addattr.$_href.$_target.'>'.$C['name'].'</a></li>';
|
||||
getMenuWidgetTree($site,$table,$C['is_child'],$C['uid'],$C['depth'],$_newTree,$w,$C);
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
if($is_child) echo "</ul>\n";
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
}
|
||||
}
|
||||
}
|
||||
$wddvar['limit'] = $wddvar['limit'] < 6 ? $wddvar['limit'] : 5;
|
||||
if ($wdgvar['smenu'] < 0)
|
||||
{
|
||||
if (strstr($c,'/'))
|
||||
{
|
||||
$wdgvar['mnarr'] = explode('/',$c);
|
||||
$wdgvar['count'] = (- $wdgvar['smenu']) - 1;
|
||||
for ($j = 0; $j <= $wdgvar['count']; $j++) $wdgvar['sid'] .= $wdgvar['mnarr'][$j].'/';
|
||||
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
|
||||
$wdgvar['path'] = getDbData($table['s_menu'],"id='".$wdgvar['mnarr'][$wdgvar['count']]."'",'uid,depth');
|
||||
$wdgvar['smenu'] = $wdgvar['path']['uid'];
|
||||
$wdgvar['depth'] = $wdgvar['path']['depth'];
|
||||
}
|
||||
else {
|
||||
$wdgvar['sid'] = $c;
|
||||
$wdgvar['smenu'] = $_HM['uid'];
|
||||
$wdgvar['depth'] = $_HM['depth'];
|
||||
}
|
||||
}
|
||||
else if ($wdgvar['smenu'])
|
||||
{
|
||||
$wdgvar['mnarr'] = explode('/',$wdgvar['smenu']);
|
||||
$wdgvar['count'] = count($wdgvar['mnarr']);
|
||||
for ($j = 0; $j < $wdgvar['count']; $j++)
|
||||
{
|
||||
$wdgvar['path'] = getDbData($table['s_menu'],'uid='.(int)$wdgvar['mnarr'][$j],'uid,id,depth');
|
||||
$wdgvar['sid'] .= $wdgvar['path']['id'].'/';
|
||||
$wdgvar['smenu'] = $wdgvar['path']['uid'];
|
||||
$wdgvar['depth'] = $wdgvar['path']['depth'];
|
||||
}
|
||||
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
|
||||
}
|
||||
else {
|
||||
$wdgvar['depth'] = 0;
|
||||
}
|
||||
$wdgvar['olimit']= $wdgvar['limit'];
|
||||
$wdgvar['limit'] = $wdgvar['limit'] + $wdgvar['depth'];
|
||||
getMenuWidgetTree($s,$table['s_menu'],0,$wdgvar['smenu'],$wdgvar['depth'],$wdgvar['sid'],$wdgvar,array());
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
데스크탑-상단 네비바 메뉴
|
||||
BIN
widgets/bs4-default/site/menu/navbar/dropdown-hover/thumb.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
203
widgets/bs4-default/site/menu/navbar/mega-3depth/main.php
Normal file
@@ -0,0 +1,203 @@
|
||||
<style media="screen">
|
||||
|
||||
.header [data-role="menu"] .nav-item .sub-item {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
top: 73px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #d4d4d4;
|
||||
border-bottom: 1px solid #d4d4d4;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
|
||||
}
|
||||
|
||||
body.header-type2 .navbar [data-role="menu"] .nav-item .sub-item {
|
||||
top: 108px
|
||||
}
|
||||
body.header-type3 .header [data-role="menu"] .nav-item .sub-item {
|
||||
top: 166px;
|
||||
}
|
||||
|
||||
.header .nav .nav-item.hovered .sub-item {
|
||||
display: block;
|
||||
}
|
||||
.header .nav .nav-item .sub-item .col:hover {
|
||||
background-color: #f5f5f5
|
||||
}
|
||||
.header .nav .nav-item .sub-item .col:first-child {
|
||||
border-left: 1px solid #d4d4d4;
|
||||
}
|
||||
.header .nav .nav-item .sub-item .col {
|
||||
border-right: 1px solid #d4d4d4;
|
||||
}
|
||||
.header .sub-item .col h4 a {
|
||||
font-size: 16px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
.header .sub-item .col h4 a.active,
|
||||
.header .sub-item .col .nav a.active {
|
||||
color: #007bff;
|
||||
}
|
||||
.header .sub-item .col a {
|
||||
font-size: 13px;
|
||||
color: #333
|
||||
}
|
||||
.header .sub-item .col a:hover {
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
.header .dropdown-menu {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.header .dropdown-menu::after {
|
||||
top: -14px;
|
||||
left: 30px;
|
||||
right: auto;
|
||||
}
|
||||
.header .dropdown-menu-right::after {
|
||||
right: 20px;
|
||||
left: auto;
|
||||
}
|
||||
.header .dropdown-menu::before, .dropdown-menu::after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
content: "";
|
||||
}
|
||||
.header .dropdown-menu::after {
|
||||
/* border: 7px solid transparent; */
|
||||
/* border-bottom-color: #fff; */
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<?php
|
||||
if (!function_exists('getMenuWidgetTree'))
|
||||
{
|
||||
function getMenuWidgetTree($site,$table,$is_child,$parent,$depth,$id,$w,$_C)
|
||||
{
|
||||
global $_CA,$d;
|
||||
|
||||
$_container = $d['layout']['header_container'];
|
||||
|
||||
if ($depth < $w['limit'])
|
||||
{
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'hidden=0 and parent='.$parent.' and depth='.($depth+1).($w['mobile']?' and mobile=1':'').' order by gid asc','*');
|
||||
echo "\n";
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
|
||||
if($is_child) {
|
||||
if ($_C['depth']==1) {
|
||||
echo "<div class='sub-item'><div class='".$_container."'><div class='row w-100'>\n";
|
||||
} else {
|
||||
echo "<nav class='nav flex-column'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
while($C=db_fetch_array($CD))
|
||||
{
|
||||
$_newTree = ($id?$id.'/':'').$C['id'];
|
||||
$_href = $w['link']=='bookmark'?' data-scroll href="#'.($C['is_child']&&$w['limit']>1&&!$parent?'':str_replace('/','-',$_newTree)).'"' : ' href="'.RW('c='.$_newTree).'"';
|
||||
$_dropdown = $C['is_child']&&$C['depth']==($w['depth']+1)&&$w['olimit']>1?' class="nav-link"':'';
|
||||
$_name = $C['name'];
|
||||
$_target = $C['target']=='_blank'?' target="_blank"':'';
|
||||
$_addattr = $C['addattr']?' '.$C['addattr']:'';
|
||||
|
||||
for ($i=0;$i<$C['depth'];$i++) echo "\t";
|
||||
|
||||
if ($_C['depth']==1) {
|
||||
echo '<div class="col py-4 px-2"><h4 class="mb-0"><a class="nav-link'.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a></h4>';
|
||||
} else if ($_C['depth']==2) {
|
||||
echo '<a class="nav-link '.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
|
||||
} else {
|
||||
echo '<li class="nav-item'.(in_array($C['id'],$_CA)?' active':'').'"><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
|
||||
}
|
||||
|
||||
if ($C['is_child']){
|
||||
getMenuWidgetTree($site,$table,$C['is_child'],$C['uid'],$C['depth'],$_newTree,$w,$C);
|
||||
}
|
||||
|
||||
if ($_C['depth']==1) {
|
||||
echo "</nav></div>\n";
|
||||
} else if ($_C['depth']==2) {
|
||||
echo "\n";
|
||||
} else {
|
||||
echo "</li>\n";
|
||||
}
|
||||
}
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
|
||||
if($is_child) {
|
||||
if ($_C['depth']==1) {
|
||||
echo "</div></div></div>\n";
|
||||
} else if ($_C['depth']==2) {
|
||||
echo "\n";
|
||||
} else {
|
||||
echo "</nav></div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
for ($i=0;$i<$depth;$i++) echo "\t";
|
||||
}
|
||||
}
|
||||
}
|
||||
$wddvar['limit'] = $wddvar['limit'] < 6 ? $wddvar['limit'] : 5;
|
||||
if ($wdgvar['smenu'] < 0)
|
||||
{
|
||||
if (strstr($c,'/'))
|
||||
{
|
||||
$wdgvar['mnarr'] = explode('/',$c);
|
||||
$wdgvar['count'] = (- $wdgvar['smenu']) - 1;
|
||||
for ($j = 0; $j <= $wdgvar['count']; $j++) $wdgvar['sid'] .= $wdgvar['mnarr'][$j].'/';
|
||||
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
|
||||
$wdgvar['path'] = getDbData($table['s_menu'],"id='".$wdgvar['mnarr'][$wdgvar['count']]."'",'uid,depth');
|
||||
$wdgvar['smenu'] = $wdgvar['path']['uid'];
|
||||
$wdgvar['depth'] = $wdgvar['path']['depth'];
|
||||
}
|
||||
else {
|
||||
$wdgvar['sid'] = $c;
|
||||
$wdgvar['smenu'] = $_HM['uid'];
|
||||
$wdgvar['depth'] = $_HM['depth'];
|
||||
}
|
||||
}
|
||||
else if ($wdgvar['smenu'])
|
||||
{
|
||||
$wdgvar['mnarr'] = explode('/',$wdgvar['smenu']);
|
||||
$wdgvar['count'] = count($wdgvar['mnarr']);
|
||||
for ($j = 0; $j < $wdgvar['count']; $j++)
|
||||
{
|
||||
$wdgvar['path'] = getDbData($table['s_menu'],'uid='.(int)$wdgvar['mnarr'][$j],'uid,id,depth');
|
||||
$wdgvar['sid'] .= $wdgvar['path']['id'].'/';
|
||||
$wdgvar['smenu'] = $wdgvar['path']['uid'];
|
||||
$wdgvar['depth'] = $wdgvar['path']['depth'];
|
||||
}
|
||||
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
|
||||
}
|
||||
else {
|
||||
$wdgvar['depth'] = 0;
|
||||
}
|
||||
$wdgvar['olimit']= $wdgvar['limit'];
|
||||
$wdgvar['limit'] = $wdgvar['limit'] + $wdgvar['depth'];
|
||||
getMenuWidgetTree($s,$table['s_menu'],0,$wdgvar['smenu'],$wdgvar['depth'],$wdgvar['sid'],$wdgvar,array());
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
$('[data-role="menu"] .nav-item').hover(
|
||||
function() {
|
||||
$(this).addClass('hovered');
|
||||
},
|
||||
function() {
|
||||
$(this).removeClass('hovered');
|
||||
}
|
||||
);
|
||||
$(window).on('scroll', function() {
|
||||
$('[data-role="menu"] .nav-item').removeClass('hovered');
|
||||
});
|
||||
|
||||
</script>
|
||||
BIN
widgets/bs4-default/site/menu/navbar/mega-3depth/thumb.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
39
widgets/bs4-default/site/menu/quickmenu/card-menu/main.css
Normal file
@@ -0,0 +1,39 @@
|
||||
.widget-quick .card {
|
||||
background-size: cover
|
||||
}
|
||||
.widget-quick .card::before {
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
opacity: 1 !important;
|
||||
content: '';
|
||||
transform: translate(0px, 0px);
|
||||
transition-timing-function: ease-in;
|
||||
transition-duration: 0.3s;
|
||||
background-color: rgba(0, 0, 0, 0.4) !important;
|
||||
}
|
||||
|
||||
.widget-quick .card:hover::before {
|
||||
background-color: rgba(0, 0, 0, 0.7) !important;
|
||||
}
|
||||
|
||||
.widget-quick .card-title {
|
||||
min-height: 50px
|
||||
}
|
||||
|
||||
.widget-quick .card-body {
|
||||
margin-top: 4.5rem;
|
||||
margin-bottom: 4.5rem;
|
||||
z-index: 1
|
||||
}
|
||||
.widget-quick a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.widget-quick .card-text {
|
||||
width: 70%;
|
||||
margin: 20px auto 0;
|
||||
padding-top: 20px;
|
||||
border-top: 2px solid #5cccfa
|
||||
}
|
||||
29
widgets/bs4-default/site/menu/quickmenu/card-menu/main.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<h3><?php echo $wdgvar['title'] ?></h3>
|
||||
<section class="widget-quick">
|
||||
<div class="row gutter-half">
|
||||
<?php
|
||||
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar['smenu']."'",'uid');
|
||||
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
|
||||
?>
|
||||
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
|
||||
|
||||
<?php
|
||||
if($_M2['upload']) {
|
||||
$ufilesArray = getArrayString($_M2['upload']);
|
||||
$_IMG = getDbData($table['s_upload'], 'uid='.$ufilesArray['data'][0], '*');
|
||||
$Topimg_URL = $_IMG['url'].$_IMG['folder'].'/'.$_IMG['tmpname'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="col-4 mb-3">
|
||||
<div class="card text-center bg-secondary border-0" <?php if ($_M2['upload']): ?>style="background-image: url('<?php echo getPreviewResize($Topimg_URL,'z')?>')"<?php endif; ?>>
|
||||
<a href="<?php echo RW('c='.$wdgvar['smenu'].'/'.$_M2['id'])?>" class="card-body text-white">
|
||||
<h4 class="card-title"><?php echo $_M2['addinfo']?> </h4>
|
||||
<p class="card-text mb-0"><?php echo $_M2['name']?></p>
|
||||
</a>
|
||||
</div><!-- /.card -->
|
||||
</div><!-- /.col-4 -->
|
||||
<?php endwhile?>
|
||||
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
$wdgvar_smenu_arr = explode('/' , $wdgvar['smenu']);
|
||||
$wdgvar_smenu_arr_end = array_pop($wdgvar_smenu_arr);
|
||||
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar_smenu_arr_end."'",'uid,name');
|
||||
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
|
||||
?>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-white btn-sm dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 170px">
|
||||
<?php echo $_MENUQ1['name'] ?>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow-sm f14" style="min-width: 170px">
|
||||
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
|
||||
<a class="dropdown-item" href="<?php echo $_M2['joint']?>" target="_blank">
|
||||
<?php echo $_M2['name']?>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
드롭다운 조인트
|
||||
@@ -0,0 +1 @@
|
||||
사용안내
|
||||
BIN
widgets/bs4-default/site/menu/quickmenu/dropdown-joint/thumb.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
14
widgets/bs4-default/site/menu/quickmenu/list-inline/main.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$wdgvar_smenu_arr = explode('/' , $wdgvar['smenu']);
|
||||
$wdgvar_smenu_arr_end = array_pop($wdgvar_smenu_arr);
|
||||
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar_smenu_arr_end."'",'uid,name');
|
||||
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
|
||||
?>
|
||||
|
||||
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
|
||||
<li class="list-inline-item">
|
||||
<a class="muted-link" href="<?php echo RW('c='.$wdgvar['smenu'].'/'.$_M2['id'])?>">
|
||||
<?php echo $_M2['name']?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endwhile?>
|
||||
@@ -0,0 +1 @@
|
||||
리스트 인라인
|
||||
@@ -0,0 +1 @@
|
||||
사용안내
|
||||
BIN
widgets/bs4-default/site/menu/quickmenu/list-inline/thumb.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |