리스트 없이 내용만 나오게 할수 없나요? 정보
리스트 없이 내용만 나오게 할수 없나요?첨부파일
본문
내용이 줄줄이로 계속 나오게 할 순없나요?
웹진형식 게시판스킨을 썼는데 제목과 썸네일사진과 일부내용만 나오더라구요
그러다가 지에디터 DHTML 사용에 체크하니까 글도 안나와요.
그냥 내용만 계속나오게 하고 싶은데 어떻게 고쳐야 하나요?
list.skin.php에서 내용을 출력하면 될거 같긴한데
초보라 지식이 부족해서 어딜 고쳐야 할지 모르겠어요. ㅠㅠ
아.. 고수님들 제발 도와주세요..
웹진형식 게시판스킨을 썼는데 제목과 썸네일사진과 일부내용만 나오더라구요
그러다가 지에디터 DHTML 사용에 체크하니까 글도 안나와요.
그냥 내용만 계속나오게 하고 싶은데 어떻게 고쳐야 하나요?
list.skin.php에서 내용을 출력하면 될거 같긴한데
초보라 지식이 부족해서 어딜 고쳐야 할지 모르겠어요. ㅠㅠ
아.. 고수님들 제발 도와주세요..
댓글 전체

음.... 간단하게는 178 번째 줄 $thumfile 를 삭제 또는 주석처리 하면 될 듯 하나, 전체적으로 소스가 지저분해 지므로, 101 번 줄 부터 142 번째 줄까지는 지워주는게 좋을 듯 합니다^^
말씀하신대로 지웠는데, 별 반응이 없더라구요.
그러다 주석에 //내용 이라고 되어있는곳을 지우고 했더니
제목에 내용이 나왔는데 이미지는 안나오고 글자만 엔터없이 주-욱 나오더라구요.
주소 : http://afenso.com/introduction.html
여기서 리스트 목록을 클릭하면 내용이 나오는데 그 내용이 이미지와 함께 다 나오게하려면
어떻게 해야하나요?
아래는 제가 고친 list.skin.php 예요.
제가 뭘 잘못한건가요? 죄송합니다. 좀 봐주세요. ㅠㅠ
<!-- 게시판 목록 시작 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($board[bo_1]) {
$img_width = $board[bo_1];
} else $img_width = 120;
if ($board[bo_2]) {
$img_height = $board[bo_2];
} else $img_height = 80;
if ($board[bo_3]) {
$img_quality = $board[bo_3];
} else $img_quality = 95;
if ($board[bo_4]) {
$content_cut = $board[bo_4];
} else $content_cut = 280;
if ($board[bo_5]) {
$line_height = $board[bo_5];
} else $line_height = 20;
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<style>
<!--
/* 전체 설정 */
#list_all{ width: <? if($width <=100) echo $width; else echo $width.'px';?>;
position: relative;
text-align: left;
color: #999999;
padding: 10px;
width: 616;
}
#list_all a { color: #7a7a7a; font-weight: bold; text-decoration: none; }
#list_all dl { position: relative; margin: 0; }
#list_all dt { margin: 0; padding-bottom: 3px; font-weight: bold; text-align: left; color:#888888; }
#list_all dd { margin: 0; line-height: <?=$line_height?>px; }
/* 상단 */
#list_top{ height: 27px; margin: 5px 5PX 0 5PX; position: relative; }
/* 검색버튼 */
#list_top_se { position:absolute; top:0; right:0; text-align: right; }
/* 게시물버튼 */
#list_bt{ position: relative; height: 25px; text-align:left; vertical-align: top; margin:5px; }
/* 페이지 */
#list_page{ height: 25px; text-align:center; vertical-align: middle; margin:5px; padding:5px; }
/* 내용 */
.list_content {
position: relative;
width: 630;
}
/* 윗 내용 */
.list_con_top { width: 620; margin: 5px; padding: 10px 5px 5px 5px; position: relative; font-weight: bold; border: 2px solid #dbdbdb;}
.list_con_top img { display: inline; border: 0; vertical-align: middle; }
/* 아랫 내용 */
.list_con_bottom {
position: relative;
margin: 10px 5px 5px 5px;
padding: 5px;
font-weight: normal;
line-height: <?=$line_height?>px; border: 1px solid #ddd;
overflow: hidden;
width: 566;
}
/* 구분선 */
.list_hr { clear: both; margin: 8px 0 8px 0; height:1px; line-height:1px; font-size:1px;}
-->
</style>
<!-- 전체 div 시작 -->
<div id="list_all">
<div id="list_top"><!-- 상단 div --><!-- 카테고리 사용시 출력되는 셀렉트 메뉴& 전체게시물수 & rss사용시 출력 -->
<!-- 링크 버튼, 검색 -->
<div id="list_top_se">
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자 접속하기" align="absmiddle" alt="관리자"></a><?}?>
</form>
</div>
</div><!-- 상단 끝 -->
<!-- 게시판 목록 시작 -->
<form name="fboardlist" method="post" style="margin:0;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<div class="list_hr"></div>
<!------------------------------------------ 반복시작 ------------------------------------------>
<? for ($i=0; $i<count($list); $i++) :
//번호표시
if ($list[$i][is_notice]) // 공지사항
$list_num = "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
$list_num = "{$list[$i][num]}";
else if ($list[$i][reply]) // 답글
$list_num = $list[$i][reply]. $list[$i][icon_reply];
else
$list_num = "<span style='font:normal 11px tahoma; color:#777777;'>{$list[$i][num]}</span>";
//체크박스
if ($is_checkbox)
$list_checkbox = "<input type=checkbox name=chk_wr_id[] value={$list[$i][wr_id]}>";
//카데고리
if ($is_category && $list[$i][ca_name])
$list_caname = "[<a href='{$list[$i][ca_name_href]}' style=color: '#cccccc;'>{$list[$i][ca_name]}</a>]";
//제목
$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";
$list_i_href = "<a href='{$list[$i][href]}' $style>".$list[$i][subject]."</a>";
//코멘트수
if ($list[$i][comment_cnt])
$list_comment = "<a href=\{$list[$i][comment_href]}\><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";
//아이콘
$list_icon = $list[$i][icon_new] . $list[$i][icon_link] . $list[$i][icon_hot] . $list[$i][icon_secret] . $list[$i]['icon_file'];
//내용
$list[$i]['content'] = cut_str(strip_tags($list[$i][wr_content]),$content_cut);
?>
<!-- 출력 시작 -->
<div class="list_content" style="width:586px">
<div class="list_con_top" style="width:576px">
<!-- 제목외 정보 출력 -->
<?=$list_num?> <?=$list_checkbox?><?=$list_caname?> <?=$list_i_href?><?=$list_comment?>
<!-- 제목외 정보 출력 끝-->
<div class="list_con_bottom"><a href='<?=$list[$i][href]?>'><?=$thumfile?></a><?=$list[$i]['content']?></div>
</div>
</div>
<div class="list_hr"> </div>
<!-- 출력 끝 -->
<?
$list_comment = Null;
// flush();
endfor;
if (count($list) == 0) { echo "<span style='width:100%; text-align: center;'>게시물이 없습니다.</span>"; }
?>
<!------------------------------------------ 반복끝 ------------------------------------------>
</form>
<div id="list_bt"><!-- 버튼 div -->
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align=absmiddle></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" title="선택 삭제하기" alt="선택삭제"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" title="선택 복사하기" alt="선택복사"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" title="선택 이동하기" alt="선택이동"></a>
<? } ?>
<div style="position:absolute; bottom:0; right:0;">
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align="absmiddle" title="글쓰기" alt="글쓰기"></a><? } ?>
</div>
</div>
<div id="list_page"><!-- 페이지 div -->
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전 검색하기' alt='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음페이지' alt='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전페이지' alt='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음페이지' alt='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝페이지' alt='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음 검색하기' alt='다음검색'></a>"; } ?>
</div>
</div>
<!-- 전체 div 끝 -->
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
그러다 주석에 //내용 이라고 되어있는곳을 지우고 했더니
제목에 내용이 나왔는데 이미지는 안나오고 글자만 엔터없이 주-욱 나오더라구요.
주소 : http://afenso.com/introduction.html
여기서 리스트 목록을 클릭하면 내용이 나오는데 그 내용이 이미지와 함께 다 나오게하려면
어떻게 해야하나요?
아래는 제가 고친 list.skin.php 예요.
제가 뭘 잘못한건가요? 죄송합니다. 좀 봐주세요. ㅠㅠ
<!-- 게시판 목록 시작 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($board[bo_1]) {
$img_width = $board[bo_1];
} else $img_width = 120;
if ($board[bo_2]) {
$img_height = $board[bo_2];
} else $img_height = 80;
if ($board[bo_3]) {
$img_quality = $board[bo_3];
} else $img_quality = 95;
if ($board[bo_4]) {
$content_cut = $board[bo_4];
} else $content_cut = 280;
if ($board[bo_5]) {
$line_height = $board[bo_5];
} else $line_height = 20;
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<style>
<!--
/* 전체 설정 */
#list_all{ width: <? if($width <=100) echo $width; else echo $width.'px';?>;
position: relative;
text-align: left;
color: #999999;
padding: 10px;
width: 616;
}
#list_all a { color: #7a7a7a; font-weight: bold; text-decoration: none; }
#list_all dl { position: relative; margin: 0; }
#list_all dt { margin: 0; padding-bottom: 3px; font-weight: bold; text-align: left; color:#888888; }
#list_all dd { margin: 0; line-height: <?=$line_height?>px; }
/* 상단 */
#list_top{ height: 27px; margin: 5px 5PX 0 5PX; position: relative; }
/* 검색버튼 */
#list_top_se { position:absolute; top:0; right:0; text-align: right; }
/* 게시물버튼 */
#list_bt{ position: relative; height: 25px; text-align:left; vertical-align: top; margin:5px; }
/* 페이지 */
#list_page{ height: 25px; text-align:center; vertical-align: middle; margin:5px; padding:5px; }
/* 내용 */
.list_content {
position: relative;
width: 630;
}
/* 윗 내용 */
.list_con_top { width: 620; margin: 5px; padding: 10px 5px 5px 5px; position: relative; font-weight: bold; border: 2px solid #dbdbdb;}
.list_con_top img { display: inline; border: 0; vertical-align: middle; }
/* 아랫 내용 */
.list_con_bottom {
position: relative;
margin: 10px 5px 5px 5px;
padding: 5px;
font-weight: normal;
line-height: <?=$line_height?>px; border: 1px solid #ddd;
overflow: hidden;
width: 566;
}
/* 구분선 */
.list_hr { clear: both; margin: 8px 0 8px 0; height:1px; line-height:1px; font-size:1px;}
-->
</style>
<!-- 전체 div 시작 -->
<div id="list_all">
<div id="list_top"><!-- 상단 div --><!-- 카테고리 사용시 출력되는 셀렉트 메뉴& 전체게시물수 & rss사용시 출력 -->
<!-- 링크 버튼, 검색 -->
<div id="list_top_se">
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자 접속하기" align="absmiddle" alt="관리자"></a><?}?>
</form>
</div>
</div><!-- 상단 끝 -->
<!-- 게시판 목록 시작 -->
<form name="fboardlist" method="post" style="margin:0;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<div class="list_hr"></div>
<!------------------------------------------ 반복시작 ------------------------------------------>
<? for ($i=0; $i<count($list); $i++) :
//번호표시
if ($list[$i][is_notice]) // 공지사항
$list_num = "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
$list_num = "{$list[$i][num]}";
else if ($list[$i][reply]) // 답글
$list_num = $list[$i][reply]. $list[$i][icon_reply];
else
$list_num = "<span style='font:normal 11px tahoma; color:#777777;'>{$list[$i][num]}</span>";
//체크박스
if ($is_checkbox)
$list_checkbox = "<input type=checkbox name=chk_wr_id[] value={$list[$i][wr_id]}>";
//카데고리
if ($is_category && $list[$i][ca_name])
$list_caname = "[<a href='{$list[$i][ca_name_href]}' style=color: '#cccccc;'>{$list[$i][ca_name]}</a>]";
//제목
$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";
$list_i_href = "<a href='{$list[$i][href]}' $style>".$list[$i][subject]."</a>";
//코멘트수
if ($list[$i][comment_cnt])
$list_comment = "<a href=\{$list[$i][comment_href]}\><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";
//아이콘
$list_icon = $list[$i][icon_new] . $list[$i][icon_link] . $list[$i][icon_hot] . $list[$i][icon_secret] . $list[$i]['icon_file'];
//내용
$list[$i]['content'] = cut_str(strip_tags($list[$i][wr_content]),$content_cut);
?>
<!-- 출력 시작 -->
<div class="list_content" style="width:586px">
<div class="list_con_top" style="width:576px">
<!-- 제목외 정보 출력 -->
<?=$list_num?> <?=$list_checkbox?><?=$list_caname?> <?=$list_i_href?><?=$list_comment?>
<!-- 제목외 정보 출력 끝-->
<div class="list_con_bottom"><a href='<?=$list[$i][href]?>'><?=$thumfile?></a><?=$list[$i]['content']?></div>
</div>
</div>
<div class="list_hr"> </div>
<!-- 출력 끝 -->
<?
$list_comment = Null;
// flush();
endfor;
if (count($list) == 0) { echo "<span style='width:100%; text-align: center;'>게시물이 없습니다.</span>"; }
?>
<!------------------------------------------ 반복끝 ------------------------------------------>
</form>
<div id="list_bt"><!-- 버튼 div -->
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align=absmiddle></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" title="선택 삭제하기" alt="선택삭제"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" title="선택 복사하기" alt="선택복사"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" title="선택 이동하기" alt="선택이동"></a>
<? } ?>
<div style="position:absolute; bottom:0; right:0;">
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align="absmiddle" title="글쓰기" alt="글쓰기"></a><? } ?>
</div>
</div>
<div id="list_page"><!-- 페이지 div -->
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border=0 align=absmiddle title='이전 검색하기' alt='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음페이지' alt='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전페이지' alt='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음페이지' alt='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝페이지' alt='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#B3B3B3; font-size:12px;\">$1</span></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border=0 align=absmiddle title='다음 검색하기' alt='다음검색'></a>"; } ?>
</div>
</div>
<!-- 전체 div 끝 -->
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->