최신글 추출관련 문의 > 그누4 질문답변

그누4 질문답변

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

최신글 추출관련 문의 정보

최신글 추출관련 문의

본문

http://www.standardenglish.net 이 제 사이트입니다. 중앙에 최근 게시글이 노출되어있는데
8줄로 만들고 싶습니다. 중앙 게시판 출력 부분( index.index.php파일) 에서
 <td width="249" valign="top"><?include_once("index.bbs.tab.1.php")?></td> 이렇게
이렇게 출력하게 되어있습니다. 그래서 밑에 파일은 index.bbs.tab.1.php 파일을 올려봅니다.
최근게시글 노출관련해서 php의 초짜인 제가 전부 다 찾아봤습니다. latest("basic", support, 5, 40) 이런식의 구문은 눈씻고 찾아봐도 없습니다. index.php 등등 정말 전부 다 찾아보고 문의합니다.
그리고 이번이 3번째 질문입니다. --;; 게시판 노출을 8줄로 하고 싶습니다. 정말 간절합니다. 제발 도와주세요 ㅠ.ㅠ


 
?>




<?php

$d = getDomainNameOnly();


if ( $d == "witheng" ) {
  $id_support = "support_witheng";
  $id_reminder = "reminder_ko";
  $id_freetalk = "freetalk_witheng";
}
else {
  $id_support = $d."_support";
  $id_reminder = $d."_reminder";
  $id_freetalk = $d."_freetalk";
}




$tabs_data = array();
$posts = post_latest("support");
$tabs_tr = tabs_tr($posts);




$tabs_data[] =<<<EOH
<table width="249" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td height="22" background="res/img/notice_img1.gif"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="60" align="left"><a href="/bbs/board.php?bo_table=support" onMouseOver=""><img src="res/img/notice_img2.gif" name="Image135" width="55" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(1);"><img src="res/img/notice_img3_on.gif" name="Image136" width="57" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(2);"><img src="res/img/notice_img4_on.gif" name="Image137" width="57" height="22" border="0"></a></td>
                                            <td align="right"><a href="/?$id_support"><img src="res/img/notice_img_more.gif" width="31" height="7" border="0"></a></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr height="3"><td></td></tr>
                                    <tr>
                                      <td height="92"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                            <td height="91" align="left"><table width="241" border="0" cellspacing="0" cellpadding="0">
$tabs_tr
                                            </table></td>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                          </tr>
                                          <tr bgcolor="#dbdbdb">
                                            <td height="1" colspan="3"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table>
EOH;





$posts = post_latest("reminder");
$tabs_tr = tabs_tr($posts);



$tabs_data[] =<<<EOH
<table width="249" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td height="22" background="res/img/notice_img1.gif"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(0);"><img src="res/img/notice_img2_on.gif" name="Image135" width="55" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="/bbs/board.php?bo_table=reminder" onMouseOver=""><img src="res/img/notice_img3.gif" name="Image136" width="57" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(2);"><img src="res/img/notice_img4_on.gif" name="Image137" width="57" height="22" border="0"></a></td>
                                            <td align="right"><a href="/?$id_reminder"><img src="res/img/notice_img_more.gif" width="31" height="7" border="0"></a></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr height="3"><td></td></tr>
                                    <tr>
                                      <td height="92"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                            <td height="91" align="left"><table width="241" border="0" cellspacing="0" cellpadding="0">
$tabs_tr
                                            </table></td>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                          </tr>
                                          <tr bgcolor="#dbdbdb">
                                            <td height="1" colspan="3"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table>
EOH;




$posts = post_latest("freetalk");
$tabs_tr = tabs_tr($posts);



$tabs_data[] =<<<EOH
<table width="249" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td height="22" background="res/img/notice_img1.gif"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(0);"><img src="res/img/notice_img2_on.gif" name="Image135" width="55" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="#" onMouseOver="change_tabs_left(1);"><img src="res/img/notice_img3_on.gif" name="Image136" width="57" height="22" border="0"></a></td>
                                            <td width="60" align="left"><a href="/bbs/board.php?bo_table=freetalk" onMouseOver=""><img src="res/img/notice_img4.gif" name="Image137" width="57" height="22" border="0"></a></td>
                                            <td align="right"><a href="/?$id_freetalk"><img src="res/img/notice_img_more.gif" width="31" height="7" border="0"></a></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr height="3"><td></td></tr>
                                    <tr>
                                      <td height="92"><table width="249" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                            <td height="91" align="left"><table width="241" border="0" cellspacing="0" cellpadding="0">
$tabs_tr
                                            </table></td>
                                            <td width="1" bgcolor="#dbdbdb"></td>
                                          </tr>
                                          <tr bgcolor="#dbdbdb">
                                            <td height="1" colspan="3"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table>
EOH;







    $no = 0;
    foreach($tabs_data as $txt) {
      echo <<<EOH
<div id="tabs_left_$no" style="display:none; height: 130px; overflow:hidden;">$txt</div>
EOH;
      $no ++;
    }

?>


<script>

function change_tabs_left(no)
{
  var t1 = document.getElementById("tabs_left_0");
  var t2 = document.getElementById("tabs_left_1");
  var t3 = document.getElementById("tabs_left_2");
  t1.style.display='none';
  t2.style.display='none';
  t3.style.display='none'; 
  var objname = "tabs_left_"+no;
  var obj = document.getElementById(objname);;
  obj.style.display='block';
}

change_tabs_left(0);


</script>

댓글 전체

소스를 보면 이미 8개가 보이는 거 같습니다.
다만...
<div id="tabs_left_$no" style="display:none; height: 130px; overflow:hidden;">
이 부분에 보시면 높이가 130 픽셀로 설정되어 있는데...overflow:hidden 으로 되어 있으니
그 밑부분이 잘려서 안나오는거죠.

height:200px 정도로 해보시거나
overflow:hidden 을 지우시면 될 거 같습니다.
8개 노출하는건 다른 소스에서 찾았습니다. 그래서 숫자 5로 되어있는 것을 8로 고쳤죠ㅎㅎ
 그런데 메인에 표시가 안되더라구요. 또 이리저리 계속 찾다가 어떻게 노출되게 할지 알아보던중에
으랏찻차 님께서 도움을 주셨네요 ㅎㅎㅎ 너무 감사합니다. ㅎㅎ
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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