채택완료

갤러리게시판 제목 삭제

2017-08-22 (화) 17:26:43 3,306

안녕하세요

최신글을 썸네일로 나오는것을 thisgun님 자료를 도움으로 구현은 가능하게되었습니다. 

여기서 제가 사진에 p01-01 같은 제목을 빼고싶은데 소스코드에서 어디부분을 손보면될까요??

사진

55e0cb2f418811cb13ddd308dd9f6d99_1503390319_2888.jpg 

소스코드

<?php

if (!defined('GC_NAME')) exit; // 개별 페이지 접근 불가

include_once( GC_LIB_PATH.'/thumbnail.lib.php' );  //리스트에서 이미지를 사용할시 사용

if( !is_array($list) ) return;

// $gc_page_url 이 빈값으로 나올 경우 숏코드에 해당 url을 입력, 또는 게시판 기본 설정에서 적용할 페이지을 설정해 주시면 됩니다.

$img_width = $img_height = '300';   //이미지 width, height 지정 ( 썸네일 크기 )

?>

<div class="gc_latest_lt">

    <ul class="gc_latest_ul latest_row">

    <?php

    foreach($list as $row) {

        if( !isset($row['wr_id']) ) continue;

        $thumb = gc_get_list_thumbnail($bo_table, $row['wr_id'], $img_width, $img_height);

        if($thumb['src']) {     //이미지가 있을때

            $img_content = '<img src="'.$thumb['src'].'" class="lat_img" alt="'.$thumb['alt'].'" >';

        } else {    //이미지가 없을때

            $img_content = '<span class="lat_img" >no image</span>';

        }

    ?>

        <li class="col-gn-<?php echo $rows; ?>">

            <?php

            echo "<a href=\"".esc_url($row['href'])."\">";

            echo $img_content;

            if ($row['is_notice'])

                echo "<strong>".$row['subject']."</strong>";

            else

                echo $row['subject'];

            if ($row['comment_cnt'])

                echo $row['comment_cnt'];

            echo "</a>";

            // if ($row['link']['count']) { echo "[{$row['link']['count']}]"; }

            // if ($row['file']['count']) { echo "<{$row['file']['count']}>"; }

            if (isset($row['icon_new'])) echo " " . $row['icon_new'];

            if (isset($row['icon_hot'])) echo " " . $row['icon_hot'];

            if (isset($row['icon_file'])) echo " " . $row['icon_file'];

            if (isset($row['icon_link'])) echo " " . $row['icon_link'];

            if (isset($row['icon_secret'])) echo " " . $row['icon_secret'];

             ?>

        </li>

    <?php }  ?>

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

    <li><?php _e('게시물이 없습니다.', GC_NAME);?></li>

    <?php }  ?>

    </ul>

    <div class="lt_more"><a href="<?php echo esc_url( $gc_page_url ); ?>"><span class="sound_only"><?php echo $bo_subject ?></span><?php _e('더보기', GC_NAME);?></a></div>

</div>

<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->


답변 3개

채택된 답변
+20 포인트

이부분과 

    if ($row['is_notice'])

                echo "<strong>".$row['subject']."</strong>";

            else

                echo $row['subject'];

            if ($row['comment_cnt'])

                echo $row['comment_cnt'];

이부분을 주석하거나 삭제하시면 되실거같아요

            if (isset($row['icon_new'])) echo " " . $row['icon_new'];

            if (isset($row['icon_hot'])) echo " " . $row['icon_hot'];

            if (isset($row['icon_file'])) echo " " . $row['icon_file'];

            if (isset($row['icon_link'])) echo " " . $row['icon_link'];

            if (isset($row['icon_secret'])) echo " " . $row['icon_secret'];

답변 감사합니다 ㅎ
2017-08-22 (화) 17:37:53

Copy
<?phpif (!defined('GC_NAME')) exit; // 개별 페이지 접근 불가include_once( GC_LIB_PATH.'/thumbnail.lib.php' );  //리스트에서 이미지를 사용할시 사용  if( !is_array($list) ) return;// $gc_page_url 이 빈값으로 나올 경우 숏코드에 해당 url을 입력, 또는 게시판 기본 설정에서 적용할 페이지을 설정해 주시면 됩니다.  $img_width = $img_height = '300';   //이미지 width, height 지정 ( 썸네일 크기 )?><div class="gc_latest_lt">    <ul class="gc_latest_ul latest_row">    <?php    foreach($list as $row) {        if( !isset($row['wr_id']) ) continue;        $thumb = gc_get_list_thumbnail($bo_table, $row['wr_id'], $img_width, $img_height);          if($thumb['src']) {     //이미지가 있을때            $img_content = '<img src="'.$thumb['src'].'" class="lat_img" alt="'.$thumb['alt'].'" >';        } else {    //이미지가 없을때            $img_content = '<span class="lat_img" >no image</span>';        }    ?>        <li class="col-gn-<?php echo $rows; ?>">            <?php            echo "<a href=\"".esc_url($row['href'])."\">";            echo $img_content;            /*if ($row['is_notice'])                echo "<strong>".$row['subject']."</strong>";            else                echo $row['subject'];            */              if ($row['comment_cnt'])                echo $row['comment_cnt'];              echo "</a>";              // if ($row['link']['count']) { echo "[{$row['link']['count']}]"; }            // if ($row['file']['count']) { echo "<{$row['file']['count']}>"; }              if (isset($row['icon_new'])) echo " " . $row['icon_new'];            if (isset($row['icon_hot'])) echo " " . $row['icon_hot'];            if (isset($row['icon_file'])) echo " " . $row['icon_file'];            if (isset($row['icon_link'])) echo " " . $row['icon_link'];            if (isset($row['icon_secret'])) echo " " . $row['icon_secret'];             ?>        </li>    <?php }  ?>    <?php if (count($list) == 0) { //게시물이 없을 때  ?>    <li><?php _e('게시물이 없습니다.', GC_NAME);?></li>    <?php }  ?>    </ul>    <div class="lt_more"><a href="<?php echo esc_url( $gc_page_url ); ?>"><span class="sound_only"><?php echo $bo_subject ?></span><?php _e('더보기', GC_NAME);?></a></div></div>  <!-- } <?php echo $bo_subject; ?> 최신글 끝 -->

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