그룹 최신글에서 정열을 오래된 것부터 나오게 하려면? > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

그룹 최신글에서 정열을 오래된 것부터 나오게 하려면?

페이지 정보

본문

질문입니다.
제나빌더 열심히 공부중입니다.
아래의 grouptable1.php ... 그룹 최신글에서 나타나는 순서를 날짜 이전것부터 보이게 하려면
어떻게 해야 하나요?
   
 <!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=5 cellspacing=5>
<tr>
    <td align="center" valign=top>
    <?
    //  최신글
    $sql = " select bo_table, bo_subject from $g4[board_table]
              where gr_id = '$gr_id'
                and bo_list_level <= '$member[mb_level]'
              order by bo_table ";
    $result = sql_query($sql);
    for ($i=0; $row=sql_fetch_array($result);) {
        // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
        // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
        // 사용방법
        // latest(스킨, 게시판아이디, 출력라인, 글자수);
        if($i%2==0)
echo "<tr>";
?>
<td width="50%" valign="top">
<?= latest("basic", $row[bo_table], 5, 120, "4,25")?>
</td>
<?
$i++;
}
?>
</tr></table>
추천0

댓글목록

profile_image

제로님의 댓글

제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

사용되고 있는 최신글 스킨을 바꿔주셔야 합니다
최신글 소스에 약 17라인
수정전
<? for ($i=0; $i<count($list); $i++) { ?>
수정후
<? for ($i=count($list)-1; $i>=0; $i--) { ?>

profile_image

webpark님의 댓글

webpark쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

고맙습니다만 먹히질 않습니다. 아래의 la_portfolio 최신글입니다.

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

//my_latest.php파일 extend 에 올림 - 내용의 문장을 이어서 자르기(html 태그제거됨)

// 이미지 세로 정렬 기능 - 그누 썸네일 갤러리 공용 최신글
// 썸네일이 없을경우 원본이미지 불러옴.
//224
$img_table = '300';
$td_w1 = '110'; //이미지있는 셀 폭
$td_w2 = '$img_table-$td_w1';
$bg_col = '#FFFFFF'; //셀 칼라

$img_w = '110';  // 이미지 가로 세로 사이즈
$img_h = '115';

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

<table width='300' cellpadding='0' cellspacing='0' border='0'>
<tr>
 <td width='8' height='8'><img src='<?=$latest_skin_path?>/img/box_01.gif' width='8' height='8' border='0'></td>
 <td width='250' background='<?=$latest_skin_path?>/img/box_02.gif'></td>
 <td width='8'><img src='<?=$latest_skin_path?>/img/box_03.gif' width='8' height='8' border='0'></td>
</tr>
<tr>
 <td background='<?=$latest_skin_path?>/img/box_04.gif'></td>
 <td width='300' height='200' align='center' valign='top' bgcolor='#FFFFFF'>

<table width='<?=$img_table?>' cellpadding='0' cellspacing='0' border='0'>
<tr>
 <td width='23' height='22'><img src="<?=$latest_skin_path?>/img/la_title.gif" width='23' height='20' border='0'></td>
 <td><font color='#9DC86A'><strong><?=$board[bo_subject]?></strong></font></td>
 <td width='40'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' width="32" height="9" border=0></a></td>
<tr><td height=2 colspan='3' bgcolor='#D0DFBD'></td></tr>
<tr><td height=2 colspan='3'></td></tr>
</table>

<table width="<?=$img_table?>" border="0" cellspacing="0" cellpadding="0">

<?// for ($i=0; $i<count($list); $i++) { ?>
<? for ($i=count($list)-1; $i>=0; $i--) { ?>

<tr><td height='4' colspan='2'></td></tr>

<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];

  if ( file_exists($thumb) )
$img = $thumb;
 
    $style_a = "font-family:돋움; font-size:9pt; color:#999999;";

$style = "font-family:돋움; font-size:9pt; color:#636363;";
    if ($list[$i][icon_new])
    $style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],25)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";

    $wr_content = "<a href='{$list[$i][href]}' onfocus='this.blur()'><span $style_a>".Shorten_String(strip_tags($list[$i][wr_content]), 120, ' ...')."</span></a>";//내용을 이어서 자르기

echo "<tr><td valign='top' width='$td_w1' bgcolor='{$bg_col}'>";
        echo "<table cellpadding=2 cellspacing=1 border=0 bgcolor='#FFFFFF'><tr>";
echo "<td bgcolor='#FFFFFF'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='$img_w' height='$img_h' border='0'></a></td></tr></table></td>";
echo "<td valign='top' width='$td_w2' bgcolor='{$bg_col}'>";
echo "<table width='100%' cellpadding=0 cellspacing=0 border=0>";
echo "<tr><td height='1' bgcolor='#FFFFFF'></td></tr><tr><td style='padding-top:3px;'>제목 :<a href='{$list[$i][href]}' onfocus='this.blur()'>{$subject} {$list[$i][icon_new]}</a></td></tr>";

echo "<tr><td>날자 :<span style='font-size:8pt; color:#999999;'>{$list[$i][datetime]}</td></tr>";
echo "<tr><td style='padding-top:3px;'><table width=' width='$td_w2'' cellpadding=0 cellspacing=0 border=0><tr><td width='40' valign='top'>내용 :</td><td style='word-break:break-all; line-height: 11pt;'>{$wr_content}</td></tr></table></td></tr></table></td></tr>
";
?>
<? } ?>

<? if (count($list) == 0) { echo "<tr><td height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table></td>
 <td background='<?=$latest_skin_path?>/img/box_06.gif'></td>
</tr>
<tr>
 <td height='8'><img src='<?=$latest_skin_path?>/img/box_07.gif' width='8' height='8' border='0'></td>
 <td background='<?=$latest_skin_path?>/img/box_08.gif'></td>
 <td><img src='<?=$latest_skin_path?>/img/box_09.gif' width='8' height='8' border='0'></td>
</tr>
</table>

<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
  imageHandle.document.write("<title>  </title>");
  imageHandle.document.write("<style>");
  imageHandle.document.write("*{margin:0;padding:0;border:0;}");
  imageHandle.document.write("</style>");
  imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>

profile_image

제로님의 댓글의 댓글

제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

폼도 깨지고 이 스킨이 좀 이상하네요~!
저도 잘 안먹히네요..
아래꺼를 사용하시면서 필요한 부분 수정해사용해 보세요~~!

profile_image

제로님의 댓글

제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

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

$cols  = 4; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$imgwidth=120; //표시할 이미지의 가로사이즈
$imgheight=120; //표시할 이미지의 세로사이즈
$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-family:돋움; font-size:8pt; color:#999999; }
-->
</style>

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DDDDDD">
    <tr>
        <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="4" bgcolor="F5F5F5">
                <tr>
                    <td valign="top" bgcolor="FFFFFF" style="padding:0px">


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

<!-- 최신글 제목 -->
<tr><td>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
              <td width="10" bgcolor=#F5F5F5></td>
              <td height="23" bgcolor=#F5F5F5><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
              <td align="right" bgcolor=#F5F5F5><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span style='font-size:8pt; color:#9A9A9A;'>more</span></a></td>
              <td width="5" bgcolor=#F5F5F5></td>
          </tr>
          <tr>
                <td colspan=4 height="1" bgcolor=#ececec></td>
          </tr>
      </table>

</td></tr>

<tr><td height='10'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>

<? for ($i=count($list)-1; $i>=0; $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;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];

  if ( file_exists($thumb) )
$img = $thumb;
 
    $style = "font-family:돋움; font-size:9pt; color:#636363;";
    if ($list[$i][icon_new])
    $style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</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'><a href='{$list[$i]['href']}'>{$subject}</a></td></tr></table>";
?>
</td>
<? } ?>

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

  <? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
  </tr>
</table></td>
</tr>
</table>

</td></tr>
</table>
</td></tr>
</table>

<table width="100%" cellpadding=0 cellspacing=0>
<tr><td height=5></td></tr>
</table>

profile_image

webpark님의 댓글

webpark쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

고맙습니다. ^^ 그런데 위에 것도 섬네일만 보이고 텍스트가 안나오는군요.

Total 1,640건 8 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
1465 힘쓰쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13297 0 03-22
1464 알럽투데이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13297 0 10-20
1463 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13297 0 10-24
1462 실버쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13295 0 04-22
1461 휴먼쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13274 1 05-17
1460 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13271 0 06-21
1459 유후훌쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13270 0 08-19
1458 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13233 0 01-11
1457 모모쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13192 0 07-29
1456 유후훌쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13191 0 08-11
1455 Salhi쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13190 0 06-11
1454 쾌지나칭칭나네쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13180 0 03-01
1453 노가리쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13167 0 10-20
1452 돌향쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13155 0 10-05
열람중 webpark쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13143 0 02-08
1450 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13134 0 06-05
1449 yb88쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13132 0 08-11
1448 노인과마담쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13123 0 04-11
1447 소금쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13110 0 02-10
1446 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13096 0 09-07
1445 산돌쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13080 0 06-12
1444 힘쓰쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13067 0 02-21
1443 힘쓰쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13022 0 03-31
1442 첫만남의감격쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13021 0 08-05
1441 이종민쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13020 0 03-30

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
2,391
어제
4,901
최대
7,259
전체
1,233,321
Copyright (c) 株式会社YHPLUS. All rights reserved.