고수님들 부탁드립니다.. > 그누4 질문답변

그누4 질문답변

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

고수님들 부탁드립니다.. 정보

고수님들 부탁드립니다..

본문

 

여러개의 그룹이 있습니다..
예를들어 1부터 10까지 그룹이 있습니다..

그룹 1부터 8까지의 게시판에 올라오는 가장 최근 글을 메인화면에 출력하고자 합니다..

메인에는
  <?=latest_group("maingroup_img", "01", 15, 0); ?> 일이렇게 출력하였습니다..


01은 그룹입니다.. 15은 제목길이 01을 어떻게 변경해야 할지요??

또maingroup_img않의  latest.skin.php 파일은 다음과 같습니다..  고수님들 부탁좀 드리겠습니다..

감사합니다.  아래 내용은 첨부 하여 올리겠습니다..

감사합니다.


efined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cols  = 3; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$imgwidth=135; //표시할 이미지의 가로사이즈
$imgheight=90; //표시할 이미지의 세로사이즈
$image_h  = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>

<style type="text/css">
<!--
.data  { font-size:8pt; color:#999999; }
-->
</style>


<table width="99%" border="0" cellpadding="0" cellspacing="0">
 
 <tr>
  <td background="<?=$latest_skin_path?>/img/cc-1_04.gif" width="10" border="0"></td>
  <td width="100%" border="0">

<table width=100% border=0 cellpadding='0' cellspacing='0' align='center'>

<!-- 최신글 제목 -->
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>

<? for ($i=0; $i<count($list); $i++) {
  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>

<td width="<?=$col_width?>%" align="center" valign='top'>


<?
$image = $list[$i][file][0][file]; //원본
//$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$img = "http://" . $_SERVER['SERVER_NAME'] . "/uccup/file.php?f=" . $list[$i][wr_1] . ".jpg";
$thumb = $thumb_path. "/". $list[$i][wr_id];

  if ( file_exists($thumb) )
 $img = $thumb;
 
    $style = "font-size:10pt; color:#636363;";
    if ($list[$i][icon_new])
    $style = "style='font-size:11px;' ";
 $subject = "<span $style>".cut_str($list[$i][subject],100)."</span>"; //제목 글자수 자르기
 $wr_hit = "<span $style>".cut_str($list[$i][wr_hit],12)."</span>"; //조회
 $wr_good = "<span $style>".cut_str($list[$i][wr_good],12)."</span>"; //추천
  $wr_datetime = "<span $style>".cut_str($list[$i][wr_datetime],11)."</span>"; //작성일
 
  


 $bg = "";  //새글?
    if ($list[$i][icon_new])
        $bg="la_top_2.gif";
     else
        $bg="la_top_1.gif";

     echo $list[$i][icon_reply] . " ";

  echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
  echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' style='width:{$imgwidth}px;height:{$imgheight}px;border:1px solid #CCCCCC; padding:3px'></a></td></tr>";
  echo "<tr><td align='center' height='21' style='padding top:7px;'><b><a href='{$list[$i]['href']}'>{$subject}</b></a><br><span style='font size=11px;'>조회 : {$wr_hit} ㅣ 추천 : {$wr_good}<br>{$wr_datetime}</span></td></tr></table>";
?>
</td>
<? } ?>

<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td width=$col_width%> </td>";
}
?>

  <? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
  </tr>
</table></td>
</tr>
</table>  
  
  
  </td>
  <td background="<?=$latest_skin_path?>/img/cc-1_06.gif" width="10" border="0"></td>
 </tr>

</table>

  • 복사

댓글 전체

최신글소스에서 약간 수정해서 쓰면 안될까요?

최근게시물보다는 최신글이 좋을거같네요

최신글의 소스중 그륩범위에서 약간 변경하면 될거같은데....
© SIRSOFT
현재 페이지 제일 처음으로