listskin을 방명록 처럼 하려면? 정보
listskin을 방명록 처럼 하려면?본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
list.skin 즉 게시물 목록을 볼때 제목밑에 본문내용과 사진과 댓글까지 나와서 방명록게시판 모양처럼 쓰고싶습니다
사진의 daum.net의 트위터 코너 처럼 게시판화면에서 내용,사진까지 다 보이게요
제가 왕초보라 잘몰라서 그냥 view.skin.php에서 내용에 해당하는것 같은 부분을 복사해서 list.skin.php에 붙여넣어봤는데 제대로 출력이 안되는군요
뷰스킨의 어느부분을 리스트스킨 어느부분에 넣어야 하는지 방법좀 알려주세요~
제가 쓰는 그누보드 불당팩 cheditor의 listskin.php와 viewskin.php입니다
1. list.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
// image를 cdn에 올려둔 경우에는 해당 cdn의 url 주소를 적어주면 됩니다.
// $board_skin_path = "http://echo4me.imagetong.com/gnuboard4/skin/board/cheditor"
?>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<td width=40><? include("$g4[bbs_path]/my_menu_add_script.php");?></td>
<td align=left> 게시판 : <b><?=$board[bo_subject]?></b></td>
<? if ($is_category) { ?>
<form name="fcategory" method="get"><td>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option><?=$category_option?></select>
</td></form>
<? } ?>
<td align="right" style="font:normal 11px tahoma; color:#BABABA;" width=50>
Total <?=number_format($total_count)?>
</td>
<td align="right" style="font:normal 11px tahoma; color:#BABABA;" width=50>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle alt='rss'></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle" alt='admin'></a><?}?>
</td>
</tr>
<tr><td height=5></td></tr>
</table>
<!-- 인기게시글 -->
<? if ($board[bo_hot_list]) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td><? include_once("$g4[path]/lib/latest.lib.php"); echo latest_popular("simple_box", $bo_table, 10, 256); ?></td></tr><tr height=5><td></td></tr></table>
<? } ?>
<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<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=''>
<input type='hidden' name='sca' value=''>
<table width=100% border="0" cellpadding=0 cellspacing="2">
<tr>
<td height=2 bgcolor="#0A7299"></td>
<? if ($is_checkbox) { ?><td bgcolor="#0A7299"></td><?}?>
<td bgcolor="#0A7299"></td>
<td bgcolor="#A4B510"></td>
<td bgcolor="#A4B510"></td>
<td bgcolor="#A4B510"></td>
<? if ($is_good) { ?><td bgcolor="#A4B510"></td><?}?>
<? if ($is_good) { ?><td bgcolor="#A4B510"></td><?}?>
</tr>
<tr height=28 align=center>
<td width=50><?=subject_sort_link('wr_id', $qstr2, 1)?>번호</a></td>
<?/* if ($is_category) { ?><td width=70>분류</td><?}*/?>
<? if ($is_checkbox) { ?><td width=40><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><?}?>
<td>제목</td>
<td width=110>글쓴이</td>
<td width=40><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a> <?=subject_sort_link('wr_last', $qstr2, 1)?>U</a></td>
<td width=50><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></td>
<?/*?><td width=40 title='마지막 코멘트 쓴 시간'><?=subject_sort_link('wr_last', $qstr2, 1)?>최근</a></td><?*/?>
<? if ($is_good) { ?><td width=40><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></td><?}?>
<? if ($is_nogood) { ?><td width=40><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></td><?}?>
</tr>
<tr><td colspan=<?=$colspan?> height=3 style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;"></td></tr>
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=28 align=center>
<td>
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/icon_notice.gif\" alt='notice'>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span style='font:bold 11px tahoma; color:#E15916;'>{$list[$i][num]}</span>";
else
echo "<span style='font:normal 11px tahoma; color:#BABABA;'>{$list[$i][num]}</span>";
?></td>
<?/* if ($is_category) { ?><td><a href="<?=$list[$i][ca_name_href]?>"><span class=small style='color:#BABABA;'><?=$list[$i][ca_name]?></span></a></td><? } */?>
<? if ($is_checkbox) { ?><td><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
$style = "";
if ($list[$i][is_notice]) $style .= " style='font-weight:bold;'";
if ($list[$i][wr_singo]) $style .= " style='color:#B8B8B8;'";
echo "<a href='{$list[$i][href]}' $style>";
echo $list[$i][subject];
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
if (!$list[$i][is_notice]) {
echo " " . $list[$i][icon_hot];
}
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?></td>
<td><nobr style='display:block; overflow:hidden; width:105px;'><?=$list[$i][name]?></nobr></td>
<td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][datetime2]?></span></td>
<td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_hit]?></span></td>
<?/*?><td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][last2]?></span></td><?*/?>
<? if ($is_good) { ?><td align="center"><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_good]?></span></td><? } ?>
<? if ($is_nogood) { ?><td align="center"><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_nogood]?></span></td><? } ?>
</tr>
<tr><td colspan=<?=$colspan?> height=1 bgcolor=#E7E7E7></td></tr>
<?}?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$colspan?> bgcolor="#0A7299" height="2"></td></tr>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' border=0 align=absmiddle title='이전검색' alt='prev search'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#000000\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 링크 버튼, 검색 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0" alt='list'></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" alt='write'></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0" alt='delete'></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0" alt='copy'></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0" alt='move'></a>
<? if ($is_category) { ?>
<a href="javascript:select_category();"><img src="<?=$board_skin_path?>/img/btn_select_category.gif" border="0" alt='select'></a>
<select name=sca2><?=$category_option?></select>
<? } ?>
<? } ?>
</td>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value='<?=stripslashes($stx)?>'><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</td></tr></table>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</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();
}
// 선택한 게시물 카테고리를 변경
function select_category() {
var f = document.fboardlist;
var f2 = document.fsearch;
str = "카테고리변경";
if (!check_confirm(str))
return;
str = f2.sca2.value;
if (!confirm("선택한 게시물의 카테고리를 "+str+" 으로 변경 하시겠습니까?"))
return;
// sca에 값을 넣어줘야죠.
f.sca.value = str;
f.action = "./category_all.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
2. view.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 스킨에서 사용하는 lib 읽어들이기
include_once("$g4[path]/lib/view.skin.lib.php");
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" id="view_<?=$wr_id?>"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle' alt='search'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle' alt='list'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle' alt='write'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle' alt='reply'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_modify.gif' border='0' align='absmiddle' alt='update'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_del.gif' border='0' align='absmiddle' alt='delete'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle' alt='good'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle' alt='nogood'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle' alt='scrap'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle' alt='copy'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle' alt='move'></a> "; } ?>
<? if ($nosecret_href) { echo "<a href=\"$nosecret_href\"><img src='$board_skin_path/img/btn_nosecret.gif' border='0' align='absmiddle' alt='no secret'></a> "; } ?>
<? if ($secret_href) { echo "<a href=\"$secret_href\"><img src='$board_skin_path/img/btn_secret.gif' border='0' align='absmiddle' alt='secret'></a> "; } ?>
<? if ($now_href) { echo "<a href=\"$now_href\"><img src='$board_skin_path/img/btn_now.gif' border='0' align='absmiddle' alt='now'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle' alt='prev href'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle' alt='next href'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<!-- 제목, 글쓴이, 날짜, 조회, 추천, 비추천 -->
<table width="100%" cellspacing="0" cellpadding="0" id="view_Contents">
<tr><td height=2 bgcolor="#0A7299"></td></tr>
<tr><td height=30 style="padding:5px 0 5px 0;">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td style='word-break:break-all; height:28px;'> <strong><span id="writeSubject"><? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?><?=cut_hangul_last(get_text($view[wr_subject]))?></span></strong></td>
<td width=100>
<a href="javascript:scaleFont(+1);"><img src='<?=$board_skin_path?>/img/icon_zoomin.gif' border=0 title='글자 확대' alt='zoom in'></a>
<a href="javascript:scaleFont(-1);"><img src='<?=$board_skin_path?>/img/icon_zoomout.gif' border=0 title='글자 축소' alt='zoom out'></a>
<? if ($board['bo_print_level'] && $member[mb_level] >= $board['bo_print_level']) { ?>
<script type="text/javascript" src="<?=$board_skin_path?>/../print_contents.cheditor.js"></script>
<a href="#" onclick="javascript:print_contents2('view_Contents', 'commentContents', '<?=$g4[title]?>')"><img src='<?=$board_skin_path?>/img/btn_print.gif' border=0 title='프린트' alt='print'></a>
<? }?>
</td>
</tr>
<tr><td colspan="2" height=3 style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;"></td></tr>
</table></td></tr>
<tr><td height=30>
<span style="float:left;">
글쓴이 : <?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
날짜 : <?=substr($view[wr_datetime],2,14)?>
조회 : <?=$view[wr_hit]?>
<? if ($is_good) { ?><font style="font:normal 11px 돋움; color:#BABABA;">추천</font> :<font style="font:normal 11px tahoma; color:#BABABA;"> <?=$view[wr_good]?> <?}?></font>
<? if ($is_nogood) { ?><font style="font:normal 11px 돋움; color:#BABABA;">비추천</font> :<font style="font:normal 11px tahoma; color:#BABABA;"> <?=$view[wr_nogood]?> <?}?></font>
</span>
<?if ($singo_href) { ?><span style="float:right;padding-right:5px;"><a href="javascript:win_singo('<?=$singo_href?>');"><img src='<?=$board_skin_path?>/img/icon_singo.gif' alt='singo'></a></span><?}?>
<?if ($unsingo_href) { ?><span style="float:right;padding-right:5px;"><a href="javascript:win_unsingo('<?=$unsingo_href?>');"><img src='<?=$board_skin_path?>/img/icon_unsingo.gif' alt='unsingo'></a></span><?}?>
</td></tr>
<!-- 게시글 주소를 복사하기 쉽게 하기 위해서 아랫 부분을 삽입 -->
<tr><td height=30>
<font style="font:normal 11px 돋움; color:#BABABA;"> 게시글 주소 : <a href="javascript:clipboard_trackback('<?=$posting_url?>');" style="letter-spacing:0;" title='이 글을 소개할 때는 이 주소를 사용하세요'><?=$posting_url;?></a></font>
<? if ($g4[use_bitly]) { ?>
<? if ($view[bitly_url]) { ?>
bitly : <span id="bitly_url" class=bitly style="font:normal 11px 돋움; color:#BABABA;"><a href=<?=$view[bitly_url]?> target=new><?=$view[bitly_url]?></a></span>
<? } else { ?>
bitly : <span id="bitly_url" class=bitly style="font:normal 11px 돋움; color:#BABABA;"></span>
<script language=javascript>
// encode 된 것을 넘겨주면, 알아서 decode해서 결과를 return 해준다.
// encode 하기 전의 url이 있어야 결과를 꺼낼 수 있기 때문에, 결국 2개를 넘겨준다.
// 왜? java script에서는 urlencode, urldecode가 없으니까. ㅎㅎ
// 글쿠 이거는 마지막에 해야 한다. 왜??? 그래야 정보를 html page에 업데이트 하쥐~!
get_bitly_g4('#bitly_url', '<?=$bo_table?>', '<?=$wr_id?>');
</script>
<?}?>
<?}?>
<?
if ($is_member && $g4[use_gblog]) {
$gb4_path="../blog";
include_once("$gb4_path/common.php");
?>
<script language=javascript>
// gblog에서 쓰는 java script 변수들을 설정
var gb4_blog = "<?=$gb4['bbs_path']?>";
</script>
<script type="text/javascript" src="<?="$gb4[path]/js/blog.js"?>"></script>
<a href="javascript:send_to_gblog('<?=$bo_table?>','<?=$wr_id?>')">블로그로보내기</a>
<? } ?>
</td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
//echo "<tr><td height=22> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
echo "<tr><td height=30> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle alt='file'> <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'><font style='normal 11px 돋움;'>{$view[file][$i][source]} ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</font></a></td></tr><tr><td height='1' bgcolor='#E7E7E7'></td></tr>";
}
}
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++) {
if ($view[link][$i]) {
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=30> <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle alt='link'> <a href='{$view[link_href][$i]}' target=_blank><font style='normal 11px 돋움;'>{$link} ({$view[link_hit][$i]})</font></a></td></tr><tr><td height='1' bgcolor='#E7E7E7'></td></tr>";
}
}
?>
<!-- <tr><td height=1 bgcolor=#"E7E7E7"></td></tr> //-->
<tr>
<td height="150" style='word-break:break-all;padding:10px;'>
<div id="resContents" class="resContents">
<?
// 파일 출력
ob_start();
for ($i=0; $i<=$view[file][count]; $i++) {
if ($view[file][$i][view]) {
// function resize_content($content, $width=0, $height=0, $quality=0, $thumb_create=0, $image_window=1, $water_mark="", $image_filter="", $image_min=0, $imgage_min_kb=0)
echo resize_dica($view[file][$i][view],250,300) . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
//echo resize_content($view[file][$i][view], 0,0,0,1,1,"","",300,90) . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
//echo $view[file][$i][view] . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
}
}
$file_viewer = ob_get_contents();
ob_end_clean();
// 신고된 게시글의 이미지를 선택하여 출력하기
if ($view['wr_singo'] and trim($file_viewer)) {
$singo = "<div id='singo_file_title{$view[wr_id]}' class='singo_title'><font color=gray>신고가 접수된 게시물입니다. ";
$singo .= "<span class='singo_here' style='cursor:pointer;font-weight:bold;' onclick=\"document.getElementById('singo_file{$view[wr_id]}').style.display=(document.getElementById('singo_file{$view[wr_id]}').style.display=='none'?'':'none');\"><font color=red>여기</font></span>를 클릭하시면 첨부 이미지를 볼 수 있습니다.</font></div>";
$singo .= "<div id='singo_file{$view[wr_id]}' style='display:none;'><p>";
$singo .= $file_viewer;
$singo .= "</div>";
echo $singo;
} else {
echo $file_viewer;
}
?>
<!-- 내용 출력 -->
<span id="writeContents" class="ct lh">
<?
$write_contents=resize_dica($view[content],400,300);
echo $write_contents;
?>
</span>
<?//echo $view[rich_content]; //
과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<tr><td height="1" bgcolor="#E7E7E7"></td></tr>
<? if ($is_signature) { echo "<tr><td align='center' style='border-bottom:1px solid #E7E7E7; padding:5px 0;'>$signature</td></tr>"; } // 서명 출력 ?>
<?
// CCL 정보
$view[wr_ccl] = $write[wr_ccl] = mw_get_ccl_info($write[wr_ccl]);
?>
<? if ($board[bo_ccl] && $view[wr_ccl][by]) { ?>
<tr style='padding:10px;' class=mw_basic_ccl><td>
<a rel="license" href="<?=$view[wr_ccl][link]?>" title="<?=$view[wr_ccl][msg]?>" target=_blank><img src="<?=$board_skin_path?>/img/ccls_by.gif" alt='ccl'>
<? if ($view[wr_ccl][nc] == "nc") { ?><img src="<?=$board_skin_path?>/img/ccls_nc.gif" alt='ccl nc'><? } ?>
<? if ($view[wr_ccl][nd] == "nd") { ?><img src="<?=$board_skin_path?>/img/ccls_nd.gif" alt='ccl nd'><? } ?>
<? if ($view[wr_ccl][nd] == "sa") { ?><img src="<?=$board_skin_path?>/img/ccls_sa.gif" alt='ccl sa'><? } ?>
</a>
</td></tr>
<? } ?>
<? if ($board[bo_related] && $view[wr_related]) { ?>
<? $rels = mw_related($view[wr_related], $board[bo_related]); ?>
<? if (count($rels)) {?>
<tr>
<td>
<b>관련글</b> : <?=$view[wr_related]?>
</td>
</tr>
<tr>
<td>
<ul>
<? for ($i=0; $i<count($rels); $i++) { ?>
<li> <a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$rels[$i][wr_id]?>"> <?=$rels[$i][wr_subject]?> </a> </li>
<? } ?>
</ul>
</td>
</tr>
<? } ?>
<? } ?>
<?
// 인기검색어
if ($board[bo_popular]) {
unset($plist);
$plist = popular_list($board[bo_popular], $board[bo_popular_days], $bo_table);
if (count($plist) > 0) {
?>
<tr>
<td>
<b>인기검색어</b> :
<?
for ($i=0; $i<count($plist); $i++) {
if (trim($plist[$i][sfl]) == '' || strstr($plist[$i][sfl], '\%7C')) $plist[$i][sfl] = "wr_subject||wr_content";
?>
<a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sfl=<?=urlencode($plist[$i][sfl])?>&stx=<?=$plist[$i]['pp_word']?>"><?=$plist[$i]['pp_word']?></a>
<? } ?>
</td>
</tr>
<? } ?>
<? } ?>
<?
if ($board[bo_chimage]) {
include_once("$g4[path]/lib/chimage.lib.php");
$ch_list = chimage('', $bo_table, $wr_id);
if ($ch_list) {
echo "<tr>
<td>
$ch_list
</td>
</tr>
";
}
} ?>
</div>
</td>
</tr>
</table><br>
<?
// 광고가 있는 경우 광고를 연결
if (file_exists("$board_skin_path/adsense_view_comment.php"))
include_once("$board_skin_path/adsense_view_comment.php");
// 코멘트 입출력
if (!$board['bo_comment_read_level'])
include_once("./view_comment.php");
else if ($member['mb_level'] >= $board['bo_comment_read_level'])
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr>
<tr><td>
<? include_once("$g4[path]/adsense_page_bottom.php"); ?>
</td></tr>
</table><br>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
OnclickCheck(document.getElementById("writeContents"), '<?=$config[cf_link_target]?>');
}
</script>
<!-- 게시글 보기 끝 -->
오류 주소 :
list.skin 즉 게시물 목록을 볼때 제목밑에 본문내용과 사진과 댓글까지 나와서 방명록게시판 모양처럼 쓰고싶습니다
사진의 daum.net의 트위터 코너 처럼 게시판화면에서 내용,사진까지 다 보이게요
제가 왕초보라 잘몰라서 그냥 view.skin.php에서 내용에 해당하는것 같은 부분을 복사해서 list.skin.php에 붙여넣어봤는데 제대로 출력이 안되는군요
뷰스킨의 어느부분을 리스트스킨 어느부분에 넣어야 하는지 방법좀 알려주세요~
제가 쓰는 그누보드 불당팩 cheditor의 listskin.php와 viewskin.php입니다
1. list.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
// image를 cdn에 올려둔 경우에는 해당 cdn의 url 주소를 적어주면 됩니다.
// $board_skin_path = "http://echo4me.imagetong.com/gnuboard4/skin/board/cheditor"
?>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr height="25">
<td width=40><? include("$g4[bbs_path]/my_menu_add_script.php");?></td>
<td align=left> 게시판 : <b><?=$board[bo_subject]?></b></td>
<? if ($is_category) { ?>
<form name="fcategory" method="get"><td>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option><?=$category_option?></select>
</td></form>
<? } ?>
<td align="right" style="font:normal 11px tahoma; color:#BABABA;" width=50>
Total <?=number_format($total_count)?>
</td>
<td align="right" style="font:normal 11px tahoma; color:#BABABA;" width=50>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle alt='rss'></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle" alt='admin'></a><?}?>
</td>
</tr>
<tr><td height=5></td></tr>
</table>
<!-- 인기게시글 -->
<? if ($board[bo_hot_list]) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td><? include_once("$g4[path]/lib/latest.lib.php"); echo latest_popular("simple_box", $bo_table, 10, 256); ?></td></tr><tr height=5><td></td></tr></table>
<? } ?>
<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<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=''>
<input type='hidden' name='sca' value=''>
<table width=100% border="0" cellpadding=0 cellspacing="2">
<tr>
<td height=2 bgcolor="#0A7299"></td>
<? if ($is_checkbox) { ?><td bgcolor="#0A7299"></td><?}?>
<td bgcolor="#0A7299"></td>
<td bgcolor="#A4B510"></td>
<td bgcolor="#A4B510"></td>
<td bgcolor="#A4B510"></td>
<? if ($is_good) { ?><td bgcolor="#A4B510"></td><?}?>
<? if ($is_good) { ?><td bgcolor="#A4B510"></td><?}?>
</tr>
<tr height=28 align=center>
<td width=50><?=subject_sort_link('wr_id', $qstr2, 1)?>번호</a></td>
<?/* if ($is_category) { ?><td width=70>분류</td><?}*/?>
<? if ($is_checkbox) { ?><td width=40><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><?}?>
<td>제목</td>
<td width=110>글쓴이</td>
<td width=40><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a> <?=subject_sort_link('wr_last', $qstr2, 1)?>U</a></td>
<td width=50><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></td>
<?/*?><td width=40 title='마지막 코멘트 쓴 시간'><?=subject_sort_link('wr_last', $qstr2, 1)?>최근</a></td><?*/?>
<? if ($is_good) { ?><td width=40><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></td><?}?>
<? if ($is_nogood) { ?><td width=40><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></td><?}?>
</tr>
<tr><td colspan=<?=$colspan?> height=3 style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;"></td></tr>
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=28 align=center>
<td>
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/icon_notice.gif\" alt='notice'>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span style='font:bold 11px tahoma; color:#E15916;'>{$list[$i][num]}</span>";
else
echo "<span style='font:normal 11px tahoma; color:#BABABA;'>{$list[$i][num]}</span>";
?></td>
<?/* if ($is_category) { ?><td><a href="<?=$list[$i][ca_name_href]?>"><span class=small style='color:#BABABA;'><?=$list[$i][ca_name]?></span></a></td><? } */?>
<? if ($is_checkbox) { ?><td><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
$style = "";
if ($list[$i][is_notice]) $style .= " style='font-weight:bold;'";
if ($list[$i][wr_singo]) $style .= " style='color:#B8B8B8;'";
echo "<a href='{$list[$i][href]}' $style>";
echo $list[$i][subject];
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
if (!$list[$i][is_notice]) {
echo " " . $list[$i][icon_hot];
}
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?></td>
<td><nobr style='display:block; overflow:hidden; width:105px;'><?=$list[$i][name]?></nobr></td>
<td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][datetime2]?></span></td>
<td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_hit]?></span></td>
<?/*?><td><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][last2]?></span></td><?*/?>
<? if ($is_good) { ?><td align="center"><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_good]?></span></td><? } ?>
<? if ($is_nogood) { ?><td align="center"><span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][wr_nogood]?></span></td><? } ?>
</tr>
<tr><td colspan=<?=$colspan?> height=1 bgcolor=#E7E7E7></td></tr>
<?}?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
<tr><td colspan=<?=$colspan?> bgcolor="#0A7299" height="2"></td></tr>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" height=30 valign=bottom>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' border=0 align=absmiddle title='이전검색' alt='prev search'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#000000\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
<!-- 링크 버튼, 검색 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0" alt='list'></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" alt='write'></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0" alt='delete'></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0" alt='copy'></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0" alt='move'></a>
<? if ($is_category) { ?>
<a href="javascript:select_category();"><img src="<?=$board_skin_path?>/img/btn_select_category.gif" border="0" alt='select'></a>
<select name=sca2><?=$category_option?></select>
<? } ?>
<? } ?>
</td>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value='<?=stripslashes($stx)?>'><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</td></tr></table>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</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();
}
// 선택한 게시물 카테고리를 변경
function select_category() {
var f = document.fboardlist;
var f2 = document.fsearch;
str = "카테고리변경";
if (!check_confirm(str))
return;
str = f2.sca2.value;
if (!confirm("선택한 게시물의 카테고리를 "+str+" 으로 변경 하시겠습니까?"))
return;
// sca에 값을 넣어줘야죠.
f.sca.value = str;
f.action = "./category_all.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
2. view.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 스킨에서 사용하는 lib 읽어들이기
include_once("$g4[path]/lib/view.skin.lib.php");
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" id="view_<?=$wr_id?>"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle' alt='search'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle' alt='list'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle' alt='write'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle' alt='reply'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_modify.gif' border='0' align='absmiddle' alt='update'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_del.gif' border='0' align='absmiddle' alt='delete'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle' alt='good'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle' alt='nogood'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle' alt='scrap'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle' alt='copy'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle' alt='move'></a> "; } ?>
<? if ($nosecret_href) { echo "<a href=\"$nosecret_href\"><img src='$board_skin_path/img/btn_nosecret.gif' border='0' align='absmiddle' alt='no secret'></a> "; } ?>
<? if ($secret_href) { echo "<a href=\"$secret_href\"><img src='$board_skin_path/img/btn_secret.gif' border='0' align='absmiddle' alt='secret'></a> "; } ?>
<? if ($now_href) { echo "<a href=\"$now_href\"><img src='$board_skin_path/img/btn_now.gif' border='0' align='absmiddle' alt='now'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle' alt='prev href'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle' alt='next href'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<!-- 제목, 글쓴이, 날짜, 조회, 추천, 비추천 -->
<table width="100%" cellspacing="0" cellpadding="0" id="view_Contents">
<tr><td height=2 bgcolor="#0A7299"></td></tr>
<tr><td height=30 style="padding:5px 0 5px 0;">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td style='word-break:break-all; height:28px;'> <strong><span id="writeSubject"><? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?><?=cut_hangul_last(get_text($view[wr_subject]))?></span></strong></td>
<td width=100>
<a href="javascript:scaleFont(+1);"><img src='<?=$board_skin_path?>/img/icon_zoomin.gif' border=0 title='글자 확대' alt='zoom in'></a>
<a href="javascript:scaleFont(-1);"><img src='<?=$board_skin_path?>/img/icon_zoomout.gif' border=0 title='글자 축소' alt='zoom out'></a>
<? if ($board['bo_print_level'] && $member[mb_level] >= $board['bo_print_level']) { ?>
<script type="text/javascript" src="<?=$board_skin_path?>/../print_contents.cheditor.js"></script>
<a href="#" onclick="javascript:print_contents2('view_Contents', 'commentContents', '<?=$g4[title]?>')"><img src='<?=$board_skin_path?>/img/btn_print.gif' border=0 title='프린트' alt='print'></a>
<? }?>
</td>
</tr>
<tr><td colspan="2" height=3 style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;"></td></tr>
</table></td></tr>
<tr><td height=30>
<span style="float:left;">
글쓴이 : <?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
날짜 : <?=substr($view[wr_datetime],2,14)?>
조회 : <?=$view[wr_hit]?>
<? if ($is_good) { ?><font style="font:normal 11px 돋움; color:#BABABA;">추천</font> :<font style="font:normal 11px tahoma; color:#BABABA;"> <?=$view[wr_good]?> <?}?></font>
<? if ($is_nogood) { ?><font style="font:normal 11px 돋움; color:#BABABA;">비추천</font> :<font style="font:normal 11px tahoma; color:#BABABA;"> <?=$view[wr_nogood]?> <?}?></font>
</span>
<?if ($singo_href) { ?><span style="float:right;padding-right:5px;"><a href="javascript:win_singo('<?=$singo_href?>');"><img src='<?=$board_skin_path?>/img/icon_singo.gif' alt='singo'></a></span><?}?>
<?if ($unsingo_href) { ?><span style="float:right;padding-right:5px;"><a href="javascript:win_unsingo('<?=$unsingo_href?>');"><img src='<?=$board_skin_path?>/img/icon_unsingo.gif' alt='unsingo'></a></span><?}?>
</td></tr>
<!-- 게시글 주소를 복사하기 쉽게 하기 위해서 아랫 부분을 삽입 -->
<tr><td height=30>
<font style="font:normal 11px 돋움; color:#BABABA;"> 게시글 주소 : <a href="javascript:clipboard_trackback('<?=$posting_url?>');" style="letter-spacing:0;" title='이 글을 소개할 때는 이 주소를 사용하세요'><?=$posting_url;?></a></font>
<? if ($g4[use_bitly]) { ?>
<? if ($view[bitly_url]) { ?>
bitly : <span id="bitly_url" class=bitly style="font:normal 11px 돋움; color:#BABABA;"><a href=<?=$view[bitly_url]?> target=new><?=$view[bitly_url]?></a></span>
<? } else { ?>
bitly : <span id="bitly_url" class=bitly style="font:normal 11px 돋움; color:#BABABA;"></span>
<script language=javascript>
// encode 된 것을 넘겨주면, 알아서 decode해서 결과를 return 해준다.
// encode 하기 전의 url이 있어야 결과를 꺼낼 수 있기 때문에, 결국 2개를 넘겨준다.
// 왜? java script에서는 urlencode, urldecode가 없으니까. ㅎㅎ
// 글쿠 이거는 마지막에 해야 한다. 왜??? 그래야 정보를 html page에 업데이트 하쥐~!
get_bitly_g4('#bitly_url', '<?=$bo_table?>', '<?=$wr_id?>');
</script>
<?}?>
<?}?>
<?
if ($is_member && $g4[use_gblog]) {
$gb4_path="../blog";
include_once("$gb4_path/common.php");
?>
<script language=javascript>
// gblog에서 쓰는 java script 변수들을 설정
var gb4_blog = "<?=$gb4['bbs_path']?>";
</script>
<script type="text/javascript" src="<?="$gb4[path]/js/blog.js"?>"></script>
<a href="javascript:send_to_gblog('<?=$bo_table?>','<?=$wr_id?>')">블로그로보내기</a>
<? } ?>
</td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
//echo "<tr><td height=22> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
echo "<tr><td height=30> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle alt='file'> <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'><font style='normal 11px 돋움;'>{$view[file][$i][source]} ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</font></a></td></tr><tr><td height='1' bgcolor='#E7E7E7'></td></tr>";
}
}
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++) {
if ($view[link][$i]) {
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=30> <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle alt='link'> <a href='{$view[link_href][$i]}' target=_blank><font style='normal 11px 돋움;'>{$link} ({$view[link_hit][$i]})</font></a></td></tr><tr><td height='1' bgcolor='#E7E7E7'></td></tr>";
}
}
?>
<!-- <tr><td height=1 bgcolor=#"E7E7E7"></td></tr> //-->
<tr>
<td height="150" style='word-break:break-all;padding:10px;'>
<div id="resContents" class="resContents">
<?
// 파일 출력
ob_start();
for ($i=0; $i<=$view[file][count]; $i++) {
if ($view[file][$i][view]) {
// function resize_content($content, $width=0, $height=0, $quality=0, $thumb_create=0, $image_window=1, $water_mark="", $image_filter="", $image_min=0, $imgage_min_kb=0)
echo resize_dica($view[file][$i][view],250,300) . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
//echo resize_content($view[file][$i][view], 0,0,0,1,1,"","",300,90) . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
//echo $view[file][$i][view] . "<br/> " . $view[file][$i][content] . "<br/>"; if (trim($view[file][$i][content])) echo "<br/>";
}
}
$file_viewer = ob_get_contents();
ob_end_clean();
// 신고된 게시글의 이미지를 선택하여 출력하기
if ($view['wr_singo'] and trim($file_viewer)) {
$singo = "<div id='singo_file_title{$view[wr_id]}' class='singo_title'><font color=gray>신고가 접수된 게시물입니다. ";
$singo .= "<span class='singo_here' style='cursor:pointer;font-weight:bold;' onclick=\"document.getElementById('singo_file{$view[wr_id]}').style.display=(document.getElementById('singo_file{$view[wr_id]}').style.display=='none'?'':'none');\"><font color=red>여기</font></span>를 클릭하시면 첨부 이미지를 볼 수 있습니다.</font></div>";
$singo .= "<div id='singo_file{$view[wr_id]}' style='display:none;'><p>";
$singo .= $file_viewer;
$singo .= "</div>";
echo $singo;
} else {
echo $file_viewer;
}
?>
<!-- 내용 출력 -->
<span id="writeContents" class="ct lh">
<?
$write_contents=resize_dica($view[content],400,300);
echo $write_contents;
?>
</span>
<?//echo $view[rich_content]; //

