(질문변경) Marquee 태그를 대체할 수 있는 script 좀 알려 주세요.... 정보
(질문변경) Marquee 태그를 대체할 수 있는 script 좀 알려 주세요....
본문
앞서의 질문은 제가 생각해도 좀 무모한 질문이었습니다. 답답한 마음에 글을 올리긴 했지만, 답을 해주려면, 너무 많은 수고를 하셔야 할 것같더라구요... 호산나 님의 스킨을 다운받아서 전체적으로 다 디벼(?) 봐야할테니깐요....
변경한 질문도 어쩜, 복잡한 내용일 지도 모르겠네요....
암튼 질문 들어 갑니다.
현재, 아래와 같이 marquee 태그가 들어간 이미지 최신글을 사용하고 있는데, 이게 크롬 같은 데서는 작동이 안되더라구요... 작동이 안될 뿐 아니라, 썸네일 이지미가 전체 다 노출되면서 화면도 깨져버리고요.. (화면상에는 3~4개의 썸네일만 보이면서 슬라이드해야 하는데, 8개의 썸네일이 한꺼번에 쫙 떠버립니다)
아래의 기본구조는 그대로 유지하면서, marquee 기능을 수행할 수 있는 좋은 묘안이 없을까요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_1]) alert("해당 게시판 설정 : 여분 필드 1 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_2]) alert("해당 게시판 설정 : 여분 필드 2 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/PDT";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr><td align="center">
<marquee trueSpeed behavior=alternate onmouseover=stop(); onmouseout=start(); scrollAmount=1 scrollDelay=30>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo "<td width=20> </td>";
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][bo_table].$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 = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][bo_table].$list[$i][wr_id], $board[bo_2]);
chmod($thumb_path.'/'.$list[$i][bo_table].$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="5" align="center"></td>
</tr>
<tr>
<td>
<table width="160" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align=center width='140' height='113' style='width:140px;height:113px;border:1px solid #CCCCCC; padding:3px'><div style='width:140px; height:113px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}' onfocus='this.blur()' title='{$list[$i][subject]}'>{$img}</a></div></td>
<td width="10"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5" align="center"></td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
</marquee>
</td></tr>
</table>
아래는 먼저 올렸던 질문입니다......
"호산나"님이 올려주신 자동 슬라이드 최신갤러리 스킨에 두가지 기능을 덧붙여 사용하고 싶은데, 잘 안되네요.
1) 한개의 게시판에서 이미지를 추출하지 않고, 그룹에 포함된 게시판 모두에서 이미지를 가져오고 싶습니다.
즉, echo latest("imgslide", "게시판테이블명", 8, 20) 이런 형태가 아니라,
echo latest("imgslide", "그룹명", 8, 20); 이런 식으로 했으면 합니다.
2) 가져오는 이미지는 랜덤하게 가져오고 싶습니다. 최근 글 순서가 아니라 무작위로 추출하고자 합니다.
"호산나"님 스킨에서 어디를 손봐야 할 지 도와주시면 고맙겠습니다.
.
<질답게시판에는 글 등록이 안되네요... 저만 그런 건가요? 아님, 지금 이곳에 문제가 있는 건가요?
구글 크롬으로 접속중인데, 이것 때문인가요?>
추천
0
0
관련링크
댓글 2개
근데 궁금한게잇는데요.. 질문내용들을 왜 죄다 자유게시판에 올리십니까?
구글 크롬이 안되시면 익스플로러로 접속하시면 될테구요.
어차피 홈페이지 관리자라면 다양한 버전의 웹브라우저는 갖고잇을테니간요.
구글 크롬이 안되시면 익스플로러로 접속하시면 될테구요.
어차피 홈페이지 관리자라면 다양한 버전의 웹브라우저는 갖고잇을테니간요.
저도 구글크롬 이용중인데 질답 이용 잘됩니다.