최근게시물 링크1에 걸었을때 오류 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최근게시물 링크1에 걸었을때 오류 정보

최근게시물 링크1에 걸었을때 오류

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : 최근게시물 링크1을 수정했는데 어딜 놓친것 같아요
                링크1에 네이버링크를 걸면 http://www.abcd.com/www.naver.com  이런식으로 나옵니다.
고수님들 부탁드립니다




<?php
if(!defined("_GNUBOARD_")) exit;

$zp_thumb_width = "696";
$zp_thumb_height = "241";
$data_path = $g4[path]."/data";

$thumb_path = $data_path."/thumb/$board[bo_table]/board";

if (!is_dir($thumb_path))
{
        @mkdir("$data_path/thumb", 0707);
        @chmod("$data_path/thumb", 0707);
        @mkdir("$data_path/thumb/$board[bo_table]", 0707);
        @chmod("$data_path/thumb/$board[bo_table]", 0707);
        @mkdir("$data_path/thumb/$board[bo_table]/board", 0707);
        @chmod("$data_path/thumb/$board[bo_table]/board", 0707);

    // file hidden
    $file = $thumb_path . "/index.php";
    $f = @fopen($file, "w");
    @fwrite($f, "");
    @fclose($f);
    @chmod($file, 0606);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />   
<script type="text/javascript" src="<?=$latest_skin_path?>/js/jquery.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/easySlider1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#slider").easySlider({
auto: true,
continuous: true,
nextId: "slider1next",
prevId: "slider1prev"
});
$("#slider2").easySlider({
numeric: true
});
});
</script>
<link href="<?=$latest_skin_path?>/css/screen.css" rel="stylesheet" type="text/css" media="screen" />
</head>

<body>
<div id="container">
<div id="content">
<div id="slider">
<ul>
<?php for($i=0; $i<count($list); $i++) {

$thumb = $thumb_path.'/'.$list[$i][wr_id].'.'.jpg;
// thumb
if (!file_exists($thumb)) {
if ($list[$i][file][0][file]) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
} else if ($list[$i][file][1][file]) {
$file = $list[$i][file][1][path] .'/'. $list[$i][file][1][file];
} else if ($list[$i][file][2][file]) {
$file = $list[$i][file][2][path] .'/'. $list[$i][file][2][file];
} else {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}
// getimage
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 {
break;
}

$rate = $zp_thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $zp_thumb_height) {
$dst = imagecreatetruecolor($zp_thumb_width, $height);
} else {
$dst = imagecreatetruecolor($zp_thumb_width, $zp_thumb_height);
}
imagecopyresampled($dst, $src, 0, 0, 0, 0, $zp_thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id].'.'.jpg, $zp_thumb_height);

@chmod($thumb_path.'/'.$list[$i][wr_id].'.'.jpg, 0606);
}
}

$data_path = $g4[path]."/data";
$thumb_path = $data_path.'/thumb'.'/'.$bo_table.'/board';
$img = "<img src='{$latest_skin_path}/img/noimg.gif' width='{$img_w}' alt='{$list[$i][wr_subject]}' style='vertical-align: middle;' />";
$thumb = $thumb_path.'/'.$list[$i][wr_id].'.'.jpg;
if(file_exists($thumb)) {
$img = "<img src='$thumb' alt='{$list[$i][wr_subject]}'>";
} else {
$img = "<p style='width:{$img_w}px; height:88px; text-align:center; line-height:88px; border:1px solid #dddddd;'>no image</p>";
}
$href = "$list[$i][wr_link1]";
echo "<li><a href='{$list[$i][wr_link1]}'>{$img}</a></li>";
} ?>
</ul>
</div>

<!-- <div id="slider2">
<ul>
<?php for($i=0; $i<count($list); $i++) {
$data_path = $g4[path]."/data";
$thumb_path = $data_path.'/thumb'.'/'.$bo_table.'/board';
$img = "<img src='{$latest_skin_path}/img/noimg.gif' width='{$img_w}' alt='{$list[$i][wr_subject]}' style='vertical-align: middle;' />";
$thumb = $thumb_path.'/'.$list[$i][wr_id].'.'.jpg;
if(file_exists($thumb)) {
$img = "<img src='$thumb' alt='{$list[$i][wr_subject]}'>";
} else {
$img = "<p style='width:{$img_w}px; height:88px; text-align:center; line-height:88px; border:1px solid #dddddd;'>no image</p>";
}
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo "<li><a href='{$list[$i][href]}'>{$img}</a></li>";
} ?>
</ul>
</div>-->
</div>
</div>

</body>
</html>

댓글 전체

$href = "$list[$i][wr_link1]";
echo "<li><a href='{$list[$i][wr_link1]}'>{$img}</a></li>";

부분을
$href = "$list[$i][wr_link1]";
echo "<li><a href='".set_http(get_text("$list[$i][wr_link1]"))."'>{$img}</a></li>";

로 수정하시면 됩니다
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT