swf 배너는 어떻게? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

swf 배너는 어떻게? 정보

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>
<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">
        <?               
  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>
========================================

댓글 전체

if (preg_match("/\.(gif|jpg|png)$/i", $image))

이 부분에 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>');
박성인님 구문대로라면 위에분 구문에서 swf있는 부분을 수정하고 flash라는 파일을 구문대로 만들어 루트에 업로드 하면 된다는 뜻인것 같은데요.,.. 그렇게 해도 않나오네요...
위에분걸 써서 해결은 했는데 박성인님의 소스를 보니 기능이 더 업그레이드 된것 같아서 쓰고 싶은 욕심이 생기네요ㅡ.ㅡ 단 에러가 어디서 어떻게 생기게 된건지 모르겠네요,,,
제가 사용하고 잇는 배너최신글입니다..
 <?
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>');

현제 메인에 랜덤으로 출력이 되도록 사용중이며 제나빌더에도 사용되고 있습니다..충분이 테스트 하고 사용되고 있습니다^^
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT