• [제로보드] 최근게시물에 more 추가하기
  • Zappy (IP: *.114.182.21)
    조회 수: 8425, 2005-03-10 01:27:02(2005-03-10)
  • 테두리색상은 자신의 홈페이지 따라 이쁘게 바꾸시면 됩니다..^^
    more버튼에 게시판 링크걸기 추가
    일단 제로보드 폴더 경로에 있는 outlogin.php 파일을 열어보세요
    그리고 아래 구분을 찾아보세요..
    while($data=mysql_fetch_array($result)) {
    $name = stripslashes($data[name]);
    $subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
    $date = date($datetype, $data[reg_date]);
    다음에는
    $date = date($datetype, $data[reg_date]); 구문밑에 줄에

    아래와 같이 삽입해주세요
    $more_img = $_zb_url."latest_skin/$skinname/images/more.gif"; // more 추가부분

    그러면 이렇게 되겠죠

    while($data=mysql_fetch_array($result)) {
    $name = stripslashes($data[name]);
    $subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
    $date = date($datetype, $data[reg_date]);
    $more_img = $_zb_url."latest_skin/$skinname/images/more.gif"; // more 추가부분


    여기까지는 more.gif 를 설정해주는 부분입니다.

    다음은 more.gif를 클릭하면 해당 게시판이 열리는 방법을 알아야겠죠?
    차근차근 따라 해보세요...

    조금만 아래로 내려가면 아래와 같은 구문이 있습니다.

    $list = $header.$main_data.$footer;
    $list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
    바로 밑줄에
    아래부분을 삽입해주세요
    $list = str_replace("[more]","<a href='".$_zb_url."zboard.php?id=".$id."'>"."<img src=$more_img border=0>"."</a>",$list); // more 추가부분

    그럼 이렇게 되겠죠

    $list = $header.$main_data.$footer;
    $list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
    $list = str_replace("[more]","<a href='".$_zb_url."zboard.php?id=".$id."'>"."<img src=$more_img border=0>"."</a>",$list); // more 추가부분
    $list = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$list);
    echo $list;

    자 그럼 outlogin.php 파일은 수정이 끝난겁니다.

    주의사항 ★★갤러리부분 more 넣기 ★★

    또한 일반게시물과 공지는 같은 방식으로 고치시면 되지만, 갤러리부분은 조금 틀리다는 것을 아셔야 하는 거죠!!!!

    윗부분 생략

    $result = mysql_query("select * from $t_board"."_$id order by no desc limit $num", $connect) or die(mysql_error());

    $i = 0;
    while($data=mysql_fetch_array($result)) {
    if(eregi(".gif|.jpg",$data[file_name1])) $filename = $_zb_url.$data[file_name1];
    elseif(eregi(".gif|.jpg",$data[file_name2])) $filename = $_zb_url.$data[file_name2];
    else $filename="";
    $more_img = $_zb_url."latest_skin/$skinname/images/more.gif"; // more 추가부분

    아래부분에 보시면
    $str = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$str);
    $str = str_replace("[more]","<a href='".$_zb_url."zboard.php?id=".$id."'>"."<img src=$more_img border=0>"."</a>",$str); // more 추가부분
    $str = str_replace("[img]",$imgList,$str);
    $str = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$str);
    echo $str;
    이렇게 해주시면 갤러리 최근게시물도 more부분을 붙힐 수 있습니다.

    스킨부분 수정(구루최근게시물에는 more 적용되어 있습니다.)
    제로보드 폴더 안에 latest_skin 폴더 안에 보면 있습니다.
    해당스킨에 찾아서 main.html에 원하시는 곳에서 [more]추가
    (현재스킨에서 [more]를 적용시켰습니다. 따라서 윗부분만 수정하시면 됩니다.

    갤러리 추출시
    예) <?print_gallery("ex/guru_20050211/guru_gallery", "디카앨범", "deca", 5, 70, 70, 5) ?>
    가끔 일반 게시물 추출로 해서 more적용이 안된다고 하시는 분들이 있어서^^

댓글 0

번호 제목 닉네임 조회  등록일 
44 Zappy 7136 2005-01-12
43 Zappy 7339 2005-01-12
42 Zappy 7422 2005-01-12
41 Zappy 7785 2005-01-12
40 Zappy 7958 2005-01-12
39 Zappy 8127 2006-01-04
38 Zappy 8211 2005-03-09
37 Zappy 8280 2005-05-01
Zappy 8425 2005-03-10
35 Zappy 8469 2005-03-20
XE Login