최신글인데...제목을 이미지아래에 보여주고싶은데 도통 모르겠네요..부탁드립니다. > 그누4 질문답변

그누4 질문답변

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

최신글인데...제목을 이미지아래에 보여주고싶은데 도통 모르겠네요..부탁드립니다. 정보

최신글인데...제목을 이미지아래에 보여주고싶은데 도통 모르겠네요..부탁드립니다.

본문

최신글 세로스크롤입니다.

제목을 이미지아래에 보여주고싶은데 도통 모르겠네요..부탁드립니다.


아래 한번 만 봐주세요





<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

/*  위로 스크롤되는 최신글

// 사용법 :
//<?php  echo latest("hp_utf_banner_scroll", "보드id", 50, 배너, "7,1");
//echo latest("스킨", "보드id", 보일게시물개수, 글제목, "한줄에보일 이미지,한번에 보일줄수"); ?>

// $rows(출력라인)는 $line_mod의 2의 배수 이상으로 설정하셔야 합니다.

// 유니크 값 (최신글은 한페이지에 여러개 둘 수 있으므로... 자바스크립트에서 함수, 변수 충돌을 방지)
*/

$img_quality = '100'; //퀼리티 100이하로 설정


$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/latest_thumb';



$uni = md5(uniqid(rand(), true));

list($td_mod,$tr_mod) = explode(",", $options);
$img_width=160; //이미지 가로
$img_height=120; //이미지세로
$margin_right = 10; // 이미지 우측 여백
$margin_bottom = 6; // 이미지 아래쪽 여백
$height = $img_height+$margin_bottom;
$line_mod=1;
$box_height = (int)$line_mod * (int)$height;

?>

<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<?php /*
<tr>
    <td><img src='<?php echo $latest_skin_path; ?>/img/latest_t01.gif'></td>
    <td background='<?php echo $latest_skin_path; ?>/img/bg_latest.gif'>&nbsp;&nbsp;<strong><a href='<?php echo $g4[bbs_path]; ?>/board.php?bo_table=<?php echo $bo_table; ?>'><?php echo $board[bo_subject]; ?></a></strong></td>
    <td background='<?php echo $latest_skin_path; ?>/img/bg_latest.gif'><a href='<?php echo $g4[bbs_path]; ?>/board.php?bo_table=<?php echo $bo_table; ?>'><img src='<?php echo $latest_skin_path; ?>/img/more.gif' border=0></a></td>
    <td><img src='<?php echo $latest_skin_path; ?>/img/latest_t02.gif'></td>
</tr>
*/?>

