최근게시물 카테고리명 출력방법 정보
최근게시물 카테고리명 출력방법본문
게시판 ,view.skin.php에서
<? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?>
부분을 최근게시물에 적용하려 합니다.
최근 게시물 스킨에 가져다 붙여봤는데 아무런 변화가 없네요.
latest.skin.php는 다음과 같습니다. 현재는 thum 이미지와 제목명만 출력됩니다. 제목 바로 앞에 카테고리명을 달아주고 싶습니다.
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!function_exists('imagecopyresampled')) alert('GD 2.0.1 이상 버전이 설치되어 있어야 합니다.');
include_once($latest_skin_path.'/lib/thumb.lib.php');
$thumb_width = 232; //썸네일 가로
$thumb_height = 158; //썸네일 세로
$quality= 100; //썸네일 퀄리티
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/image-flow.js"></script>
<style type="text/css">
#imageFlow {
position: absolute;
width: 980px;
height: 158px;
overflow: hidden;
background: #f8f8f8;
}
#imageFlow .diapo {
position: absolute;
left: -1000px;
cursor: pointer;
-ms-interpolation-mode: nearest-neighbor;
}
#imageFlow .link {
border: dotted #fff 1px;
margin-left: -1px;
margin-bottom: -1px;
}
#imageFlow .bank {
visibility: hidden;
}
#imageFlow .top {
position: absolute;
width: 980px;
height: 60%;
}
#imageFlow .text {
position: absolute;
left: 0px;
width: 100%;
bottom: 5%;
text-align: center;
color: #333333;
font-size:14px; font-family:Gulim; text-decoration: none; FONT-WEIGHT: bold;
z-index: 1000;
}
#imageFlow .title {
font-size: 0.9em;
font-weight: bold;
}
#imageFlow .legend {
font-size: 0.8em;
}
#imageFlow .scrollbar {
text-align: center;
position: absolute;
width: 980px;
bottom: 50%;
height: 16px;
z-index: 1000;
}
#imageFlow .track {
position: absolute;
width: 98%;
height: 16px;
filter: alpha(opacity=30);
opacity: 0.3;
}
#imageFlow .arrow-left {
position: absolute;
left: 0px;
z-index: 1000;
cursor:pointer;
}
#imageFlow .arrow-right {
position: absolute;
right: 0px;
z-index: 1000;
cursor:pointer;
}
#imageFlow .bar {
position: absolute;
height: 16px;
left: 25px;
}
topmenu_01{
position: absolute;
width: 100%;
top: 100px;
text-align: center;
z-index: 1000;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="imageFlow">
<div class="bank">
<? for ($i=0; $i<count($list); $i++) { ?>
<?
if($list[$i]['file']['0']['view']) {
$src = $list[$i]['file']['0']['path']."/".$list[$i]['file']['0']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}else{
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4['path'].'/' . $tmp['0']; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}
}
?>
<a href="<?=$thumb?>" rel="<?=$list[$i]['href']?>" target="_blank"><?=$list[$i]['subject']?></a>
<? } ?>
</div>
<div class="text">
<div class="legend"><img src="<?=$latest_skin_path?>/img/loading.gif"></div><!--LODING-->
</div>
<div class="scrollbar">
<img class="track" src="<?=$latest_skin_path?>/img/sb.gif" alt="" style="display:none;">
<img class="arrow-left" src="<?=$latest_skin_path?>/img/pf_pp2.png" alt="">
<img class="arrow-right" src="<?=$latest_skin_path?>/img/pf_pp1.png" alt="">
<img class="bar" src="<?=$latest_skin_path?>/img/sc.gif" alt="" style="display:none;">
</div>
</div>
<? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?>
부분을 최근게시물에 적용하려 합니다.
최근 게시물 스킨에 가져다 붙여봤는데 아무런 변화가 없네요.
latest.skin.php는 다음과 같습니다. 현재는 thum 이미지와 제목명만 출력됩니다. 제목 바로 앞에 카테고리명을 달아주고 싶습니다.
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!function_exists('imagecopyresampled')) alert('GD 2.0.1 이상 버전이 설치되어 있어야 합니다.');
include_once($latest_skin_path.'/lib/thumb.lib.php');
$thumb_width = 232; //썸네일 가로
$thumb_height = 158; //썸네일 세로
$quality= 100; //썸네일 퀄리티
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/image-flow.js"></script>
<style type="text/css">
#imageFlow {
position: absolute;
width: 980px;
height: 158px;
overflow: hidden;
background: #f8f8f8;
}
#imageFlow .diapo {
position: absolute;
left: -1000px;
cursor: pointer;
-ms-interpolation-mode: nearest-neighbor;
}
#imageFlow .link {
border: dotted #fff 1px;
margin-left: -1px;
margin-bottom: -1px;
}
#imageFlow .bank {
visibility: hidden;
}
#imageFlow .top {
position: absolute;
width: 980px;
height: 60%;
}
#imageFlow .text {
position: absolute;
left: 0px;
width: 100%;
bottom: 5%;
text-align: center;
color: #333333;
font-size:14px; font-family:Gulim; text-decoration: none; FONT-WEIGHT: bold;
z-index: 1000;
}
#imageFlow .title {
font-size: 0.9em;
font-weight: bold;
}
#imageFlow .legend {
font-size: 0.8em;
}
#imageFlow .scrollbar {
text-align: center;
position: absolute;
width: 980px;
bottom: 50%;
height: 16px;
z-index: 1000;
}
#imageFlow .track {
position: absolute;
width: 98%;
height: 16px;
filter: alpha(opacity=30);
opacity: 0.3;
}
#imageFlow .arrow-left {
position: absolute;
left: 0px;
z-index: 1000;
cursor:pointer;
}
#imageFlow .arrow-right {
position: absolute;
right: 0px;
z-index: 1000;
cursor:pointer;
}
#imageFlow .bar {
position: absolute;
height: 16px;
left: 25px;
}
topmenu_01{
position: absolute;
width: 100%;
top: 100px;
text-align: center;
z-index: 1000;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="imageFlow">
<div class="bank">
<? for ($i=0; $i<count($list); $i++) { ?>
<?
if($list[$i]['file']['0']['view']) {
$src = $list[$i]['file']['0']['path']."/".$list[$i]['file']['0']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}else{
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4['path'].'/' . $tmp['0']; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}
}
?>
<a href="<?=$thumb?>" rel="<?=$list[$i]['href']?>" target="_blank"><?=$list[$i]['subject']?></a>
<? } ?>
</div>
<div class="text">
<div class="legend"><img src="<?=$latest_skin_path?>/img/loading.gif"></div><!--LODING-->
</div>
<div class="scrollbar">
<img class="track" src="<?=$latest_skin_path?>/img/sb.gif" alt="" style="display:none;">
<img class="arrow-left" src="<?=$latest_skin_path?>/img/pf_pp2.png" alt="">
<img class="arrow-right" src="<?=$latest_skin_path?>/img/pf_pp1.png" alt="">
<img class="bar" src="<?=$latest_skin_path?>/img/sc.gif" alt="" style="display:none;">
</div>
</div>
댓글 전체
<a href="<?=$thumb?>" rel="<?=$list[$i]['href']?>" target="_blank"><?=$list[$i]['ca_name']?><?=$list[$i]['subject']?></a>
감사합니다. 알고보니 간단한데..ㅎ 초보라서..