free게시판의 카테고리를 해당 게시판 리스트가 아닌 곳(메인, 뷰페이지 등)에서 링크 만들기 입니다
bbs/list.php상단의 카테고리 링크 생성 코드를 이용하면 됩니다
<?php
$bo_tablek = 'free';
$write_table=$g5['write_prefix'].$bo_tablek;
$board=sql_fetch("select bo_category_list from {$g5['board_table']} where bo_table='$bo_tablek' ");
$category_href = get_pretty_url($bo_tablek);
$category_option ="<ul id='bo_cate'><li><a href='{$category_href}'>전체</a></li>";
//전체 링크가 필요 없으면 디음행 주석 삭제
// $category_option ="<ul id='bo_cate'>";
$categories = explode('|', $board['bo_category_list']);
for ($i=0; $i<count($categories); $i++) {
$category = trim($categories[$i]);
if ($category=='') continue;
$category_option .= '<li><a href="'.(get_pretty_url($bo_tablek,'','sca='.urlencode($category))).'">'.$category.'</a></li>';
}
$category_option .="</ul>";
?>
<style>
#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
#bo_cate li {display:inline-block;padding:2px}
#bo_cate a {display:block;line-height:25px;padding:3px 15px;border-radius:7px;border:1px solid #d6e9ff;color:#6794d3;font-weight:bold;}
#bo_cate a:hover {text-decoration:none;background:red;color:#fff}
</style>
<?php echo $category_option;?>
댓글 5개
게시글 목록
| 번호 | 제목 |
|---|---|
| 22569 | |
| 22566 | |
| 22565 | |
| 22559 | |
| 22530 | |
| 22527 | |
| 22525 | |
| 22521 | |
| 22518 | |
| 22506 | |
| 22500 | |
| 22490 | |
| 22487 | |
| 22481 | |
| 22480 | |
| 22473 | |
| 22471 | |
| 22468 | |
| 22453 | |
| 22449 | |
| 22440 | |
| 22436 | |
| 22435 | |
| 22415 | |
| 22407 | |
| 22404 | |
| 22376 | |
| 22364 | |
| 22362 | |
| 22353 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기