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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 22349 | |
| 22347 | |
| 22312 | |
| 22308 | |
| 22303 | |
| 22282 | |
| 22269 | |
| 22259 | |
| 22253 | |
| 22234 | |
| 22221 | |
| 22197 | |
| 22191 | |
| 22179 | |
| 22151 | |
| 22144 | |
| 22135 | |
| 22130 | |
| 22118 | |
| 22110 | |
| 22098 | |
| 22095 | |
| 22076 | |
| 22057 | |
| 22053 | |
| 22051 | |
| 22050 | |
| 22046 | |
| 22044 | |
| 22042 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기