<?php if (count($list) == 0) {


?>
  <tr><td align="center" height="50">게시물이 없습니다.</td></tr>
<?php } else { ?>


  <tr>
    <td style='padding-left:0px; padding-right:0px; padding-top:0px; padding-bottom:0px;'>
      <script type="text/javascript">
      <!--
        var roll_height_<?php echo $uni; ?> = <?php echo $box_height; ?>;
        var total_area_<?php echo $uni; ?> = 0;
        var wait_flag_<?php echo $uni; ?> = true;

        var bMouseOver_<?php echo $uni; ?> = 1;
        var roll_speed_<?php echo $uni; ?> = 1;
        var waitingtime_<?php echo $uni; ?> = 5000;
        var s_tmp_<?php echo $uni; ?> = 0;
        var s_amount_<?php echo $uni; ?> = <?php echo (int)$height; ?>;
        var roll_text_<?php echo $uni; ?> = new Array();
        var startPanel_<?php echo $uni; ?> = 0;
        var n_panel_<?php echo $uni; ?> = 0;
        var i_<?php echo $uni; ?> = 0;

        function start_roll_<?php echo $uni; ?>()
        {
          i_<?php echo $uni; ?> = 0;
          for (i_<?php echo $uni; ?> in roll_text_<?php echo $uni; ?>)
            n_panel_<?php echo $uni; ?>++;

          n_panel_<?php echo $uni; ?> = n_panel_<?php echo $uni; ?> -1 ;
          startPanel_<?php echo $uni; ?> = Math.round(Math.random()*n_panel_<?php echo $uni; ?>);
          if(startPanel_<?php echo $uni; ?> == 0) {
            i_<?php echo $uni; ?> = 0;
            for (i_<?php echo $uni; ?> in roll_text_<?php echo $uni; ?>)
              insert_area_<?php echo $uni; ?>(total_area_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>++);
          } else if(startPanel_<?php echo $uni; ?> == n_panel_<?php echo $uni; ?>) {
            insert_area_<?php echo $uni; ?>(startPanel_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>);
            total_area_<?php echo $uni; ?>++;
            for (i_<?php echo $uni; ?>=0; i_<?php echo $uni; ?><startPanel_<?php echo $uni; ?>; i_<?php echo $uni; ?>++) {
              insert_area_<?php echo $uni; ?>(i_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>);
              total_area_<?php echo $uni; ?>++;
            }
          } else if((startPanel_<?php echo $uni; ?> > 0) || (startPanel_<?php echo $uni; ?> < n_panel_<?php echo $uni; ?>)) {
            insert_area_<?php echo $uni; ?>(startPanel_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>);
            total_area_<?php echo $uni; ?>++;
            for (i_<?php echo $uni; ?>=startPanel_<?php echo $uni; ?>+1; i_<?php echo $uni; ?><=n_panel_<?php echo $uni; ?>; i_<?php echo $uni; ?>++) {
              insert_area_<?php echo $uni; ?>(i_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>);
              total_area_<?php echo $uni; ?>++;
            }
            for (i_<?php echo $uni; ?>=0; i_<?php echo $uni; ?><startPanel_<?php echo $uni; ?>; i_<?php echo $uni; ?>++) {
              insert_area_<?php echo $uni; ?>(i_<?php echo $uni; ?>, total_area_<?php echo $uni; ?>);
              total_area_<?php echo $uni; ?>++;
            }
          }
     
          if ( navigator.appName == "Microsoft Internet Explorer" ) {
            if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 )
            return ;
          }
          window.setTimeout("rolling_<?php echo $uni; ?>()",waitingtime_<?php echo $uni; ?>);
        }

        function rolling_<?php echo $uni; ?>()
        {
          if (bMouseOver_<?php echo $uni; ?> && wait_flag_<?php echo $uni; ?>) {
            for (i_<?php echo $uni; ?>=0;i_<?php echo $uni; ?><total_area_<?php echo $uni; ?>;i_<?php echo $uni; ?>++) {
              tmp_<?php echo $uni; ?> = document.getElementById('scroll_area_<?php echo $uni; ?>'+i_<?php echo $uni; ?>).style;
              tmp_<?php echo $uni; ?>.top = parseInt(tmp_<?php echo $uni; ?>.top)-roll_speed_<?php echo $uni; ?>;

              if (parseInt(tmp_<?php echo $uni; ?>.top) <= -roll_height_<?php echo $uni; ?>) {
                tmp_<?php echo $uni; ?>.top = roll_height_<?php echo $uni; ?>*(total_area_<?php echo $uni; ?>-1);
              }

              if (s_tmp_<?php echo $uni; ?>++ > (s_amount_<?php echo $uni; ?>-1)*roll_text_<?php echo $uni; ?>.length) {
                wait_flag_<?php echo $uni; ?>=false;
                window.setTimeout("wait_flag_<?php echo $uni; ?>=true;s_tmp_<?php echo $uni; ?>=0;",waitingtime_<?php echo $uni; ?>);
              }
            }
          }
          window.setTimeout("rolling_<?php echo $uni; ?>()", 1);
        }

        function insert_area_<?php echo $uni; ?>(idx_<?php echo $uni; ?>, n_<?php echo $uni; ?>)
        {
          document.write('<div style="left: 0px; width: 100%; position: absolute; top: '+(roll_height_<?php echo $uni; ?>*n_<?php echo $uni; ?>)+'px" id="scroll_area_<?php echo $uni; ?>'+n_<?php echo $uni; ?>+'">\n'+roll_text_<?php echo $uni; ?>[idx_<?php echo $uni; ?>]+'\n</div>\n');
        }

        <?php
        unset($roll_text);
        for ($i=0; $i<count($list); $i++) {

$etc7_exp=explode("|" , $list[$i][wr_7]);
$etc7_exp00 = $etc7_exp[0];
$etc7_exp01 = $etc7_exp[1];
$etc7_exp02 = $etc7_exp[2];
$etc7_exp03 = $etc7_exp[3];
$etc7_exp04 = $etc7_exp[4];
$etc7_exp05 = $etc7_exp[5];
$etc7_exp06 = $etc7_exp[6];
$etc7_exp07 = $etc7_exp[7];
$etc7_exp08 = $etc7_exp[8];
$etc7_exp09 = $etc7_exp[9];
$etc7_exp10 = $etc7_exp[10];
$etc7_exp11 = $etc7_exp[11];
$etc7_exp12 = $etc7_exp[12];
$etc7_exp13 = $etc7_exp[13];


$etc8_exp = explode("|",$list[$i][wr_8]);
$etc8_exp00  = $etc8_exp[0];
$etc8_exp01  = $etc8_exp[1];
$etc8_exp02  = $etc8_exp[2];
$etc8_exp03  = $etc8_exp[3];
$etc8_exp04  = $etc8_exp[4];
$etc8_exp05  = $etc8_exp[5];
$etc8_exp06  = $etc8_exp[6];
$etc8_exp07  = $etc8_exp[7];
$etc8_exp08  = $etc8_exp[8];
$etc8_exp09  = $etc8_exp[9];
$etc8_exp10  = $etc8_exp[10];
$etc8_exp11  = $etc8_exp[11];
$etc8_exp12  = $etc8_exp[12];
$etc8_exp13  = $etc8_exp[13];
$etc8_exp14  = $etc8_exp[14];
$etc8_exp15  = $etc8_exp[15];
$etc8_exp16  = $etc8_exp[16];
$etc8_exp17  = $etc8_exp[17];
$etc8_exp18  = $etc8_exp[18];
$etc8_exp19  = $etc8_exp[19];
$etc8_exp20  = $etc8_exp[20];
$etc8_exp21  = $etc8_exp[21];
$etc8_exp22  = $etc8_exp[22];
$etc8_exp23  = $etc8_exp[23];

$etc13_exp=explode("|" ,$list[$i][wr_13]);
$etc13_exp00 = $etc13_exp[0];
$etc13_exp01 = $etc13_exp[1];
$etc13_exp02 = $etc13_exp[2];
$etc13_exp03 = $etc13_exp[3];
$etc13_exp04 = $etc13_exp[4];
$etc13_exp05 = $etc13_exp[5];
$etc13_exp06 = $etc13_exp[6];
$etc13_exp07 = $etc13_exp[7];
$etc13_exp08 = $etc13_exp[8];
$etc13_exp09 = $etc13_exp[9];
$etc13_exp10 = $etc13_exp[10];

$meters=stripslashes($list[$i][wr_19]);
$metersz=explode(".",$meters);

$etc24_exp=explode("|" ,$list[$i][wr_24]);
$etc24_exp00 = $etc24_exp[0];
$etc24_exp01 = $etc24_exp[1];
$etc24_exp02 = $etc24_exp[2];


          $img = "<img src=\"$latest_skin_path/img/no_image.gif\" border=0 heigth=\"$img_height\" width=\"$img_width\" title=\"이미지 없음\" alt=\"이미지 없음\" />";

          $file = $list[$i][file][0][path] ."/". $list[$i][file][0][file];
          if($file){
            $img = "<img src=\"$file\" style=\"border:0px solid #efefef;margin-right:".$margin_right."px;\" border=0 height=\"$img_height\" width=\"$img_width\" alt=\"\" />";
          }
;
          $k = (int)($i / $td_mod);

          //$roll_text[$k] .= "<div style=\"height:{$height}px; padding-top:0px;\">";

     
            $roll_text[$k] .= "<a href=\"{$list[$i]['href']}\">";
            $roll_text[$k] .= $img;
            $roll_text[$k] .= "</a>";




        }

        for ($i=0; $i<=$k; $i++) {
          echo "roll_text_{$uni}[$i] = '{$roll_text[$i]}';\n";
       
        }
        ?>
      //-->
      </script>

      <div style="left: 0px; width: 100%; position: relative; top: 0px; height: <?php echo $box_height*$tr_mod; ?>px; overflow:hidden;" onmouseover="bMouseOver_<?php echo $uni; ?>=0" onmouseout="bMouseOver_<?php echo $uni; ?>=1" id="latest_scroll_<?php echo $uni; ?>">
        <script type='text/javascript'>
        <!--
          var no_script_flag_<?php echo $uni; ?> = false ;
          if ( navigator.appName == "Microsoft Internet Explorer" ) {
            if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 ) {
              document.write ( roll_text_<?php echo $uni; ?>[0] ) ;
              no_script_flag_<?php echo $uni; ?> = true ;
            }
          }
          if ( no_script_flag_<?php echo $uni;?> == false )
            start_roll_<?php echo $uni; ?>();
        //-->
        </script>
      </div>
    <?php } ?>
    </td>
  </tr>
</table>

댓글 전체

아따... 어렵게도 짜놨네...보기 쉬운게 좋은거라생각되는데...


$roll_text[$k] .= "<a href=\"{$list[$i]['href']}\">";
$roll_text[$k] .= $img;
$roll_text[$k] .= "</a>";

// 요기 추가
$roll_text[$k] .= "<p/>".$list[$i]['subject']."<p/>";
전체 13 |RSS
그누4 질문답변 내용 검색

회원로그인

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