최근게시물 제목만 나오는데 내용도 나오게 할수 없을까요?

최근게시물 제목만 나오는데 내용도 나오게 할수 없을까요?

QA

최근게시물 제목만 나오는데 내용도 나오게 할수 없을까요?

답변 3

본문

안녕하세요???? php는 1도 모르는 사람입니다 ㅠㅠ

 

html하고 css는 조금 다룰줄 아는데 php는 제 영역 밖에있네요.

 

웹디자이너인데 영세한 회사라 몸이피곤하네요 ㅠㅠ

 

빌더를 사용하고 있는데요. 최근게시물을 했더니 제목만 나옵니다.

 

내용도 한줄 나오게 하고싶은데 스킨자료실에 제목과 내용나오는것을 아무리 분석을 해도 모르겠습니다.

 

아래는 최근게시물 소스입니다.

 

<?php if (!defined('_GNUBOARD_')) exit;

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>


<div class="latest st-basic">
    <div class="header clearfix">
        <h4 class="title">
            <a href="<?=G5_BBS_URL ?>/board.php?bo_table=<?=$bo_table ?>"><?=$bo_subject; ?></a>
        </h4>
        <small class="more"><a href="<?=G5_BBS_URL ?>/board.php?bo_table=<?=$bo_table ?>">+ 더 보기</a></small>
    </div>
    <ul class="body">
        <?php for ($i=0; $i<count($list); $i++) {  ?>
        <li class="ellipsis-li cl_ellipsis">
            <?php if ($list[$i]['is_notice']) { // 공지 ?>
            <span class="label label-primary"><i class="fa fa-bell" aria-hidden="true" title="공지"></i></span>
            <?php } ?>
            <?php if ($list[$i]['icon_secret']) { // 비밀글?>
            <span class="label label-warning"><i class="fa fa-lock" aria-hidden="true" title="비밀글"></i></span>
            <?php } ?>

            <?php
            //echo $list[$i]['icon_reply']." ";
            echo "<a href=\"".$list[$i]['href']."\">";
            if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong>";
            else
                echo $list[$i]['subject'];
            echo "</a>";

            if (!empty($list[$i]['icon_file'])) echo ' <span class="icon" title="첨부파일"><i class="fa fa-floppy-o" aria-hidden="true"></i></span>';
            if (!empty($list[$i]['icon_link'])) echo ' <span class="icon" title="링크"><i class="fa fa-link" aria-hidden="true"></i></span>';
            if (!empty($list[$i]['icon_hot'])) echo ' <span class="icon icon-hot" title="이슈"><i class="fa fa-heart" aria-hidden="true"></i></span>';
             ?>
            <?php if ($list[$i]['comment_cnt']) { ?><small class="comment">[<?=$list[$i]['comment_cnt']; ?>]</small><?php } ?>
            <?php if ($list[$i]['icon_new']) { ?><small class="new">new</small><?php } ?>
        </li>
        <?php }  ?>

        <?php if (count($list) == 0) { //게시물이 없을 때  ?>
        <li>게시물이 없습니다.</li>
        <?php }  ?>

        <?php for ($j=0; $j<(count($list)? $rows-$i: 4); $j++) {  // 빈 rows 채움?>
        <li> </li>
        <?php } ?>
    </ul>
</div>
 

뭘추가해야할지 모르겠는데 좀 알려주시면 정말 감사하겠습니다.

이 질문에 댓글 쓰기 :

답변 3

제목 부분이

            if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong>";
            else
                echo $list[$i]['subject'];
            echo "</a>";

이거든요.

해당 부분을 넣어서

 

            if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong><br><br>";

               echo "conv_subject($list[$i]['wr_content'], 120, $cutopt="...")";
            else
                echo $list[$i]['subject']."<br><br>";

               echo "conv_subject($list[$i]['wr_content'], 120, $cutopt="...")";
            echo "</a>";

로 해보세요.

검색으로 꾸역꾸역 찾긴했는데요.

<?=conv_subject($list[$i]['wr_content'], 120, $cutopt="...")?>

이걸 넣으면 된다하는데 여기저기 넣어봐도 <a></a>안쪽으로 안들어가는데 방법이 없을까요?

게시판 관리자 에서 "목록에서 내용 사용" 에 체크하시고 윗분들 말씀처럼 $list[$i]['wr_content'] 쓰세요.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 11
© SIRSOFT
현재 페이지 제일 처음으로