zb5beta - 질문답변
제로보드의 게시판과 로그인만 떼어 사용해서 홈페이지를 완성했습니다.
그동안 도움 주신 잠순이님께 깊은 감사드립니다.
제로보드사이트의 팁공유과 잠순이님을 통해..구현하였고..소개되어 있지않은 팁을 올려봅니다.
zb5/modules/board/skins/zb5_board/tpl/write_form.tpl
<div id="contents_area">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="tbl_box" style="margin-top:3px;">
<tr>
<th>
{include file="$common_tpl_path/richtext_form.include.tpl" lang=$lang}
<table border="0" cellpadding="0" cellspacing="0" class="tbl_normal" style="margin-top:5px;">
<tr>
<td height="20" style="padding-left:5px;padding-top:1px;"><input type="checkbox" class="checkbox" name="allow_comment" id="allow_comment" value="Y" {if $article->allow_comment eq 'Y' || !$article->article_srl}checked {/if}/></td>
<td nowrap="nowrap" class="desc fc_02" style="padding-right:25px;"><label for="allow_comment">{$lang->common->fld_allow_comment}</label></td>
{if $is_logged}
<td style="padding-top:1px;"><input type="checkbox" class="checkbox" name="use_reply_message" id="allow_comment_to_msg" value="Y" {if $article->use_reply_message eq 'Y'}checked {/if} /></td>
<td nowrap="nowrap" class="desc fc_02" style="padding-right:25px;"><label for="allow_comment_to_msg">{$lang->common->fld_get_reply_message}</label></td>
{/if}
<!--공지글 여부-->
{if $is_admin}
<td style="padding-top:1px;">
<input type="checkbox" class="checkbox" name="is_notice" id="allow_comment_to_msg" value="Y"
{if $article->is_notice eq 'Y'}checked {/if} /></td>
<td nowrap="nowrap" class="desc fc_02" style="padding-right:25px;"><label for="allow_comment_to_msg">able notice?</label></td>
{/if}
<!--공지글 여부-->
</tr>
</table>
</th>
</tr>
</table>
---------------------------------------------------------------------------------------
zb5/modules/board/skins/zb5_board/tpl/list.tpl
{** list area **}
<table width="100%" border="0" cellpadding="0" cellspacing="1" id="board_list">
<tr>
<th width="50"><div class="fc_02">{$lang->common->fld_no}</div></th>
<th><div class="fc_02">{$lang->common->fld_title}</div></th>
<th width="120"><div class="fc_02">{$lang->common->fld_writer}</div></th>
<th width="80"><div class="fc_02">{$lang->common->fld_date}</div></th>
<th width="45"><div class="fc_02">{$lang->common->fld_voted}</div></th>
<th width="45"><div class="fc_02">{$lang->common->fld_readed}</div></th>
</tr>
<!-- 공지글 출력 -->
{foreach from=$article_list key=key item=obj name=list}
{assign var=noticeNo value= $obj->module_srl}
{/foreach}
{php}
$noticeNo = $this->get_template_vars('noticeNo');
$connect = mysql_connect("localhost", "uminwedding", "photojs5125");
mysql_select_db("uminwedding");
$query = "SELECT * FROM `zb_articles` where module_srl = '$noticeNo' and is_notice = 'Y' order by article_srl desc";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)){
$noticeDate = substr($row[9],0,4)."-".substr($row[9],4,2)."-".substr($row[9],6,2);
{/php}
<tr class="row_0{$smarty.foreach.list.iteration%2+1} nt">
{php}
echo "<td class='no'><div>notice</div></td>
<td class='subject'> <label class='hot'> </label>
<a href='./?sid=121&article_srl=$row[0]' class='fc_01'>$row[6]</a>
</td>
<td class='writer'>
<div style='padding-left:8px;' class='fc_02'>$row[3]</div>
</td>
<td class='date'><div >$noticeDate</div></td>
<td class='hits'><div>0</div></td>
<td class='hits'><div>$row[14]</div>
</td>
</tr>
";
}
{/php}
<!-- 공지글 출력 종료 -->

