셀렉트 박스의 분류를 카테고리를 직접 뿌려주는 방식으로 바꿔 보고 싶습니다. > 그누3질답

그누3질답

셀렉트 박스의 분류를 카테고리를 직접 뿌려주는 방식으로 바꿔 보고 싶습니다. 정보

그누보드 셀렉트 박스의 분류를 카테고리를 직접 뿌려주는 방식으로 바꿔 보고 싶습니다.

본문

제가 어느 정도는 했는데요..^^;;
먼저...lib/gnuboard.lib.php 화일 252 번째 줄에...
// 분류 옵션2을 얻음
function get_category_option2($table)
{
    global $cfg;$list_href;$bo_table;

    $sql = " select * from {$table}_cat order by ca_id ";
    $result = sql_query($sql);
    $str = "";
    while ($row = mysql_fetch_array($result)) {
 &nbsp; &nbsp; &nbsp; &nbsp;$str .= "<a href=$list_href?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&sselect=ca_id&stext=$row[ca_id]>$row[ca_name]</a> ";
 &nbsp; &nbsp;}
 &nbsp; &nbsp;mysql_free_result($result);

 &nbsp; &nbsp;return $str;
}
를 추가합니다.
-------------------------------------
그리고...
bbs/gblist.php 화일 9번째 줄에..
 &nbsp; &nbsp;$category_option2 = get_category_option2($write_table);
를 추가합니다.
그리고 스킨폴더의 gbview.php 화일의 원하는 곳에...
<?=$category_option2?> 를 추가합니다.

그러면 일단 화면에 뿌려지는 것 까지는 이상없이 되는데요..
링크가 제대로 안 먹히거든요..
제가 아직 그누보드 소스에 익숙칠 못하고 실력 또한 허접해서..^^;;;

위 소스중에...
 &nbsp; &nbsp; &nbsp; &nbsp;$str .= "<a href=$list_href?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&sselect=ca_id&stext=$row[ca_id]
부분을 어떻게 링크를 주면 될까요????
$bo_table 변수가 제대로 전달이 안되네요..^^
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로