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

제가 어느 정도는 했는데요..^^;;
먼저...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 변수가 제대로 전달이 안되네요..^^
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누3질답

+
제목 글쓴이 날짜 조회
22년 전 조회 300
22년 전 조회 249
22년 전 조회 330
22년 전 조회 438
22년 전 조회 383
22년 전 조회 1,068
22년 전 조회 472
야니여나
22년 전 조회 363
22년 전 조회 459
22년 전 조회 440
22년 전 조회 466
22년 전 조회 504
22년 전 조회 609
22년 전 조회 362
22년 전 조회 1,907
22년 전 조회 488
22년 전 조회 404
22년 전 조회 408
22년 전 조회 563
22년 전 조회 425
🐛 버그신고