이미지 최신글 관련 문의...

이미지 최신글 관련 문의...

QA

이미지 최신글 관련 문의...

본문

안녕하세요.  지금 1번 그림 상태인데 2번 그림처럼 이미지 위에 4개의 메뉴가 뜨고 해당 메뉴 클릭 시

아래처럼 해당 게시판 게시글(이미지)이 나오게 하고 싶습니다. 어떻게 해야하는지 알려주시면 감사합니다...

2105789910_1619675072.623.png2105789910_1619675075.0314.jpg

 

latest.skin.php


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 썸네일 크기 설정
$thumb_width = '200';    //썸네일 넓이
$thumb_height = '80';    //썸네일 높이
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css?ver=1">', 0);
?>
<div class="ltt">
  <a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_titlea1"><strong>
    <?php echo $bo_subject ?></strong> </a>

   
    <ul style="both:clear;">
    <?php for ($i=0; $i<count($list); $i++) {
        if ($i=='0' || (($i%2)=='0')) 
            echo "<li class=\"moc\">";
        else echo "<li class=\"moc2\">"; 
        
    ?>
                                 <?php
    if ($list[$i]['wr_link1']) {
    echo "<a href=\"".$list[$i]['wr_link1']."\" target='_self'>";
} else {
    echo "<a href=\"".$list[$i]['href']."\">";
}
           
            
            
             
            if ($list[$i]['ca_name'])  echo "<span class='ca_namepink'>" . $list[$i]['ca_name'] . "</span>";
            $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], 320, 200, false, true);
            if($thumb['src']) {
                $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
            } else {
                $img_content = '<img src="'.$latest_skin_url.'/img/noimage.png" alt="'.$thumb['alt'].'" class="img">';
            }
            echo $img_content;
            
            //echo "</a>";
            //echo $list[$i]['icon_reply']." ";
           // echo "<a href=\"".$list[$i]['href']."\">";
            
           // if ($list[$i]['is_notice']) echo "<strong>".$list[$i]['subject']."</strong>";
           // else 
                if ($list[$i]['subject'])  echo "<span class='subject'>". $list[$i]['subject']."</span>";
             
            
                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
                //if (isset($list[$i]['icon_new']))    echo " " . $list[$i]['icon_new'];
                //if (isset($list[$i]['icon_hot']))    echo " " . $list[$i]['icon_hot'];
                //if (isset($list[$i]['icon_file']))   echo " " . $list[$i]['icon_file'];
                //if (isset($list[$i]['icon_link']))   echo " " . $list[$i]['icon_link'];
                //if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret'];
            echo "</a>";
            ?>
        </li>
    <?php } ?>
    <?php if (count($list) == 0) { //게시물이 없을 때 ?>
    <span>게시물이 없습니다.</span>
    <?php } ?>
    </ul>
