여분필드 wr_1 ~ 9 까지 노출되게 하려면 어떻게 해야 할까요 ??? > 그누4 질문답변

그누4 질문답변

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

여분필드 wr_1 ~ 9 까지 노출되게 하려면 어떻게 해야 할까요 ??? 정보

여분필드 wr_1 ~ 9 까지 노출되게 하려면 어떻게 해야 할까요 ???

본문

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

오류 주소 :

----------------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit;

// 최신글 추출
function latest_group($skin_dir="", $gr_id="", $rows=10, $subject_len="", $content_len="", $time="")
{
    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_datetime = date("Y-m-d H:i:s", $g4['server_time'] - ($time * 86400));
    $sql = " select bo_table, wr_id from $g4[board_new_table] where gr_id = '$gr_id' and bn_datetime > '$sql_datetime' and wr_is_comment = '0' order by bn_id desc limit 0, $rows ";
    $result = sql_query($sql);
    for ($i=0; $row = sql_fetch_array($result); $i++) {

// 게시판 테이블
$bo_write_table = $g4['write_prefix'] . $row[bo_table]; // 게시판 테이블 전체이름
$sql3 = " select wr_id, wr_subject, wr_9, wr_content, wr_name from $bo_write_table where wr_id = '$row[wr_id]' ";
$bo_list = sql_fetch($sql3);

// 파일
$file = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$row[bo_table]' and wr_id = '$bo_list[wr_id]' and bf_no = '0' ");

        $list[$i][bf_file] = $file[bf_file];

        $list[$i][bo_table] = $row[bo_table];
        $list[$i][wr_id] = $row[wr_id];
        $list[$i][subject] = cut_str($bo_list[wr_subject],$subject_len);
        $list[$i][content] = cut_str($bo_list[wr_content],$content_len);
$list[$i][href] = "{$g4[bbs_path]}/board.php?bo_table={$row[bo_table]}&wr_id={$row[wr_id]}";
    }

    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}
?>
----------------------------------------------------------------------------------
latest.group.lib.php 파일입니다...
이곳을 수정하면 될 거 같은데요..
wr_3 또는 wr_9 이런거를 노출하고 싶은데요....
위의 소스가 아니라면 다른 소시는 lastest.skin.php 이 파일일텐데데요....
----------------------------------------------------------------------------------

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
?>
<style type="text/css">
#photo_v30_img, #photo_v30_list, #photo_v30_list2{float:left}
#photo_v30_img{width:100px;border:1px solid #CCCCCC;padding:3px;}
#photo_v30_list{width:500;height:80px;padding:0 0 0 5px;}
#photo_v30_list2{width:790px;height:80px;padding:0 0 0 5px;}
.photo_v30_sub{height:18px;}
</style>
<?
for ($i=0; $i<count($list); $i++) {

//썸네일 코드 시작
$thumb_width = "100"; //썸네일 가로
$thumb_height = "80"; //썸네일 세로
$thumb_quality = "100";

$data_path = $g4[path]."/data/file/{$list[$i][bo_table]}";
$thumb_path = $data_path.'/thumb_'.$thumb_width.'_'.$thumb_height;

if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
    $filename = $list[$i][bf_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, $height);
            else
                $dst = imagecreatetruecolor($thumb_width, $thumb_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$filename, $thumb_quality);
            chmod($thumb_path.'/'.$filename, 0707);
        }
    }

    if (file_exists($thumb) && $filename) {
$img = "<img src='{$thumb}' align='absmiddle' border='0'>";
    } else {
$img = "";
    }

    $href = "{$list[$i][href]}";

$subject = strip_tags($list[$i][subject]);
    $wr_content = strip_tags($list[$i][content]);

// 이미지
if ($img) {
// 출력
    echo <<<HEREDOC
<table cellspacing=0 cellpadding=0 border=0 height=100 width=790>
<tr>
<td width=120><a href='{$href}' onfocus='this.blur()'>{$img}</a></td>
<td>
<table cellpadding=0 cellspacing=0 border=0 width=670><tr><td><strong><a href='{$href}'>{$subject}</a></strong> {$wr_3} </td></tr><tr><td height=65><a href='{$href}'>{$wr_content}</a></td></tr></table>
</td>
</tr>
</table>

HEREDOC;
} else {
// 출력
    echo <<<HEREDOC
<div>
<div id="photo_v30_list2">
<div class="photo_v30_sub"><a href='{$href}'><strong>{$subject}</strong></a></div>
<div><a href='{$href}'>{$wr_content}</a></div>
</div>
</div>
HEREDOC;
}
}
?>
<? if (count($list) == 0) { ?>
<div style="height:25px;" align="center">게시물이 없습니다.</div>
<? } ?>

-------------------------------------------------------------------------
이 파일이 latest.skin.php 파일입니다....
고수님들은 금방 해결할 거 같은데요..
저는 너무 어렵네요...
미리 감솨드립니다...^^:
수고하세용..

댓글 전체

$sql3 = " select wr_id, wr_subject, wr_9, wr_content, wr_name from $bo_write_table where wr_id = '$row[wr_id]' ";

부분을

$sql3 = " select wr_id, wr_subject, wr_1, wr_2, wr_3, wr_4, wr_5, wr_6, wr_7, wr_8, wr_9,  wr_content, wr_name from $bo_write_table where wr_id = '$row[wr_id]' ";

로 수정하거나


$sql3 = " select *  from $bo_write_table where wr_id = '$row[wr_id]' ";

로 수정 하면 됩니다.
전체 50 |RSS
그누4 질문답변 내용 검색

회원로그인

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