게시글 앞에 - 붙이기
본문
안녕하세요
다름이 아닌 현재 사이트를 수정 중에 있습니다.
메인화면에 각 게시판에 올라온 글을
보여주고 있는데요.
게시판의 제목을 받아오고 있습니다.
다름이 아니라 게시글 제목 앞에
- 22222
이렇게 출력되게 하려면 어떤 구문을 수정해야할까요?
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
<div class="lt">
<h2><strong><a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_title"><?php echo $bo_subject ?></strong></a></h2>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li>
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i> ";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\" class=\"lt_tit\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
echo $list[$i]['subject'];
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
if ($list[$i]['icon_new']) echo " <span class=\"new_icon\">N</span>";
if ($list[$i]['icon_file']) echo " <i class=\"fa fa-download\" aria-hidden=\"true\"></i>" ;
if ($list[$i]['icon_link']) echo " <i class=\"fa fa-link\" aria-hidden=\"true\"></i>" ;
if ($list[$i]['icon_hot']) echo " <i class=\"fa fa-heart\" aria-hidden=\"true\"></i>";
echo "</a>";
?>
<span class="lt_comnt"><?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><i class="fa fa-commenting-o" aria-hidden="true"></i><?php echo $list[$i]['comment_cnt']; ?><span class="sound_only">개</span><?php } ?>
</li>
<?php } ?>
<?php if (count($list) == 0) { //게시물이 없을 때 ?>
<li class="empty_li">게시물이 없습니다.</li>
<?php } ?>
</ul>
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span>더보기</a>
</div>
답변 1
echo $list[$i]['subject'];
여기를 이렇게 수정
echo "- ".$list[$i]['subject'];
공지글은 이렇게 하면 되겠네요.
echo "- <strong>".$list[$i]['subject']."</strong>";
아니면 그냥 위 내용 수정할 필요 없이 <li>옆에 추가해도 됩니다. 이게 제일 간편하죠.
<li>-
답변을 작성하시기 전에 로그인 해주세요.