이방법으로 아무리해도 잘안되네요.. 조금만더 이해쉽게 설명해주시면 너무감사하겠습니다..
제가 질문했던것은 아래에 광고내용이었습니다.(게시판목록의 글제목 사이사이에 광고를 넣는법.-게시글내 말고-)
게시판목록
1. ~~~~~~
2.~~~~~~
3.~~~~~~
4.광고
5.~~~~~~
6.~~~~~~
7.~~~~~~
8.광고
9.~~~~~~
10..~~~~~
저희가 코드까지 직접 만들어드리긴 한계가 있기 때문에 다음엔 유료 기술지원을 요청해주시길 부탁드립니다.
고맙습니다.
안녕하세요.
새로운 질문이 아니라 이어지는 질문이라면 이전 질문 페이지의 댓글로 남겨주세요.
규칙이 지켜지지 않는다면 저희가 답변을 제대로 못 드릴 수 있습니다.
이전에 안내해드린 코드는 게시글이 아니라
게시글 목록 페이지에서 게시글 사이에
게시글이 아닌 임의의 코드를 넣을 수 있는 방법을 안내해드렸습니다.
default 스킨을 기준으로 안내해드리겠습니다.
list.php 파일에 아래의 코드를 찾아서
<?php while($content = $list->hasNext()):?>
<tr class="<?php if($content->uid == kboard_uid()):?>kboard-list-selected<?php endif?>">
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-list-title">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
</div>
</a>
<div class="kboard-mobile-contents">
<span class="contents-item kboard-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></span>
<span class="contents-separator kboard-date">|</span>
<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
<span class="contents-separator kboard-vote">|</span>
<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
<span class="contents-separator kboard-view">|</span>
<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
</div>
</td>
<td class="kboard-list-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></td>
<td class="kboard-list-date"><?php echo $content->getDate()?></td>
<td class="kboard-list-vote"><?php echo $content->vote?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
아래의 코드처럼 적용해보세요.
<?php $index = 0;?>
<?php while($content = $list->hasNext()):?>
<tr class="<?php if($content->uid == kboard_uid()):?>kboard-list-selected<?php endif?>">
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-list-title">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
</div>
</a>
<div class="kboard-mobile-contents">
<span class="contents-item kboard-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></span>
<span class="contents-separator kboard-date">|</span>
<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
<span class="contents-separator kboard-vote">|</span>
<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
<span class="contents-separator kboard-view">|</span>
<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
</div>
</td>
<td class="kboard-list-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></td>
<td class="kboard-list-date"><?php echo $content->getDate()?></td>
<td class="kboard-list-vote"><?php echo $content->vote?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php if($index == 3):?>
<tr>
<td colspan="6">광고 1</td>
</tr>
<?php endif?>
<?php if($index == 7):?>
<tr>
<td colspan="6">광고 2</td>
</tr>
<?php endif?>
<?php $index++;?>
<?php endwhile?>
고맙습니다.