테스트 사이트 - 개발 중인 베타 버전입니다

최신글 문의 드립니다.

· 12년 전 · 1879 · 7
최신글 스킨에 이런 소스 부분이 있는데요.



[code]
// 제목
if($list[$i]['ca_name'] != null && $list[$i]['ca_name'] != "")
$subject = strip_tags("[".$list[$i]['ca_name']."]". $list[$i]['wr_subject']);
else
$subject = strip_tags($list[$i]['wr_subject']);
[/code]



카테고리가 있으면 카테고리 명이랑 제목이 나오는데 원하는 거는

[카테고리명]
제목명


이렇게 하려구요.

카테고리명 나오면 한칸 밑에 제목이 나왔으면 합니다.

도움 좀 부탁 드립니다. ^^;

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 7개

세번째 줄을 이렇게 바꿔보세요.
$subject = strip_tags("[".$list[$i]['ca_name']."]")."<br />".strip_tags($list[$i]['wr_subject']);
[code]
// 제목
if($list[$i]['ca_name'] != null && $list[$i]['ca_name'] != "")
$subject = strip_tags("[".$list[$i]['ca_name']."]")."<br />".strip_tags($list[$i]['wr_subject']);
else
$subject = strip_tags($list[$i]['wr_subject']);

[/code]


이렇게 수정 했는데

[카테고리명]<br/>제목명


이렇게 나오네요
어렵네요 ㅎㅎㅎㅎ
$subject가 출력되는 부분의 소스를 볼 수 있을까요?
[code]
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");

// 썸네일 설정
$thumb_width = "120"; // 썸네일 가로
$thumb_height = "140"; // 썸네일 세로
$thumb_quality = "100"; // 썸네일 퀼리티
$thumb_content = "100"; // 내용길이

for ($i=0; $i<count($list); $i++) {

// 썸네일 경로
$data_path = $g4[path]."/data/file/{$list[$i][bo_tb]}";

$thumb_path = $data_path.'/'.$thumb_width.'x'.$thumb_height;

if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $list[$i][file][0][file]; // 파일명

$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);

if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $thumb_height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $thumb_quality);
chmod($thumb_path.'/'.$filename, 0707);
}
}

// 썸네일 파일명 체크
if (file_exists($thumb) && $filename) {
$img = "{$thumb}";
} else {
$img = "";
}

// 링크
$href = "$g4[path]/bbs/board.php?bo_table={$list[$i][bo_tb]}&wr_id={$list[$i][wr_id]}";

// 제목
if($list[$i]['ca_name'] != null && $list[$i]['ca_name'] != "")
$subject = strip_tags("[".$list[$i]['ca_name']."]". $list[$i]['wr_subject']);
else
$subject = strip_tags($list[$i]['wr_subject']);





// 코드
if ($i == '0') {

$code = "'{$href}','{$img}','".conv_subject($subject,40,'..')."'";

} else {

$code = ",'{$href}','{$img}','".conv_subject($subject,40,'..')."'";

}

// 이미지
if ($img) {

echo $code;

} else {

echo $code;

}

}
?>

[/code]

해당 스킨의 소스 입니다.
음 뭔가 알 수 없는 구조인데요.
이거 혹시 플래시로 구현되는 건가요?
스킨이 뭔지 알려주세요.
플래시로 되는거 아니고 기냥 되는거에요.

이것저것 받아서 하다 보니 뭐였는지 기억이 안나네요 ;;
김처로님 신경 써주시니 정말 감사합니다. ^^;
제 생각으로는 저 자체로는 아무것도 안될것 같은데요.;;
아무튼 이렇게 해보세요.
[code]
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");

// 썸네일 설정
$thumb_width = "120"; // 썸네일 가로
$thumb_height = "140"; // 썸네일 세로
$thumb_quality = "100"; // 썸네일 퀼리티
$thumb_content = "100"; // 내용길이

for ($i=0; $i<count($list); $i++) {

// 썸네일 경로
$data_path = $g4[path]."/data/file/{$list[$i][bo_tb]}";

$thumb_path = $data_path.'/'.$thumb_width.'x'.$thumb_height;

if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $list[$i][file][0][file]; // 파일명

$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);

if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $thumb_height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $thumb_quality);
chmod($thumb_path.'/'.$filename, 0707);
}
}

// 썸네일 파일명 체크
if (file_exists($thumb) && $filename) {
$img = "{$thumb}";
} else {
$img = "";
}

// 링크
$href = "$g4[path]/bbs/board.php?bo_table={$list[$i][bo_tb]}&wr_id={$list[$i][wr_id]}";

// 제목
if($list[$i]['ca_name'] != null && $list[$i]['ca_name'] != "")
$ca_name = strip_tags("[".$list[$i]['ca_name']."]");

$subject = strip_tags($list[$i]['wr_subject']);





// 코드
if ($i == '0') {

$code = "'{$href}','{$img}','".$ca_name."<br />".conv_subject($subject,40,'..')."'";

} else {

$code = ",'{$href}','{$img}','".$ca_name."<br />".conv_subject($subject,40,'..')."'";

}

// 이미지
if ($img) {

echo $code;

} else {

echo $code;

}

}
?>
[/code]

게시글 목록

번호 제목
284438
284437
284435
284430
284420
284417
284409
284401
284399
284397
284380
284378
284371
284370
284366
284364
284360
284357
284355
284354