현재글 제목 칼라변경 않되는 문제 정보
현재글 제목 칼라변경 않되는 문제본문
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:10pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else if ($wr_id == $list[$i]['wr_id']) // 현재위치
echo "<font style='font-family:돋움; font-size:10pt; color:#ff6600;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
공지사항은 글 칼라가 변경이 되는데 현재글일때 현재글 제목은 칼라가 color:#ff6600 로
변경이 않되네요
소스가 잘못된거 같지는 않은데 ...
* 현재 이 소스는 최신글 스킨에 있는 소스이고 글 view 페이지에서 최신글을 불러온겁니다.
아래 방법으로
<?
include_once("$g4[path]/skin/latest/latest_cate/inc_lib.php");
echo latest_cate('latest_cate', 'movie_yn', 200, 30, "$view[ca_name]");
// latest_cate("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수, "카테고리명")
?>
skin/latest/latest_cate/inc_lib.php 소스 는 아래 참조
<?
if (!defined('_GNUBOARD_')) exit;
function latest_cate($skin_dir="", $bo_table, $rows=10, $subject_len=40, $ca_name="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
if ($ca_name)
$sql = " select * from $tmp_write_table where ca_name = '$ca_name' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
else
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
댓글 전체
오른쪽에 리스트 부분에서 현재글일때 칼라가 color:#ff6600 변하게 하고 싶거든요
http://daum.cn/bbs/bbs/board.php?bo_table=movie_yn&wr_id=373&page=6 이 페이지에도 ...
<a href='./movie1.php?bo_table=movie_yn&wr_id=442 style=CURSOR: hands'>
저 부분을 수정하셔야 될 것 같아요.
어떻게 하냐면 movie1.php 파일에 아마 아래와 같은 코드가 있을거에요.
<a href='{$list[$i][href]} style=CURSOR: hands'>
이렇게 고쳐주세요.
<a href='{$list[$i][href]}'>
그리고 다시 한번 테스트 해보면 좋겠습니다. ^^
========= 수정 전 ============================
else if ($wr_id == $list[$i]['wr_id']) // 현재위치
=============================================
========= 수정 후 ============================
else if ($_GET[wr_id] == $list[$i]['wr_id']) // 현재위치
=============================================