first
This commit is contained in:
23
widgets/bs4-default/bbs/all/gallery-default/_var.config.php
Normal file
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
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
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
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
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
BIN
widgets/bs4-default/bbs/all/gallery-default/thumb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 463 KiB |
Reference in New Issue
Block a user