스킨 문의드립니다 정보
스킨 문의드립니다- designcity 자기소개 아이디로 검색 회원게시물
- 조회 1,463
- 댓글 3
본문
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=108496&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%8A%A4%ED%82%A8%EC%83%B5&sop=and
위스킨을 사용하고 있는데요..
문제는 메뉴가 이미지에요.. 메뉴를 이미지 대신 text로 출력하게 하려면 어딜 수정해야하나요
skin.lib.php 소스입니다
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("makeThumbs")) {
function makeThumbs($oriPath, $oriFileName, $thmWidth="", $thmHeight="", $thmAlt="") {
global $g4, $board_skin_path;
$errorFilePrt = "
";
$oriFile = $oriPath . "/" . $oriFileName;
if (is_file($oriFile) == false) return $errorFilePrt; // 원본 부재
$thmPath = $oriPath . "/thumbs";
$thmFile = $thmPath . "/" . $oriFileName;
$oriSize = getimagesize($oriFile);
$oriWidth = $oriSize[0];
$oriHeight = $oriSize[1];
$oriType = $oriSize[2];
if ($oriType > 3) return $errorFilePrt; // 원본 이미지 타입 오류
$oriRate = $oriWidth / $oriHeight;
if ($thmWidth == "" && $thmHeight == "") return $errorFilePrt; // 썸네일 사이즈 미지정
if ($thmWidth == "") $thmWidth = $thmHeight * $oriRate;
if ($thmHeight == "") $thmHeight = $thmWidth / $oriRate;
$widthRate = $thmWidth / $oriWidth;
$heightRate = $thmHeight / $oriHeight;
$oriFilePrt = "
";
if ($widthRate >= 1 && $heightRate >= 1) return $oriFilePrt; // 리사이징 불필요
if (file_exists($thmFile)) { // 썸네일 유무
$fp = fopen($thmFile, "r");
$fstat = fstat($fp);
$thmFileTime = $fstat['ctime'];
fclose($fp);
$fp = fopen($oriFile, "r");
$fstat = fstat($fp);
$oriFileTime = $fstat['ctime'];
fclose($fp);
if (is_dir($oriPath . "/thumbs/")) {
$array1 = $array2 = array();
if ($dh = opendir($oriPath . "/thumbs/")) {
while (($file = readdir($dh)) !== false) {
$array1[] = $file;
}
closedir($dh);
}
if ($dh = opendir($oriPath . "/")) {
while (($file = readdir($dh)) !== false) {
$array2[] = $file;
}
closedir($dh);
}
$array_diff = array_diff($array1, $array2);
foreach ($array_diff as $k => $v) {
if (is_file($oriPath . "/thumbs/" . $v)) @unlink($oriPath . "/thumbs/" . $v);
}
}
$thmFileSize = getimagesize($thmFile);
if ($thmWidth == $thmFileSize[0] && $thmHeight == $thmFileSize[1]) { // 썸네일 갱신 불필요
if ($thmFileTime > $oriFileTime) {
$thmSize = getimagesize($thmFile);
$thmFilePrt = "
";
return $thmFilePrt;
}
}
}
@unlink($thmFile);
@mkdir($thmPath);
@chmod($thmPath, 0707);
if ($widthRate < $heightRate) {
$tempWidth = (int)($oriWidth * $heightRate);
$tempHeight = $thmHeight;
} else {
$tempWidth = $thmWidth;
$tempHeight = (int)($oriHeight * $widthRate);
}
if ($tempWidth == "") $tempWidth = $thmWidth;
if ($tempHeight == "") $tempHeight = $thmHeight;
switch($oriType) {
case(1) :
if(function_exists('imagecreateFromGif')) $tempImage = imagecreateFromGif($oriFile);
break;
case(2) :
if(function_exists('imagecreateFromJpeg')) $tempImage = imagecreateFromJpeg($oriFile);
break;
case(3) :
if(function_exists('imagecreateFromPng')) $tempImage = imagecreateFromPng($oriFile);
break;
}
if ($tempImage) {
if (function_exists('imagecreatetruecolor')) {
$tempCanvas = imagecreatetruecolor($thmWidth, $thmHeight);
} else {
$tempCanvas = imagecreate($thmWidth, $thmHeight);
}
if (function_exists('imagecopyresampled')) {
imagecopyresampled($tempCanvas, $tempImage, 0, 0, 0, 0, $tempWidth, $tempHeight, ImageSX($tempImage), ImageSY($tempImage));
} else {
imagecopyresized($tempCanvas, $tempImage, 0, 0, 0, 0, $tempWidth, $tempHeight, ImageSX($tempImage), ImageSY($tempImage));
}
ImageDestroy($tempImage);
ImageJpeg($tempCanvas, $thmFile, 100);
ImageDestroy($tempCanvas);
unset($tempImage, $tempCanvas);
}
$thmFilePrt = "
";
return $thmFilePrt;
}
}
?>
위스킨을 사용하고 있는데요..
문제는 메뉴가 이미지에요.. 메뉴를 이미지 대신 text로 출력하게 하려면 어딜 수정해야하나요
skin.lib.php 소스입니다
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("makeThumbs")) {
function makeThumbs($oriPath, $oriFileName, $thmWidth="", $thmHeight="", $thmAlt="") {
global $g4, $board_skin_path;
$errorFilePrt = "
$oriFile = $oriPath . "/" . $oriFileName;
if (is_file($oriFile) == false) return $errorFilePrt; // 원본 부재
$thmPath = $oriPath . "/thumbs";
$thmFile = $thmPath . "/" . $oriFileName;
$oriSize = getimagesize($oriFile);
$oriWidth = $oriSize[0];
$oriHeight = $oriSize[1];
$oriType = $oriSize[2];
if ($oriType > 3) return $errorFilePrt; // 원본 이미지 타입 오류
$oriRate = $oriWidth / $oriHeight;
if ($thmWidth == "" && $thmHeight == "") return $errorFilePrt; // 썸네일 사이즈 미지정
if ($thmWidth == "") $thmWidth = $thmHeight * $oriRate;
if ($thmHeight == "") $thmHeight = $thmWidth / $oriRate;
$widthRate = $thmWidth / $oriWidth;
$heightRate = $thmHeight / $oriHeight;
$oriFilePrt = "
if ($widthRate >= 1 && $heightRate >= 1) return $oriFilePrt; // 리사이징 불필요
if (file_exists($thmFile)) { // 썸네일 유무
$fp = fopen($thmFile, "r");
$fstat = fstat($fp);
$thmFileTime = $fstat['ctime'];
fclose($fp);
$fp = fopen($oriFile, "r");
$fstat = fstat($fp);
$oriFileTime = $fstat['ctime'];
fclose($fp);
if (is_dir($oriPath . "/thumbs/")) {
$array1 = $array2 = array();
if ($dh = opendir($oriPath . "/thumbs/")) {
while (($file = readdir($dh)) !== false) {
$array1[] = $file;
}
closedir($dh);
}
if ($dh = opendir($oriPath . "/")) {
while (($file = readdir($dh)) !== false) {
$array2[] = $file;
}
closedir($dh);
}
$array_diff = array_diff($array1, $array2);
foreach ($array_diff as $k => $v) {
if (is_file($oriPath . "/thumbs/" . $v)) @unlink($oriPath . "/thumbs/" . $v);
}
}
$thmFileSize = getimagesize($thmFile);
if ($thmWidth == $thmFileSize[0] && $thmHeight == $thmFileSize[1]) { // 썸네일 갱신 불필요
if ($thmFileTime > $oriFileTime) {
$thmSize = getimagesize($thmFile);
$thmFilePrt = "
return $thmFilePrt;
}
}
}
@unlink($thmFile);
@mkdir($thmPath);
@chmod($thmPath, 0707);
if ($widthRate < $heightRate) {
$tempWidth = (int)($oriWidth * $heightRate);
$tempHeight = $thmHeight;
} else {
$tempWidth = $thmWidth;
$tempHeight = (int)($oriHeight * $widthRate);
}
if ($tempWidth == "") $tempWidth = $thmWidth;
if ($tempHeight == "") $tempHeight = $thmHeight;
switch($oriType) {
case(1) :
if(function_exists('imagecreateFromGif')) $tempImage = imagecreateFromGif($oriFile);
break;
case(2) :
if(function_exists('imagecreateFromJpeg')) $tempImage = imagecreateFromJpeg($oriFile);
break;
case(3) :
if(function_exists('imagecreateFromPng')) $tempImage = imagecreateFromPng($oriFile);
break;
}
if ($tempImage) {
if (function_exists('imagecreatetruecolor')) {
$tempCanvas = imagecreatetruecolor($thmWidth, $thmHeight);
} else {
$tempCanvas = imagecreate($thmWidth, $thmHeight);
}
if (function_exists('imagecopyresampled')) {
imagecopyresampled($tempCanvas, $tempImage, 0, 0, 0, 0, $tempWidth, $tempHeight, ImageSX($tempImage), ImageSY($tempImage));
} else {
imagecopyresized($tempCanvas, $tempImage, 0, 0, 0, 0, $tempWidth, $tempHeight, ImageSX($tempImage), ImageSY($tempImage));
}
ImageDestroy($tempImage);
ImageJpeg($tempCanvas, $thmFile, 100);
ImageDestroy($tempCanvas);
unset($tempImage, $tempCanvas);
}
$thmFilePrt = "
return $thmFilePrt;
}
}
?>
댓글 전체

list.skin.php 화일을 여시면 상단에
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
라고 있는데요. 그 아래 폼테그 부분 소스<form></form>까지가 이미지 적용된 부분입니다.
해당 폼테그인 53~80라인까지를 삭제하시고
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
그누 베이직 스킨에 적용된 위의 폼테그를 입력하시면
게시판 설정에서 적용된 카테고리가 텍스트로 출력됩니다. 단 가로형이 아닌
셀렉트 방식이 되겠지요 ^^
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
라고 있는데요. 그 아래 폼테그 부분 소스<form></form>까지가 이미지 적용된 부분입니다.
해당 폼테그인 53~80라인까지를 삭제하시고
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
그누 베이직 스킨에 적용된 위의 폼테그를 입력하시면
게시판 설정에서 적용된 카테고리가 텍스트로 출력됩니다. 단 가로형이 아닌
셀렉트 방식이 되겠지요 ^^
돌쇠님 감사합니다. 근데.. 가로로 정렬은 안될까요? 셀렉트 박스가 아닌 가로로 출력해주고 싶은데요,ㅠㅠ
