최근게시물 썸네일 에러요.. 정보
최근게시물 썸네일 에러요..본문
안녕하세요 .. 최근게시물(갤러리)을 여러 게시판에서 불러오는 스킨을 이용해 메인페이지에 넣었는데 갤러리 이미지가 나오지 않습니다.
사용설명서에도 대충 적혀있긴 한데.. 제가 초짜라.. 어쩔줄 몰라 쩔쩔 해매이고 있습니다.
아래는 해당 소스입니다.
lib/arr_new.lib.php
<?
if (!defined('_GNUBOARD_')) exit;
/*------------------------------------------------------------------------------------------------
배열을 이용해 특정 게시판에서 최신글 뽑아오기 - 라이브러리
작성자 : 휴온 박성광
수정일 : 2008.10.02
http://www.huon.kr
------------------------------------------------------------------------------------------------*/
// 최신글 추출
function arr_new($skin_dir="", $board_arr=array(), $rows=10, $subject_len=40, $options="")
{
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();
$board_list = array();
//검색조건
if(count($board_arr)>0){
$qry_bo_search=" bo_table in(";
for($i=0; $i<count($board_arr); $i++) {
$bo_table=$board_arr[$i];
$qry_bo_search .= "'$bo_table'";
if($i<count($board_arr)-1) $qry_bo_search .= ", ";
}
$qry_bo_search .= ")";
} else {
$qry_bo_search="(1)";
}
//echo $qry_bo_search;
//new에서 해당되는 게시판의 최신글 뽑아오기
$sql = "select bo_table, wr_id from $g4[board_new_table]
where wr_id = wr_parent and $qry_bo_search order by bn_datetime desc LIMIT 0,$rows";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$bo_table=$row[bo_table];
$write_table=$g4['write_prefix'].$bo_table;
$board_sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board_list[$i]=sql_fetch($board_sql);
$list[$i]=sql_fetch("select * from $write_table where wr_id='$row[wr_id]' ");
// 이미지 정보 가져오기
$list[$i]['file'] = get_file($board_list[$i][bo_table], $list[$i][wr_id]);
//기타 설정
if ($subject_len)
$list[$i]['subject'] = conv_subject($list[$i]['wr_subject'], $subject_len, "…");
else
$list[$i]['subject'] = conv_subject($list[$i]['wr_subject'], $board_list[$i]['bo_subject_len'], "…");
$list[$i][href]="$g4[bbs_path]/board.php?bo_table={$board_list[$i][bo_table]}&wr_id={$list[$i][wr_id]}".$qstr;
//$list[$i]['is_notice'] = preg_match("/[^0-9]{0,1}{$list[$i]['wr_id']}[\r]{0,1}/", $board_list[$i]['bo_notice']);
$list[$i]['is_notice']=false;
$arr_notice = split("\n", trim($board_list[$i]['bo_notice']));
if(in_array($list[$i]['wr_id'], $arr_notice)) $list[$i]['is_notice']=true;
echo "<!--".$board_list[$i]['bo_table']."/".$board_list[$i]['bo_notice']."-->";
$list[$i]['icon_new'] = "";
if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board_list[$i]['bo_new'] * 3600)))
$list[$i]['icon_new'] = "<img src='$latest_skin_path/img/icon_new.gif' align='absmiddle'>";
$list[$i]['comment_cnt'] = "";
if ($list[$i]['wr_comment'])
$list[$i]['comment_cnt'] = "({$list[$i][wr_comment]})";
if ($board_list[$i]['bo_use_comment'])
$list[$i]['comment_href'] = "javascript:win_comment('$g4[bbs_path]/board.php?bo_table=$board_list[$i][bo_table]&wr_id=$list[$i][wr_id]&cwin=1');";
else
$list[$i]['comment_href'] = $list[$i]['href'];
$list[$i]['icon_secret'] = "";
if (strstr($list[$i]['wr_option'], "secret"))
$list[$i]['icon_secret'] = "<img src='$latest_skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i]['datetime'] = substr($list[$i]['wr_datetime'],0,10);
$list[$i]['datetime2'] = $list[$i]['wr_datetime'];
if ($list[$i]['datetime'] == $g4['time_ymd'])
$list[$i]['datetime2'] = substr($list[$i]['datetime2'],11,5);
else
$list[$i]['datetime2'] = substr($list[$i]['datetime2'],5,5);
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
lastest/arr_new/latest.skin.php파일 소스입니다.
<?
/* ------------------------------------------------
배열을 이용해 특정 게시판에서 최신글 뽑아오기 - 스킨
작성자 : 휴온 박성광
작성일 : 2008.09.27
http://www.huon.kr
------------------------------------------------ */
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/arr_new.css">
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<td height="20" style="padding-top:5px;"> <img src='<?=$latest_skin_path?>/img/icon.gif' align="absmiddle"> <font color=#8B0000 font-size="9pt">최근 업데이트 컨텐츠</font></td>
<td width="50" align="center" style="padding-top:5px;"></td>
</tr>
<tr>
<td height=2 colspan=2></td>
</tr>
<tr>
<td height=1 colspan=2 bgcolor="#c5c5c5"></td>
</tr>
</table>
<table width="100%" cellpadding=0 cellspacing=0>
<?
for ($i=0; $i<count($list); $i++) {
?>
<tr>
<td class="arr_new_list">
<?
echo "<img src='$latest_skin_path/img/board_icon.gif' align=absmiddle>";
echo "<a href='{$list[$i][href]}'>";
echo " <span style='font-size:8pt; color:#6495ED;'>[{$board_list[$i][bo_subject]}]</span> ";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_secret];
?>
</td>
<td align="center" width="60" class="arr_new_list">
<font color=#bababa class=small><?=$list[$i][datetime2];?></font>
</td>
</tr>
<?
}//end for
?>
<? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
여러 고수님들의 아낌없는 지도 부탁드립니다.
사용설명서에도 대충 적혀있긴 한데.. 제가 초짜라.. 어쩔줄 몰라 쩔쩔 해매이고 있습니다.
아래는 해당 소스입니다.
lib/arr_new.lib.php
<?
if (!defined('_GNUBOARD_')) exit;
/*------------------------------------------------------------------------------------------------
배열을 이용해 특정 게시판에서 최신글 뽑아오기 - 라이브러리
작성자 : 휴온 박성광
수정일 : 2008.10.02
http://www.huon.kr
------------------------------------------------------------------------------------------------*/
// 최신글 추출
function arr_new($skin_dir="", $board_arr=array(), $rows=10, $subject_len=40, $options="")
{
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();
$board_list = array();
//검색조건
if(count($board_arr)>0){
$qry_bo_search=" bo_table in(";
for($i=0; $i<count($board_arr); $i++) {
$bo_table=$board_arr[$i];
$qry_bo_search .= "'$bo_table'";
if($i<count($board_arr)-1) $qry_bo_search .= ", ";
}
$qry_bo_search .= ")";
} else {
$qry_bo_search="(1)";
}
//echo $qry_bo_search;
//new에서 해당되는 게시판의 최신글 뽑아오기
$sql = "select bo_table, wr_id from $g4[board_new_table]
where wr_id = wr_parent and $qry_bo_search order by bn_datetime desc LIMIT 0,$rows";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$bo_table=$row[bo_table];
$write_table=$g4['write_prefix'].$bo_table;
$board_sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board_list[$i]=sql_fetch($board_sql);
$list[$i]=sql_fetch("select * from $write_table where wr_id='$row[wr_id]' ");
// 이미지 정보 가져오기
$list[$i]['file'] = get_file($board_list[$i][bo_table], $list[$i][wr_id]);
//기타 설정
if ($subject_len)
$list[$i]['subject'] = conv_subject($list[$i]['wr_subject'], $subject_len, "…");
else
$list[$i]['subject'] = conv_subject($list[$i]['wr_subject'], $board_list[$i]['bo_subject_len'], "…");
$list[$i][href]="$g4[bbs_path]/board.php?bo_table={$board_list[$i][bo_table]}&wr_id={$list[$i][wr_id]}".$qstr;
//$list[$i]['is_notice'] = preg_match("/[^0-9]{0,1}{$list[$i]['wr_id']}[\r]{0,1}/", $board_list[$i]['bo_notice']);
$list[$i]['is_notice']=false;
$arr_notice = split("\n", trim($board_list[$i]['bo_notice']));
if(in_array($list[$i]['wr_id'], $arr_notice)) $list[$i]['is_notice']=true;
echo "<!--".$board_list[$i]['bo_table']."/".$board_list[$i]['bo_notice']."-->";
$list[$i]['icon_new'] = "";
if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board_list[$i]['bo_new'] * 3600)))
$list[$i]['icon_new'] = "<img src='$latest_skin_path/img/icon_new.gif' align='absmiddle'>";
$list[$i]['comment_cnt'] = "";
if ($list[$i]['wr_comment'])
$list[$i]['comment_cnt'] = "({$list[$i][wr_comment]})";
if ($board_list[$i]['bo_use_comment'])
$list[$i]['comment_href'] = "javascript:win_comment('$g4[bbs_path]/board.php?bo_table=$board_list[$i][bo_table]&wr_id=$list[$i][wr_id]&cwin=1');";
else
$list[$i]['comment_href'] = $list[$i]['href'];
$list[$i]['icon_secret'] = "";
if (strstr($list[$i]['wr_option'], "secret"))
$list[$i]['icon_secret'] = "<img src='$latest_skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i]['datetime'] = substr($list[$i]['wr_datetime'],0,10);
$list[$i]['datetime2'] = $list[$i]['wr_datetime'];
if ($list[$i]['datetime'] == $g4['time_ymd'])
$list[$i]['datetime2'] = substr($list[$i]['datetime2'],11,5);
else
$list[$i]['datetime2'] = substr($list[$i]['datetime2'],5,5);
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
lastest/arr_new/latest.skin.php파일 소스입니다.
<?
/* ------------------------------------------------
배열을 이용해 특정 게시판에서 최신글 뽑아오기 - 스킨
작성자 : 휴온 박성광
작성일 : 2008.09.27
http://www.huon.kr
------------------------------------------------ */
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/arr_new.css">
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<td height="20" style="padding-top:5px;"> <img src='<?=$latest_skin_path?>/img/icon.gif' align="absmiddle"> <font color=#8B0000 font-size="9pt">최근 업데이트 컨텐츠</font></td>
<td width="50" align="center" style="padding-top:5px;"></td>
</tr>
<tr>
<td height=2 colspan=2></td>
</tr>
<tr>
<td height=1 colspan=2 bgcolor="#c5c5c5"></td>
</tr>
</table>
<table width="100%" cellpadding=0 cellspacing=0>
<?
for ($i=0; $i<count($list); $i++) {
?>
<tr>
<td class="arr_new_list">
<?
echo "<img src='$latest_skin_path/img/board_icon.gif' align=absmiddle>";
echo "<a href='{$list[$i][href]}'>";
echo " <span style='font-size:8pt; color:#6495ED;'>[{$board_list[$i][bo_subject]}]</span> ";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#333333;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_secret];
?>
</td>
<td align="center" width="60" class="arr_new_list">
<font color=#bababa class=small><?=$list[$i][datetime2];?></font>
</td>
</tr>
<?
}//end for
?>
<? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
여러 고수님들의 아낌없는 지도 부탁드립니다.
댓글 전체
lastest/arr_new/latest.skin.php
이 파일은 썸네일을 만들거나 추출하는 내용이 전혀 없습니다.
썸네일을 만드는 소스를 추가하시거나
혹은 썸네일을 추출해서 보여주는 다른 최근 게시물 스킨을 업로드 하시고
사용하세요.
이 파일은 썸네일을 만들거나 추출하는 내용이 전혀 없습니다.
썸네일을 만드는 소스를 추가하시거나
혹은 썸네일을 추출해서 보여주는 다른 최근 게시물 스킨을 업로드 하시고
사용하세요.