<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<tr><td height="1" bgcolor="#E7E7E7"></td></tr>
<? if ($is_signature) { echo "<tr><td align='center' style='border-bottom:1px solid #E7E7E7; padding:5px 0;'>$signature</td></tr>"; } // 서명 출력 ?>
<?
// CCL 정보
$view[wr_ccl] = $write[wr_ccl] = mw_get_ccl_info($write[wr_ccl]);
?>
<? if ($board[bo_ccl] && $view[wr_ccl][by]) { ?>
<tr style='padding:10px;' class=mw_basic_ccl><td>
<a rel="license" href="<?=$view[wr_ccl][link]?>" title="<?=$view[wr_ccl][msg]?>" target=_blank><img src="<?=$board_skin_path?>/img/ccls_by.gif" alt='ccl'>
<? if ($view[wr_ccl][nc] == "nc") { ?><img src="<?=$board_skin_path?>/img/ccls_nc.gif" alt='ccl nc'><? } ?>
<? if ($view[wr_ccl][nd] == "nd") { ?><img src="<?=$board_skin_path?>/img/ccls_nd.gif" alt='ccl nd'><? } ?>
<? if ($view[wr_ccl][nd] == "sa") { ?><img src="<?=$board_skin_path?>/img/ccls_sa.gif" alt='ccl sa'><? } ?>
</a>
</td></tr>
<? } ?>
<? if ($board[bo_related] && $view[wr_related]) { ?>
<? $rels = mw_related($view[wr_related], $board[bo_related]); ?>
<? if (count($rels)) {?>
<tr>
<td>
<b>관련글</b> : <?=$view[wr_related]?>
</td>
</tr>
<tr>
<td>
<ul>
<? for ($i=0; $i<count($rels); $i++) { ?>
<li> <a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$rels[$i][wr_id]?>"> <?=$rels[$i][wr_subject]?> </a> </li>
<? } ?>
</ul>
</td>
</tr>
<? } ?>
<? } ?>
<?
// 인기검색어
if ($board[bo_popular]) {
unset($plist);
$plist = popular_list($board[bo_popular], $board[bo_popular_days], $bo_table);
if (count($plist) > 0) {
?>
<tr>
<td>
<b>인기검색어</b> :
<?
for ($i=0; $i<count($plist); $i++) {
if (trim($plist[$i][sfl]) == '' || strstr($plist[$i][sfl], '\%7C')) $plist[$i][sfl] = "wr_subject||wr_content";
?>
<a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sfl=<?=urlencode($plist[$i][sfl])?>&stx=<?=$plist[$i]['pp_word']?>"><?=$plist[$i]['pp_word']?></a>
<? } ?>
</td>
</tr>
<? } ?>
<? } ?>
<?
if ($board[bo_chimage]) {
include_once("$g4[path]/lib/chimage.lib.php");
$ch_list = chimage('', $bo_table, $wr_id);
if ($ch_list) {
echo "<tr>
<td>
$ch_list
</td>
</tr>
";
}
} ?>
</div>
</td>
</tr>
</table><br>
<?
// 광고가 있는 경우 광고를 연결
if (file_exists("$board_skin_path/adsense_view_comment.php"))
include_once("$board_skin_path/adsense_view_comment.php");
// 코멘트 입출력
if (!$board['bo_comment_read_level'])
include_once("./view_comment.php");
else if ($member['mb_level'] >= $board['bo_comment_read_level'])
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr>
<tr><td>
<? include_once("$g4[path]/adsense_page_bottom.php"); ?>
</td></tr>
</table><br>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
OnclickCheck(document.getElementById("writeContents"), '<?=$config[cf_link_target]?>');
}
</script>
<!-- 게시글 보기 끝 -->
댓글 전체
<? for ($i=0; $i<count($list); $i++) { ?> <?}?> 이 사이에 뷰스킨이 들어간다고 생각하시면 편하실꺼고
뷰스킨에서 DB를 불러오는 변수인 $view는 리스트에서 뷰를 보는거니까 $list로 바꿔주셔야될껍니다.
한번에 다 넣지 마시고 우선 table 틀만 넣은다음 항목을 하나씩 추가해보는 식으로 작업하시면 편하실껍니다.
뷰스킨에서 DB를 불러오는 변수인 $view는 리스트에서 뷰를 보는거니까 $list로 바꿔주셔야될껍니다.
한번에 다 넣지 마시고 우선 table 틀만 넣은다음 항목을 하나씩 추가해보는 식으로 작업하시면 편하실껍니다.
으, 해봤는데 잘 안되네요, 어쨋든 설명해준 개념은 조금 알겠습니다, 감사합니다~