테스트 사이트 - 개발 중인 베타 버전입니다

최신글에 카테고리 이름 불러오는 방법 알려주시면 감사합니다. 채택완료

그리그린 5년 전 조회 3,157

최신글 앞에 카테고리 "분류명"이 떠야하는데 해당 "게시판 이름"이 표시됩니다. ㅠ

어떻게 해야할까요?ㅠㅠㅠ  

 

 

</p>

<p><div class="basic_2_lt"></p>

<p>    <!--<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_title"><i class="fa fa-list-ul" aria-hidden="true"></i> <strong><?php echo $bo_subject ?></strong></a>-->

    <ul>

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

<p>

        <li>

            <?php

            //if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";

            //if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";

            //if ($list[$i]['icon_hot']) echo "<span class=\"hot_icon\">H<span class=\"sound_only\">인기글</span></span>";

            if($list[$i]['wr_10']) {

                $bque = "SELECT bo_subject from g5_board where bo_table='{$list[$i]['wr_10']}'";

                $brow = sql_fetch($bque);

                echo "<span class='board'>[".$brow['bo_subject']."]</span>";                

            }

            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 ($list[$i]['comment_cnt'])  echo "<span class=\"lt_cmt\">[".$list[$i]['comment_cnt']."]</span>";

            if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];

            $write_table2 = $g5['write_prefix']."게시판코드(bo_table)";

            $count_fetch = sql_fetch("select count(wr_id) as cnt from {$write_table2} where wr_is_comment = 0");

            ?>

            <!-- <span class="lt_date"><?php echo $list[$i]['datetime2'] ?></span> -->

        </li>

    <?php }  ?>

    <?php if (count($list) == 0) { //게시물이 없을 때  ?>

    <li class="empty_li">게시물이 없습니다.</li>

    <?php }  ?>

    </ul>

    </div>

</div></p>

<p>

 

아래는 .css 입니다

 

</p>

<p>/* 최근게시물 스킨 (latest) */

.basic_2_lt {position: relative;margin-top:5px;margin-bottom:0px;padding:0px 15px;background: #fff;}

.basic_2_lt ul {margin:0;padding:0px;;list-style:none; }

.basic_2_lt ul li{

    font-size:13px;border-bottom: 1px solid #f2f2f2;height: 40px; line-height: 40px; 

    text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;width:100%;overflow:hidden;font-family: 'Nanum Square'; font-weight: boldzz;

}

.lat_best .board {color:#6e4bfa;font-size:15px ;font-weight:500 ; font-family: 'Nanum Gothic';}
 
 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
echo $list[$i]['subject']; 여기 부분을 echo ".[.$list[$i][ca_name]."]".$list[$i]['subject']; 으로 변경하면 되지 않을까요?
로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

그리그린
5년 전
Parse error: syntax error, unexpected ']', expecting ',' or ';' in /home/dohyeon321/html/theme/basic/mobile/skin/latest/basic_4/latest.skin.php

이렇게 에러가 뜨네요ㅠㅠ
그리그린
5년 전
감사합니다 ㅎ 잘됩니다 ㅎㅎ

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인