위젯

플래시 이미지 출력 슬라이드

by 팔공산 posted Feb 06, 2009
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

이전 다음 위로 아래로 댓글로 가기 인쇄 쓰기 목록
Extra Form
제작자 ztyle
출처 http://www.zeroboard.com/17716609
적용여부 적용
이 프로그램의 평점 (참여 : 0 / 총 점수 : ) 평균 평점 : 0.0점
이 글 평점 주기
5점
?
  • profile
    팔공산 2009.02.06 21:20 글쓴이
    위의 위젯스킨을 제가 약간 변형해서 수정해 봤습니다.
    xe/widgets/newest_images/newest_images.class.php안에

                // 슬라이드 타임
                $widget_info->slide_time = (int)$args->slide_time;
                if(!$widget_info->slide_time) $widget_info->slide_time = 5000;

                if($args->skin_type!='Y') $widget_info->skin_type = 'N';
                else $widget_info->skin_type = 'Y';

    xe/widgets/newest_images/conf/info.xml안에

      <var id="skin_type">
       <type>select</type>
       <name xml:lang="ko">스킨의 크기</name>
       <description />
       <options>
        <value>N</value>
        <name xml:lang="ko">650*340</name>
       </options>
       <options>
        <value>Y</value>
        <name xml:lang="ko">900*362</name>
       </options>
      </var>
      <var id="slide_time">
       <type>text</type>
       <name xml:lang="ko">슬라이드 타임</name>
       <description xml:lang="ko">자동슬라이드타임 1초 = 1000입니다 (기본 5000)</description>  </var>

    xe/widgets/newest_images/skins/ztyle_v031/list.html안에 16줄 부터 아래와 같이 편집

    <!--@if(count($widget_info->document_list))-->
     {@ $count = 0; }
       <
    !--@for($i=0;$i<$widget_info->rows_list_count;$i++)-->
       
      <
    !--@for($j=0;$j<$widget_info->cols_list_count;$j++)-->
       {@ $oDocument = $widget_info->document_list[$i*$widget_info->cols_list_count + $j]}
       
       <!--@if($widget_info->skin_type == 'Y')-->
       
    {@$imgLocation = $oDocument->getThumbnail(580,331,$widget_info->thumbnail_type);}<!--@else-->{@$imgLocation = $oDocument->getThumbnail(416,236,$widget_info->thumbnail_type);}
       <
    !--@end-->
       
    {@$Subject = $oDocument->getTitle($widget_info->title_length);}
       
    {@$author = $oDocument->getNickName();}
       
    {@$Date = $oDocument->getRegdate();}
       
    {@$url = getUrl('','document_srl',$oDocument->document_srl);}
        
       <!--DB에서 가져온 정보로 Xml문서의 Element를 구성-->
       
    {@$xmlList .=" <Contentinfo>\n";}
       
    {@$xmlList .="  <imgLocation>$imgLocation</imgLocation>\n";}<!-- 이미지경로 -->
       
    {@$xmlList .="  <Subject>$Subject</Subject>\n";} <!-- 게시판제목 -->
       
    {@$xmlList .="  <Author>by $author</Author>\n";}  <!-- 작성자 -->
       
    {@$xmlList .="  <Date>$Date</Date>\n";} <!-- 작성일 -->
       
    {@$xmlList .="  <href>$url</href>\n";} <!-- 링크 -->
       
    {@$xmlList .=" </Contentinfo>\n\n";}
      <
    !--@end-->

     <!--@end-->
     
     <!--통합 XmlDoc의 내용을 구성-->
     
    {@$xmlDoc="<?xml version='1.0' encoding='utf-8'?>\n";}
     
    {@$xmlDoc .="<Boardinfo>\n";}
     
    {@$xmlDoc .="$xmlList";}
     
    {@$xmlDoc .="</Boardinfo>\n";}
    <
    !--@end-->
     
     
    {@$Path = _XE_PATH_;} <!--XE 설치된경로-->
     
    {@$location = "widgets/newest_images/skins/ztyle_v031/";} <!-- 스킨설치경로 -->
     
    {@$dirname = $Path.$location."xml/";} <!-- xml폴더유지 -->
     
    {@$fileName = "list_info.xml"; }
     
    {@$fileinfo = "$dirname$fileName";}
      
     
    {@FileHandler::writeFile($fileinfo, $xmlDoc);} <!-- xml폴더와list_info.xml 파일생성 -->

     <!--@if($widget_info->skin_type == 'Y')-->
     
    {@$SWF_dir = $Path.$location."ztyle_v031.swf";}<!--@else-->{@$SWF_dir = $Path.$location."ztyle_v032.swf";}<!--@end--> <!-- 플래시파일 -->
     
    {@$Title = $widget_info->title;}<!-- 컨텐츠제목 -->
     
    {@$Time = $widget_info->slide_time;} <!-- 자동슬라이드타임 1초 = 1000입니다 -->

    <!--@if($widget_info->skin_type == 'Y')-->
    <p class="Gallery_Box"><script type="text/javascript">F_viewSwf('900','362','transparent','{$SWF_dir}','{$fileinfo}','{$Title}','{$Time}');</script></p><
    !--@else--><p class="Gallery_Box"><script type="text/javascript">F_viewSwf('650','340','transparent','{$SWF_dir}','{$fileinfo}','{$Title}','{$Time}');</script></p>!--@end--


    p.s ztyle_v032폴더안의 ztyle_v032.swf파일을 복사해서  ztyle_v031폴더안에 넣어서야 정상작동합니다. 

    위와 같이 수정하면 기존의 위젯에서도 슬라이드타임이나, 스킨의 크기를 변경할 수 있습니다.

    단독위젯버전 https://moonhouse.co.kr/zbxe/238728