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

View File

@@ -0,0 +1,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'))
),
),
);
?>

View 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>

View File

@@ -0,0 +1 @@
데스크탑 -최신 리스트

View File

@@ -0,0 +1 @@
신규등록된 리스트를 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -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'),
),
),
);
?>

View 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; ?>

View File

@@ -0,0 +1 @@
데스크탑 -리스트뷰

View File

@@ -0,0 +1 @@
지정한 리스트의 포스트를 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

View File

@@ -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','링크연결','')
),
),
);
?>

View 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);
}

View File

@@ -0,0 +1 @@
alert('bs4-post-best-card 입니다.')

View 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>

View File

@@ -0,0 +1 @@
데스크탑 -베스트 포스트

View File

@@ -0,0 +1 @@
지정된 기간에서 조회수,댓글수,좋아요수 순으로 포스트를 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View File

@@ -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'),
),
),
);
?>

View 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>

View File

@@ -0,0 +1 @@
데스크탑 -카테고리별 포스트

View File

@@ -0,0 +1 @@
지정한 카테고리에 등록된 포스트를 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

View File

@@ -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'))
),
),
);
?>

View 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>

View File

@@ -0,0 +1 @@
데스크탑 -최신 포스트

View File

@@ -0,0 +1 @@
최근 포스트를 지정된 갯수만큼 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@@ -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'),
),
),
);
?>

View 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; ?>

View File

@@ -0,0 +1 @@
데스크탑 -태그별 포스트

View File

@@ -0,0 +1 @@
지정한 태그가 등록된 포스트를 출력합니다.

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB