도와주세요 ㅜ ㅜ 최근게시물 갤러리 형태로 추출하는 방법이요 .. > 그누4 질문답변

그누4 질문답변

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

도와주세요 ㅜ ㅜ 최근게시물 갤러리 형태로 추출하는 방법이요 .. 정보

도와주세요 ㅜ ㅜ 최근게시물 갤러리 형태로 추출하는 방법이요 ..

본문

메인화면에 최근게시물 보이게 할때
<? echo latest("basic",gall, 1, 10);} ?>

이렇게 입력하면 되는 거 아닌가요 ?..
계속 해도 안되길래 ..

<?
//  최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = bo_table;
for ($i=0; $row=sql_fetch_array($result); $i++) {
    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.

    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수);
    echo latest("basic", $row['bo_table'], 1, 10);
    ;
}
?>

이렇게 복사 넣으니까 .. 기본 스킨이 나오니까 링크는 되는데.. ..
자꾸 깨져요; 그리고 ,, 갤러리 게시판 모양이 아니고  그냥 게시글 형태..
기본스킨을 바꾸는 방법이나..  갤러리스킨으로 나오게 하는 방법 없ㄴㅏ요 ?
basic 부분을 gallery 로 바꾸면;; 또 안나오더라구요 ;;
  • 복사

댓글 전체

최근 게시물에 대해 잘못 알고 계신 것 같습니다.

최근게시물을 볼러오는 방법은 아래와 같습니다.
<? echo latest("스킨이름","게시판테이블", 갯수, 제목글자수);} ?>

즉 만약 아래처럼 최근 게시물 소스를 입력하셨다면...
 <? echo latest("basic","free", 5, 10);} ?>
[basic] 스킨을 이용해서 [free] 라는 게시판에서 5개를 가져와라....라는 뜻입니다.

다시말해 갤러리 형태로 추출하려면 일단 갤러리형 최근게시물 스킨이 설치되어 있어야 합니다.
(그누보드/skin/latest/ 안에 갤러리형 최근 게시물 스킨을 업로드 해야 한다는 것입니다.)

참고삼아...
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=88245
위 링크의 스킨을 다운 받은 후에 /skin/latest/ 안에 업로드하시고

원하는 곳에
 <? echo latest("c_02","게시판테이믈명", 4, 10);} ?>
이렇게 써보세요.
감사합니다
 ㅜ ㅜ 저한테 gallery  라는 갤러리 스킨이 있어서 .. 말해주신데로 skin/latest 안에 넣어서 해봤느데 ;; 안되네요 ㅜ ㅜ...

<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");


include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");

//print_r2(get_defined_constants());

// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.

$table_width = 1004;
?>
<title>:::성심사우나를 찾아주셔서 감사합니다:::</title><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #f2e8dd;
background-image: url(img/m_bg.gif);
}
#Layer1 {
position:absolute;
left:24px;
top:144px;
width:100px;
height:104px;
z-index:1;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('img/main2_02.jpg','img/main2_03.jpg','img/main2_05.jpg','img/main2_06.jpg','img/main2_07.jpg','img/main2_08.jpg')">
<div id="Layer1"><a href="http://blog.naver.com/nain1218.do" target="_blank"><img src="img/blog.png" width="100" height="104" border="0"></a></div>
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th height="25" scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="785" height="25" scope="row"><img src="img/main_01.jpg" width="785" height="25" /></th>
        <td width="145"><a href="/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','img/main2_02.jpg',1)"><img src="img/main_02.jpg" name="Image2" width="145" height="25" border="0" id="Image2" /></a></td>
        <td width="94"><a href="http://sungsims.com/bbs/board.php?bo_table=customer" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','img/main2_03.jpg',1)"><img src="img/main_03.jpg" name="Image3" width="94" height="25" border="0" id="Image3" /></a></td>
      </tr>
    </table></th>
  </tr>
  <tr>
    <th scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="556" height="91" scope="row"><a href="/"><img src="img/main_04.jpg" width="556" height="91" border="0" /></a></th>
        <td width="108"><a href="/sub.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','img/main2_05.jpg',1)"><img src="img/main_05.jpg" name="Image5" width="108" height="91" border="0" id="Image5" /></a></td>
        <td width="121"><a href="/sub2.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','img/main2_06.jpg',1)"><img src="img/main_06.jpg" name="Image6" width="121" height="91" border="0" id="Image6" /></a></td>
        <td width="131"><a href="http://sungsims.com/bbs/board.php?bo_table=gall" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','img/main2_07.jpg',1)"><img src="img/main_07.jpg" name="Image7" width="131" height="91" border="0" id="Image7" /></a></td>
        <td width="108"><a href="http://sungsims.com/bbs/board.php?bo_table=customer" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','img/main2_08.jpg',1)"><img src="img/main_08.jpg" name="Image8" width="108" height="91" border="0" id="Image8" /></a></td>
      </tr>
    </table></th>
  </tr>
  <tr>
    <th scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="10" height="17" scope="row">&nbsp;</th>
        <td width="1003" height="17" bgcolor="482D0F"><img src="img/main_09.gif" width="1003" height="16" /></td>
        <td height="17">&nbsp;</td>
      </tr>
    </table></th>
  </tr>
  <tr>
    <th scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="10" scope="row">&nbsp;</th>
        <td width="987" height="339"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="987" height="339">
          <param name="movie" value="fla/main.swf" />
          <param name="quality" value="high" />
  <param name="wmode" value="transparent" />
          <embed src="fla/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="987" height="339"></embed>
        </object></td>
        <td>&nbsp;</td>
      </tr>
    </table></th>
  </tr>
  <tr>
    <th scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="10" scope="row">&nbsp;</th>
        <td width="181" height="189"><img src="img/main_15.jpg" width="181" height="189" /></td>
        <td width="323"><img src="img/main_16.jpg" width="323" height="189" /></td>
        <td width="483"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <th width="49" height="189" scope="row"><img src="img/main_17.jpg" width="49" height="189" /></th>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <th width="379" height="53" scope="row"><img src="img/main_18.jpg" width="379" height="53" /></th>
              </tr>
              <tr>
                <th height="121" align="left" valign="top" bgcolor="#FFFFFF" scope="row"><?
//  최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.

    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수);
    echo latest("gallery","gall", 4, 10);} ?>


</th>
              </tr>
              <tr>
                <th height="15" scope="row"><img src="img/main2_13.jpg" width="379" height="15" /></th>
              </tr>
            </table></td>
            <td width="55"><img src="img/main_21.jpg" width="55" height="189"></td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
    </table></th>
  </tr>
  <tr>
    <th scope="row"><img src="img/main_09.gif" width="1003" height="16"></th>
  </tr>
  <tr>
    <th height="140" scope="row"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th height="107" scope="row"><img src="img/main_24.gif" width="1024" height="101" border="0" usemap="#copy" /></th>
      </tr>
      <tr>
        <th height="23" scope="row">&nbsp;</th>
      </tr>
    </table></th>
  </tr>
</table>

<map name="copy"><area shape="rect" coords="847,7,887,24" href="/">
<area shape="rect" coords="891,7,927,25" href="/adm">
<area shape="rect" coords="935,7,977,24" href="http://sungsims.com/bbs/board.php?bo_table=customer">
<area shape="rect" coords="864,58,979,76" href="http://globalart.kr" target="_blank">
</map>

이게 전체인데요 ㅜ ㅜ.. 뭐가 잘못된건지 .. 도통;;;
© SIRSOFT
현재 페이지 제일 처음으로