</div>
<style>
.ltt .subject { padding:0px 0px 0px 10px;font-size:14px;font-weight:400;} 
.ltt .subject{color:#000000;} 
</style>

 

style.css


@charset "utf-8";
/* 최근게시물 스킨 (latest) */
.ltt {position:relative;padding:5px 5px ;}
.ltt ul {list-style:none}
.ltt ul:after {display:block;visibility:hidden;clear:both;content:""}
.ltt .moc {float:left;width:49%; height:auto;padding:0 0px 20px 10px;}
.ltt .moc2 {float:right;max-width:50%;height:auto;padding:0 4px 0px 12px;margin-bottom:5px;}
.ltt .img {width:100%;height:auto;border:1px solid #fff;margin:0px 0px 6px 0px;border-radius:7px;}
.ltt a {display:block;color:#000000;font-size:14px; font-weight: 400;font-family: 'Nanum Gothic'; text-decoration:none}
.ltt .lt_titlea1 {display:inline-block;color: #000000;font-size:13px;font-weight:900;line-height: 30px;padding: 0 10px 5px 0px;}
.ltt .lt_allowso2{display:inline-block;padding:0 2px;color:#000000;font-size:0.8em;}
.ltt .ca_namepink {position: absolute; z-index: 1;
    padding: 5px 7px 5px 7px;
    border-radius: 0px;
    margin:1px;
    font-weight: 400;
    font-size: 14px; 
    color: #fff;    
    text-align: center;
    background: linear-gradient(to right,rgb(70 93 186),rgb(104 12 124 / 90%));
}

 

그누보드 5.3 / php7.3 입니다..

 

이 질문에 댓글 쓰기 :

답변 2

<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 'London')">1번</button>
  <button class="tablinks" onclick="openCity(event, 'Paris')">2번</button>
  <button class="tablinks" onclick="openCity(event, 'Tokyo')">3번</button>
</div>

<!-- Tab content -->
<div id="London" class="tabcontent">
<?php ehco lastest( ... ): ?>
</div>

<div id="Paris" class="tabcontent">
<?php ehco lastest( ... ): ?>
</div>

<div id="Tokyo" class="tabcontent">
<?php ehco lastest( ... ): ?>
</div>

감사합니다..ㅎ 혹시 index.php에 이렇게 적는게 맞을까요?..ㅜ



<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 'movie_pic')">영화</button>
  <button class="tablinks" onclick="openCity(event, 'book')">도서</button>
  <button class="tablinks" onclick="openCity(event, 'newsplus')">굿즈</button>
</div>

<!-- Tab content -->
<div id="movie_pic" class="tabcontent">
<?php ehco lastest("theme/latest_category", 'movie_pic', 2, 38); ?>
</div>

<div id="book" class="tabcontent">
<?php ehco lastest("theme/latest_category", 'book', 2, 38); ?>
</div>

<div id="newsplus" class="tabcontent">
<?php ehco lastest("theme/latest_category", 'newsplus', 2, 38); ?>
</div>


https://www.w3schools.com/howto/howto_js_tabs.asp

참고하세요.


<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 'London')">1번</button>
  <button class="tablinks" onclick="openCity(event, 'Paris')">2번</button>
  <button class="tablinks" onclick="openCity(event, 'Tokyo')">3번</button>
</div>

<!-- Tab content -->
<div id="London" class="tabcontent">

</div>

<div id="Paris" class="tabcontent">

</div>

<div id="Tokyo" class="tabcontent">

</div>



<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 썸네일 크기 설정
$thumb_width = '200';    //썸네일 넓이
$thumb_height = '80';    //썸네일 높이
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css?ver=1">', 0);
?>

<div class="ltt">
  <a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_titlea1"><strong>
	<?php echo $bo_subject ?></strong> </a>


   
    <ul style="both:clear;">

    <?php for ($i=0; $i<count($list); $i++) {
		if ($i=='0' || (($i%2)=='0')) 
			echo "<li class=\"moc\">";
		else echo "<li class=\"moc2\">"; 
		
	?>
                                 <?php

	if ($list[$i]['wr_link1']) {
    echo "<a href=\"".$list[$i]['wr_link1']."\" target='_self'>";
} else {
    echo "<a href=\"".$list[$i]['href']."\">";
}
           
			
			

             
            if ($list[$i]['ca_name'])  echo "<span class='ca_namepink'>" . $list[$i]['ca_name'] . "</span>";

            $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], 320, 200, false, true);

            if($thumb['src']) {
				$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
            } else {
				$img_content = '<img src="'.$latest_skin_url.'/img/noimage.png" alt="'.$thumb['alt'].'" class="img">';
            }

			echo $img_content;
			
			//echo "</a>";

            //echo $list[$i]['icon_reply']." ";
           // echo "<a href=\"".$list[$i]['href']."\">";
			
           // if ($list[$i]['is_notice']) echo "<strong>".$list[$i]['subject']."</strong>";
           // else 
				if ($list[$i]['subject'])  echo "<span class='subject'>". $list[$i]['subject']."</span>";
             

            

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

                //if (isset($list[$i]['icon_new']))    echo " " . $list[$i]['icon_new'];
                //if (isset($list[$i]['icon_hot']))    echo " " . $list[$i]['icon_hot'];
                //if (isset($list[$i]['icon_file']))   echo " " . $list[$i]['icon_file'];
                //if (isset($list[$i]['icon_link']))   echo " " . $list[$i]['icon_link'];
                //if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret'];

            echo "</a>";
            ?>
        </li>
    <?php } ?>
    <?php if (count($list) == 0) { //게시물이 없을 때 ?>
    <span>게시물이 없습니다.</span>
    <?php } ?>
    </ul>

</div>

<style>

.ltt .subject { padding:0px 0px 0px 10px;font-size:14px;font-weight:400;} 
.ltt .subject{color:#000000;} 
</style>

잘모르겠네요..ㅠ

답변을 작성하시기 전에 로그인 해주세요.
전체 34
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT