[문의]처음으로 스킨을 만들어 봤는데..질문좀 부탁드릴께요 정보
[문의]처음으로 스킨을 만들어 봤는데..질문좀 부탁드릴께요본문
처음으로..스킨을 만들어봤슴다..^^
짜집기 해서 만든건데..헤헤
근데..2가지 정도 문제가 있슴다..
1. 이미지 사이즈 조정 소스가 작동을 안하네요..ㅠ.ㅠ
2. 갤러리를 테이블 중간에 나오도록 테그 했는데..좌측으로 붙혀서 나옵니다..
왜 그런지 알 수 있을까요?
소스 하고..스킨 첨부함다..^^
<meta name="generator" content="Namo WebEditor">
<p align="center"><?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 30; //썸네일 가로길이
$img_height = 30; //썸네일 세로길이
$img_quality = 60; //퀼리티 100이하로 설정
$subject_size= 60; //제목 보여질 글자수
$content_size= 90; //내용 보여질 글자수
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbLatest'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<?
for ($i=0; $i<count($list); $i++)
{
$img = "<img src='$g4_path/img/noimage.png' border=1 width='$img_width' height='$img_height' title='이미지 없음' align=left style='margin-right:5px; border:1 #222222 solid;'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
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
break;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=1 align=left style='margin-right:5px; border:1 #222222 solid;'>";
?>
<?
$datetime = substr($list[$i][wr_datetime],0,10);
$datetime2 = $list[$i][wr_datetime];
if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";
if ($datetime == $g4[time_ymd])
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);
$list[$i][datetime] = $datetime;
$list[$i][datetime2] = $datetime2;
$a[$i] = array(
"wr_date"=>$datetime2,
);
?>
<?
$rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
$a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
$a_img="<a href='{$list[$i][href]}'>$img</a>";
$a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
$rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,'..');
$rw_content = strip_tags($rw_content);
?>
<TABLE cellSpacing=0 cellPadding=0 width="114" align=center
background="<?=$latest_skin_path?>/img/mid.gif" border=0 height="129">
<TBODY>
<TR>
<TD height="4" width="114"><IMG height="8"
src="<?=$latest_skin_path?>/img/top.gif" width="118"></TD></TR>
<TR>
<TD height=18 width="114">
<table border="0" width="118">
<tr>
<td width="108%" valign="top">
<p align="center"> <img src="<?=$latest_skin_path?>/img/title.gif" width="107" height="16" border="0">
</p>
</td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD height="66%" width="114%" valign="top">
<table border="0" width="118" height="108">
<tr>
<td width="108%" valign="top" height="63"><?=$a_img?></td>
</tr>
<tr>
<td width="108%" height="39" valign="top"><?=$a_link?> <?=$a_comment?></td>
</tr>
<? } ?>
</table>
</TD>
</TR>
<TR>
<TD height="10" width="114"><IMG height="10" src="<?=$latest_skin_path?>/img/tail.gif" width="118"
border=0></TD></TR></TBODY></TABLE></p>
짜집기 해서 만든건데..헤헤
근데..2가지 정도 문제가 있슴다..
1. 이미지 사이즈 조정 소스가 작동을 안하네요..ㅠ.ㅠ
2. 갤러리를 테이블 중간에 나오도록 테그 했는데..좌측으로 붙혀서 나옵니다..
왜 그런지 알 수 있을까요?
소스 하고..스킨 첨부함다..^^
<meta name="generator" content="Namo WebEditor">
<p align="center"><?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 30; //썸네일 가로길이
$img_height = 30; //썸네일 세로길이
$img_quality = 60; //퀼리티 100이하로 설정
$subject_size= 60; //제목 보여질 글자수
$content_size= 90; //내용 보여질 글자수
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbLatest'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<?
for ($i=0; $i<count($list); $i++)
{
$img = "<img src='$g4_path/img/noimage.png' border=1 width='$img_width' height='$img_height' title='이미지 없음' align=left style='margin-right:5px; border:1 #222222 solid;'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
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
break;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=1 align=left style='margin-right:5px; border:1 #222222 solid;'>";
?>
<?
$datetime = substr($list[$i][wr_datetime],0,10);
$datetime2 = $list[$i][wr_datetime];
if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";
if ($datetime == $g4[time_ymd])
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);
$list[$i][datetime] = $datetime;
$list[$i][datetime2] = $datetime2;
$a[$i] = array(
"wr_date"=>$datetime2,
);
?>
<?
$rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
$a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
$a_img="<a href='{$list[$i][href]}'>$img</a>";
$a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
$rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,'..');
$rw_content = strip_tags($rw_content);
?>
<TABLE cellSpacing=0 cellPadding=0 width="114" align=center
background="<?=$latest_skin_path?>/img/mid.gif" border=0 height="129">
<TBODY>
<TR>
<TD height="4" width="114"><IMG height="8"
src="<?=$latest_skin_path?>/img/top.gif" width="118"></TD></TR>
<TR>
<TD height=18 width="114">
<table border="0" width="118">
<tr>
<td width="108%" valign="top">
<p align="center"> <img src="<?=$latest_skin_path?>/img/title.gif" width="107" height="16" border="0">
</p>
</td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD height="66%" width="114%" valign="top">
<table border="0" width="118" height="108">
<tr>
<td width="108%" valign="top" height="63"><?=$a_img?></td>
</tr>
<tr>
<td width="108%" height="39" valign="top"><?=$a_link?> <?=$a_comment?></td>
</tr>
<? } ?>
</table>
</TD>
</TR>
<TR>
<TD height="10" width="114"><IMG height="10" src="<?=$latest_skin_path?>/img/tail.gif" width="118"
border=0></TD></TR></TBODY></TABLE></p>
댓글 전체
답변이 없어서 한 글 올립니다.
위. 소스만 가지고 알 수가 없습니다.
자기가 직접 만든 프로그램도, 실행페이지를 만들어야 알 수 있는데.
무작정 소스만 올리시면, 어찌 알 수 있겠습니까? ㅠ,ㅠ
실행페이지. (예제페이지)를 만들어서, 링크로 올려주시면, 많은 분들이 답변을 주시리라 생각합니다.^^
위. 소스만 가지고 알 수가 없습니다.
자기가 직접 만든 프로그램도, 실행페이지를 만들어야 알 수 있는데.
무작정 소스만 올리시면, 어찌 알 수 있겠습니까? ㅠ,ㅠ
실행페이지. (예제페이지)를 만들어서, 링크로 올려주시면, 많은 분들이 답변을 주시리라 생각합니다.^^
스킨은 자기 디렉토리를 정확하게 설정해야 합니다.
그럼 즐거운 하루되세요
그럼 즐거운 하루되세요