swf 배너는 어떻게?
이하 배너최신글 스킨인데요... 이미지만 되고 swf파일 즉 플래쉬는 나오질 않네요,,,
어떻게 고치면 되는지 아시는 분 계시면 코멘트 부탁합니다..
================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<table cellpadding=0 cellspacing=0 border=0>
<tr><td>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<table cellpadding=0 cellspacing=0 border=0>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td align="center">
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td align="center">
<?
echo "<a href='{$list[$i][wr_1]}' target='{$list[$i][wr_2]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' border='0'></a>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<? } else { ?>
<img src='<?=$latest_skin_path?>/img/noimage.gif' border='0'></a><br>
<? } ?></td>
</tr>
<? } ?>
</table>
echo "<a href='{$list[$i][wr_1]}' target='{$list[$i][wr_2]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' border='0'></a>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<? } else { ?>
<img src='<?=$latest_skin_path?>/img/noimage.gif' border='0'></a><br>
<? } ?></td>
</tr>
<? } ?>
</table>
</td></tr></table>
========================================
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 10개
이 부분에 png 뒤에 "|swf" 를 넣으면 되지 않을까요?
전 개발자가 아니므로 틀려도 모릅니다. 그냥 보니 위의 세 이미지파일만 받아들이도록 해놔서요.
그렇게 해서 안되면 swf 파일은.. embed니까.. 뭔가 다른 방법이 있어야 할듯.
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr><td height=10></td></tr> -->
<?
for($i=0;$i<count($list);$i++){
?>
<tr>
<td align="center">
<?
$image=urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if(preg_match("/\.(gif|jpg|png)$/i",$image)){
echo"<a href='{$list[$i][wr_1]}' target='{$list[$i][wr_2]}'>";
?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' border='0'></a>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<?
}elseif(preg_match("/\.(swf)$/i",$image)){
?>
<table width=테이블넓이 height=테이블길이 cellpadding=0 cellspacing=0 border=1>
<tr>
<td align=center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="100%" height="100%">
<param name="movie" value="<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>">
<param name=wmode value=transparent>
<param name="quality" value="high">
<embed src="<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%"></embed>
</object>
</td>
</tr>
</table>
<?
}else{
?>
<img src='<?=$latest_skin_path?>/img/noimage.gif' border='0'></a><br>
<?
}
?>
</td>
</tr>
<?
}
?>
</table>
</td>
</tr>
</table>
이렇게 하면 될것 같은데...
플래쉬 크기를 지정 할수 없고 100%로 해야된다면, 테이블 크기를 지정해 주시구요.
플래쉬 테두리 없애주는 스크립트 있으면, 해당 스크립트로 플래쉬 불로 오시면 되구요.
else if(preg_match("/\.(swf|wmv|asf)$/i", $image))
{ echo"<script src='$g4[path]/flash.php?flash_file=$g4[path]/data/file/$bo_table/$image&flash_width=645&flash_height=100&flash_wmode=transparent'></script>";}
?>
-------------------------------------
flash.php
---------------------
<?php $flash_wmode = (empty($flash_wmode)) ? "transparent" : $flash_wmode; ?>
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="<?=$flash_width?>" HEIGHT="<?=$flash_height?>">');
document.write('<PARAM NAME=movie VALUE="<?=$flash_file?>">');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<param name="wmode" value="transparent">');
document.write('<EMBED src="<?=$flash_file?>" quality=high WIDTH="<?=$flash_width?>" HEIGHT="<?=$flash_height?>" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></EMBED>');
document.write('</OBJECT>');
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td align="center">
<?
echo "<a href='{$list[$i][wr_1]}' target='{$list[$i][wr_2]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='390' height='100' border='0'></a><br>
<?}
else if(preg_match("/\.(swf|wmv|asf)$/i", $image))
{ echo"<script src='$g4[path]/flash.php?flash_file=$g4[path]/data/file/$bo_table/$image&flash_width=390&flash_height=100&flash_wmode=transparent'></script>";}
else{
echo"<img src='$latest_skin_path/img/noimage.gif' width='390' height='100' border='0'></a><br>";
}?>
</td>
</tr>
<? } ?>
</table>
---------------------------
flash.php
---------------------
<?php $flash_wmode = (empty($flash_wmode)) ? "transparent" : $flash_wmode; ?>
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="<?=$flash_width?>" HEIGHT="<?=$flash_height?>">');
document.write('<PARAM NAME=movie VALUE="<?=$flash_file?>">');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<param name="wmode" value="transparent">');
document.write('<EMBED src="<?=$flash_file?>" quality=high WIDTH="<?=$flash_width?>" HEIGHT="<?=$flash_height?>" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></EMBED>');
document.write('</OBJECT>');
현제 메인에 랜덤으로 출력이 되도록 사용중이며 제나빌더에도 사용되고 있습니다..충분이 테스트 하고 사용되고 있습니다^^