최근갤러리의 에디터첨부 이미지 출력 정보
최근갤러리의 에디터첨부 이미지 출력본문
안녕하세요. 게시판은 배추베이직 게시판을 사용하여 스타일디비님의 최근갤러리 스킨을
사용할려고 합니다.
스타일디비님의 최근갤러리에서 불당썸을 사용하고있는데요.
현재 파일첨부이미지만 최근갤러리에 출력이 되고,
에디터 이미지 삽입은 출력이 안되고 있습니다.
치에디터 사용중이구요. 관련 질문답변을 검색해보고
했는데도 안되네요.;;;
답변 부탁드릴께요...ㅠㅠ 3일째 요것만 붙들고 있어 멘붕직전입니다.;;;;
아래 코드입니다.
<?
/**
* Bechu-Basic Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$cols = 4; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$img_width = '150'; //썸네일 가로길이
$img_height = '116'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
#mw_basic #mw_basic_hot_list li.hot_icon_1 { background:url(<?=$board_skin_path?>/img/icon_hot_1.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_2 { background:url(<?=$board_skin_path?>/img/icon_hot_2.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_3 { background:url(<?=$board_skin_path?>/img/icon_hot_3.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_4 { background:url(<?=$board_skin_path?>/img/icon_hot_4.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_5 { background:url(<?=$board_skin_path?>/img/icon_hot_5.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_6 { background:url(<?=$board_skin_path?>/img/icon_hot_6.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_7 { background:url(<?=$board_skin_path?>/img/icon_hot_7.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_8 { background:url(<?=$board_skin_path?>/img/icon_hot_8.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_9 { background:url(<?=$board_skin_path?>/img/icon_hot_9.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_10 { background:url(<?=$board_skin_path?>/img/icon_hot_10.gif) no-repeat left 2px; }
</style>
<? if ($mw_basic[cf_hot]) {
switch ($mw_basic[cf_hot]) {
case "1": $hot_start = ""; $hot_title = "실시간"; break;
case "2": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*7); $hot_title = "주간"; break;
case "3": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*30); $hot_title = "월간"; break;
case "4": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24); $hot_title = "일간"; break;
}
$sql_between = 1;
if ($mw_basic[cf_hot] > 1) {
$sql_between = " wr_datetime between '$hot_start' and '$g4[time_ymdhis]' ";
}
$sql = "select *
from $write_table
where wr_is_comment = 0
and $sql_between
order by wr_{$mw_basic[cf_hot_basis]} desc
limit 4";
$qry = sql_query($sql);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-bottom:4px;">
<tr>
<td align="center" valign="middle" style="border:1px solid #d9d9d9; background-color:#f2efe9; padding:14px; margin-bottom:10px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<?
for ($i=0; $row = sql_fetch_array($qry); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
$hot_list = get_list($row, $board, $board_skin_path);
?>
<td width="160" align="center" valign='top' height="150" style="padding:5px;">
<?
$file = $hot_list[file][0][path] .'/'. $hot_list[file][0][file];
if ($file=="/")
$file = $data_path . "/thumb/" . "noimg.gif";
$img = thumbnail($file, $img_width, $img_height, 0, 2, $img_quality);
$img = "<img src='$img' width='$img_width' height='$img_height' border='0' style='border:1 #eee solid; padding:2px;' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter=''>";
echo "<a href='{$hot_list[href]}'>$img</a>";
?>
<div style="margin:3px; height:28px; text-align:left; padding:3px 3px 3px 0px; font-size:11px; word-break:break-all;"><a href="<?=$hot_list[href]?>"><span style="color:#494949;"><?=$hot_list['subject']?></span></a></div>
<div style="margin:3px; text-align:left;"><span style="color:#FF3300;"><?=$hot_list[wr_name]?></span> <span style="color:#000000;"> 조회</span> <span style="font-size:11px; color:#CC0033;"><?=$hot_list[wr_hit]?></span></div>
</td>
<? } ?>
</tr>
</table>
</td></tr></table>
<? } ?>
관련 검색중 시하님이 답변하신 코드를 참고삼아서
요것만 $file = $hot_list[file][0][path] .'/'. $hot_list[file][0][file];
이렇게
if($hot_list[$i][file][0][file])
$file = $hot_list[$i][file][0][path] .'/'. $hot_list[$i][file][0][file];
else if (eregi("data/[^<>]*\.(gif|jpg|png|bmp)", $list[$i]['wr_content'], $tmp))
$file = $g4['path'].'/'.$tmp[0]; // 파일명
바꾸어보았습니다.;; 아예 파일첨부한 이미지마저 출력이 안되네요.;;;
완전 초보입니다. 답변좀 꼭 부탁드릴께요..ㅠㅠ
사용할려고 합니다.
스타일디비님의 최근갤러리에서 불당썸을 사용하고있는데요.
현재 파일첨부이미지만 최근갤러리에 출력이 되고,
에디터 이미지 삽입은 출력이 안되고 있습니다.
치에디터 사용중이구요. 관련 질문답변을 검색해보고
했는데도 안되네요.;;;
답변 부탁드릴께요...ㅠㅠ 3일째 요것만 붙들고 있어 멘붕직전입니다.;;;;
아래 코드입니다.
<?
/**
* Bechu-Basic Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$cols = 4; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$img_width = '150'; //썸네일 가로길이
$img_height = '116'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
#mw_basic #mw_basic_hot_list li.hot_icon_1 { background:url(<?=$board_skin_path?>/img/icon_hot_1.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_2 { background:url(<?=$board_skin_path?>/img/icon_hot_2.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_3 { background:url(<?=$board_skin_path?>/img/icon_hot_3.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_4 { background:url(<?=$board_skin_path?>/img/icon_hot_4.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_5 { background:url(<?=$board_skin_path?>/img/icon_hot_5.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_6 { background:url(<?=$board_skin_path?>/img/icon_hot_6.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_7 { background:url(<?=$board_skin_path?>/img/icon_hot_7.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_8 { background:url(<?=$board_skin_path?>/img/icon_hot_8.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_9 { background:url(<?=$board_skin_path?>/img/icon_hot_9.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_10 { background:url(<?=$board_skin_path?>/img/icon_hot_10.gif) no-repeat left 2px; }
</style>
<? if ($mw_basic[cf_hot]) {
switch ($mw_basic[cf_hot]) {
case "1": $hot_start = ""; $hot_title = "실시간"; break;
case "2": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*7); $hot_title = "주간"; break;
case "3": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*30); $hot_title = "월간"; break;
case "4": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24); $hot_title = "일간"; break;
}
$sql_between = 1;
if ($mw_basic[cf_hot] > 1) {
$sql_between = " wr_datetime between '$hot_start' and '$g4[time_ymdhis]' ";
}
$sql = "select *
from $write_table
where wr_is_comment = 0
and $sql_between
order by wr_{$mw_basic[cf_hot_basis]} desc
limit 4";
$qry = sql_query($sql);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-bottom:4px;">
<tr>
<td align="center" valign="middle" style="border:1px solid #d9d9d9; background-color:#f2efe9; padding:14px; margin-bottom:10px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<?
for ($i=0; $row = sql_fetch_array($qry); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
$hot_list = get_list($row, $board, $board_skin_path);
?>
<td width="160" align="center" valign='top' height="150" style="padding:5px;">
<?
$file = $hot_list[file][0][path] .'/'. $hot_list[file][0][file];
if ($file=="/")
$file = $data_path . "/thumb/" . "noimg.gif";
$img = thumbnail($file, $img_width, $img_height, 0, 2, $img_quality);
$img = "<img src='$img' width='$img_width' height='$img_height' border='0' style='border:1 #eee solid; padding:2px;' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter=''>";
echo "<a href='{$hot_list[href]}'>$img</a>";
?>
<div style="margin:3px; height:28px; text-align:left; padding:3px 3px 3px 0px; font-size:11px; word-break:break-all;"><a href="<?=$hot_list[href]?>"><span style="color:#494949;"><?=$hot_list['subject']?></span></a></div>
<div style="margin:3px; text-align:left;"><span style="color:#FF3300;"><?=$hot_list[wr_name]?></span> <span style="color:#000000;"> 조회</span> <span style="font-size:11px; color:#CC0033;"><?=$hot_list[wr_hit]?></span></div>
</td>
<? } ?>
</tr>
</table>
</td></tr></table>
<? } ?>
관련 검색중 시하님이 답변하신 코드를 참고삼아서
요것만 $file = $hot_list[file][0][path] .'/'. $hot_list[file][0][file];
이렇게
if($hot_list[$i][file][0][file])
$file = $hot_list[$i][file][0][path] .'/'. $hot_list[$i][file][0][file];
else if (eregi("data/[^<>]*\.(gif|jpg|png|bmp)", $list[$i]['wr_content'], $tmp))
$file = $g4['path'].'/'.$tmp[0]; // 파일명
바꾸어보았습니다.;; 아예 파일첨부한 이미지마저 출력이 안되네요.;;;
완전 초보입니다. 답변좀 꼭 부탁드릴께요..ㅠㅠ
댓글 전체