update
This commit is contained in:
parent
3ef96300e8
commit
9785239def
1 changed files with 51 additions and 40 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_'))
|
if (!defined('_GNUBOARD_'))
|
||||||
exit; ?>
|
exit;
|
||||||
<?php if ($board['bo_4'] == 2) {
|
|
||||||
add_stylesheet('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">', 0); ?>
|
if ($board['bo_4'] == 2) {
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script>
|
add_stylesheet('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">', 0);
|
||||||
<?php } ?>
|
add_javascript('<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script>', 0);
|
||||||
<?php
|
}
|
||||||
|
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
include_once G5_LIB_PATH . '/thumbnail.lib.php';
|
include_once G5_LIB_PATH . '/thumbnail.lib.php';
|
||||||
|
|
||||||
|
|
@ -13,13 +14,13 @@ $au_type = $board['bo_1'] ? $board['bo_1'] : '오리지널';
|
||||||
$slide_space = 10;
|
$slide_space = 10;
|
||||||
$margin = "5px";
|
$margin = "5px";
|
||||||
$slide_loop = ($board['bo_3']) ? 'true' : 'false';
|
$slide_loop = ($board['bo_3']) ? 'true' : 'false';
|
||||||
if ($board['bo_table_width'] == 0)
|
|
||||||
$width = "100%";
|
$width = $board['bo_table_width'] == 0 ? "100%" : (isset($width) ? $width : "0");
|
||||||
|
|
||||||
$cate = array();
|
$cate = array();
|
||||||
$lists = array();
|
$lists = array();
|
||||||
?>
|
|
||||||
<?php if ($board['bo_content_head']) { ?>
|
if ($board['bo_content_head']) { ?>
|
||||||
<div class="board-notice">
|
<div class="board-notice">
|
||||||
<?= stripslashes($board['bo_content_head']); ?>
|
<?= stripslashes($board['bo_content_head']); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -38,9 +39,11 @@ $lists = array();
|
||||||
if ($board['bo_4'] == '1' && $is_category) {
|
if ($board['bo_4'] == '1' && $is_category) {
|
||||||
$cate = explode('|', $board['bo_category_list']);
|
$cate = explode('|', $board['bo_category_list']);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($h = 0; $h <= count($cate); $h++) {
|
for ($h = 0; $h <= count($cate); $h++) {
|
||||||
if (count($cate) > 0 && $h == count($cate))
|
if (count($cate) > 0 && $h == count($cate))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num");
|
$list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num");
|
||||||
|
|
||||||
for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
|
for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
|
||||||
|
|
@ -48,64 +51,72 @@ $lists = array();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="swiper-container">
|
<div class="swiper-container">
|
||||||
<?php if ($board['bo_4'] == '1' && $is_category) { ?>
|
<?php
|
||||||
<h2><?= $cate[$h] ?></h2><?php } ?>
|
if ($board['bo_4'] == '1' && $is_category) { ?>
|
||||||
|
<h2><?= $cate[$h] ?></h2>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($board['bo_2']) {
|
||||||
|
$margins = explode(',', $board['bo_2']);
|
||||||
|
$margin = trim($margins[0]) . 'px';
|
||||||
|
if ($margins[1])
|
||||||
|
$margin .= " " . trim($margins[1]) . 'px';
|
||||||
|
$slide_space = trim($margins[0]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
<ul class="swiper-wrapper">
|
<ul class="swiper-wrapper">
|
||||||
<?php
|
<?php
|
||||||
if ($board['bo_2']) {
|
|
||||||
$margins = explode(',', $board['bo_2']);
|
|
||||||
$margin = trim($margins[0]) . 'px';
|
|
||||||
if ($margins[1])
|
|
||||||
$margin .= " " . trim($margins[1]) . 'px';
|
|
||||||
$slide_space = trim($margins[0]);
|
|
||||||
}
|
|
||||||
if (count($lists) > 0) {
|
if (count($lists) > 0) {
|
||||||
for ($i = 0; $i < count($lists); $i++) {
|
foreach ($lists as &$_category) {
|
||||||
if ($is_category) {
|
if ($is_category) {
|
||||||
if (($board['bo_4'] == '1' && $lists[$i]['ca_name'] != $cate[$h]) || (!$board['bo_4'] && $sca && $lists[$i]['ca_name'] != $sca))
|
if (($board['bo_4'] == '1' && $_category['ca_name'] != $cate[$h]) || (!$board['bo_4'] && $sca && $_category['ca_name'] != $sca))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($lists[$i]['wr_file'] > 0) {
|
if ($_category['wr_file'] > 0) {
|
||||||
if ($lists[$i]['wr_8'] == 'wr_1' || $lists[$i]['wr_8'] == '') {
|
if ($_category['wr_8'] == 'wr_1' || $_category['wr_8'] == '') {
|
||||||
if ($lists[$i]['wr_width'] == '0')
|
if ($_category['wr_width'] == '0')
|
||||||
$position = "center top";
|
$position = "center top";
|
||||||
else
|
else
|
||||||
$position = "-" . $lists[$i]['wr_width'] . "px 0";
|
$position = "-" . $_category['wr_width'] . "px 0";
|
||||||
$thumb_img = get_list_thumbnail($bo_table, $lists[$i]['wr_id'], 0, $board['bo_gallery_height'], true, true, 'custom', false, '', $lists[$i]['wr_height']);
|
$thumb_img = get_list_thumbnail($bo_table, $_category['wr_id'], 0, $board['bo_gallery_height'], true, true, 'custom', false, '', $_category['wr_height']);
|
||||||
if ($thumb_img['src'])
|
if ($thumb_img['src'])
|
||||||
$thumb = $thumb_img['src'];
|
$thumb = $thumb_img['src'];
|
||||||
else
|
else
|
||||||
$thumb = "";
|
$thumb = "";
|
||||||
} else {
|
} else {
|
||||||
$idx = $lists[$i]['wr_8'];
|
$idx = $_category['wr_8'];
|
||||||
$thumb = $lists[$i][$idx];
|
$thumb = $_category[$idx];
|
||||||
$position = "center";
|
$position = "center";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$thumb = "";
|
$thumb = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$_list_class = $board['bo_4'] == 2 ? 'swiper-slide' : 'bo-list';
|
||||||
|
$_list_style = $board['bo_4'] < 2 ? "width: " . ($board['bo_gallery_width'] + ($margins[0] * 2)) . "px; margin: {$margin};" : "";
|
||||||
|
$_link_style = $board['bo_4'] < 2 ? "width: {$board['bo_gallery_width']}px; height: {$board['bo_gallery_height']}px; background-image: url({$thumb}); background-repeat: no-repeat; background-position: {$position}; background-size: cover;" : "";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<li class="<?= $board['bo_4'] == 2 ? 'swiper-slide' : 'bo-list'; ?>"
|
<li class="<?= $_list_class ?>" style="<?= $_list_style ?>">
|
||||||
style="<?php if ($board['bo_4'] < 2) { ?>width:<?= $board['bo_gallery_width'] + ($margins[0] * 2) ?>px;margin:<?= $margin ?>;<?php } ?>">
|
<a href="<?= $_category['href'] ?>"
|
||||||
<a href="<?= $lists[$i]['href'] ?>" class="ui-thumb theme-box<?php if (!$thumb)
|
class="ui-thumb theme-box<?= !$thumb ? " empty" : "" ?> <?= strstr($_category['wr_option'], 'secret') ? "secret" : ""; ?>"
|
||||||
echo " empty"; ?>
|
style="<?= $_link_style ?>">
|
||||||
<?php if (strstr($lists[$i]['wr_option'], 'secret'))
|
|
||||||
echo "secret"; ?>"
|
|
||||||
style="<?php if ($board['bo_4'] < 2) { ?>width:<?= $board['bo_gallery_width'] ?>px;<?php } ?>height:<?= $board['bo_gallery_height'] ?>px;<?php if ($thumb) { ?>background-image:url(<?= $thumb ?>);background-repeat:no-repeat;background-position:<?= $position ?>;background-size:cover;<?php } else { ?><?php } ?>">
|
|
||||||
</a>
|
</a>
|
||||||
<?php if ($board['bo_4'] < 2) { ?>
|
<?php if ($board['bo_4'] < 2) { ?>
|
||||||
<a href="<?= $lists[$i]['href'] ?>" class="ui-profile">
|
<a href="<?= $_category['href'] ?>" class="ui-profile">
|
||||||
<strong class="name">
|
<strong class="name">
|
||||||
<?= $lists[$i]['wr_subject'] ?>
|
<?= $_category['wr_subject'] ?>
|
||||||
</strong>
|
</strong>
|
||||||
<span class="type">
|
<span class="type">
|
||||||
<?= $lists[$i]['wr_type'] ?>
|
<?= $_category['wr_type'] ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li><?php }
|
</li>
|
||||||
} ?>
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($board['bo_4'] == 2) { ?>
|
<?php if ($board['bo_4'] == 2) { ?>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue