최신글 클릭시 원하는 페이지로 이동.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
최신글 클릭시 원하는 페이지로 이동.

QA

최신글 클릭시 원하는 페이지로 이동.

답변 1

본문

최신게시물을 클릭하면

글쓴 게시판의 본문으로 이동을 하는데요.

 

제가 원하는 페이지로가게도 가능할까요?

 

그리고

게시물에 태그가 노출이 되는데요.

 

아래와 같은 답변 글을 받았습니다.

 

어찌 적용을 해야하는지 ㅜㅜ

 

내용글이니 

<?php echo conv_content($list[$i]['wr_content'], 1);?> 

이런식으로 여러가지 방법이 있습니다.. 

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
 
$board['bo_gallery_width'] = 700;
$board['bo_gallery_height'] = 300;
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
 
<!-- <script src="http://code.jquery.com/jquery.js"></script> -->
<script src="<?php echo $latest_skin_url?>/src/skdslider.min.js"></script>
<link href="<?php echo $latest_skin_url?>/src/skdslider.css" rel="stylesheet">
<script type="text/javascript">
		jQuery(document).ready(function(){
			jQuery('#demo1').skdslider({delay:5000, animationSpeed: 2000,showNextPrev:true,showPlayButton:true,autoSlide:true,animationType:'fading'});
			jQuery('#demo2').skdslider({delay:5000, animationSpeed: 1000,showNextPrev:true,showPlayButton:false,autoSlide:true,animationType:'sliding'});
			jQuery('#demo3').skdslider({delay:5000, animationSpeed: 2000,showNextPrev:true,showPlayButton:true,autoSlide:true,animationType:'fading'});
			
			jQuery('#responsive').change(function(){
			  $('#responsive_wrapper').width(jQuery(this).val());
			  $(window).trigger('resize');
			});
			
		});
</script>
 
<div id="responsive_wrapper" style="max-width:100%;margin:0 auto;">
<ul id="demo2">
    <?php for ($i=0; $i<count($list); $i++) { ?>
    <li>
        <a href="<?php echo $list[$i]['href'] ?>">
        <?php
        if ($list[$i]['is_notice']) { // 공지사항  ?>
            <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
        <?php } else {
            $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
 
            if($thumb['src']) {
                $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'">';
            } else {
                $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
            }
 
            echo $img_content;
        }
         ?>
        </a>
        <div class="slide-desc">
            <h2><?php echo $list[$i]['subject']?></h2>
            <p><?php echo conv_content($list[$i]['wr_content'], 0)?> <a class="more" href="<?php echo $list[$i]['href'] ?>">더보기</a></p>
        </div>
    </li>
    <?php } ?>
</ul>
</div> 

이 질문에 댓글 쓰기 :

답변 1

<?php echo conv_content($list[$i]['wr_content'], 0)?> 

여기서 0 을 1로 바꿔주면 태그가 노출되지 않습니다.​

<?php echo conv_content($list[$i]['wr_content'], 1)?>

 

본문이 아닌 원하는 페이지로 이동은

<a href="<?php echo $list[$i]['href'] ?>"> 

윗부분을 이렇게 하면 게시판에 글 작성시 링크 첫 번째에 URL을 입력하면 해당 주소로 이동하게 됩니다.

 

<?php if ($list[$i]['wr_link1']) { ?>

<a href="<?php echo $list[$i]['wr_link1'] ?>">

<?php } else { ?>

<a href="<?php echo $list[$i]['href'] ?>">

<?php } ?> 

 

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