채택완료

이런 경우 어떻게 해야하나요? (왕초보주의) (쉬움주의)

2018-03-28 (수) 02:44:46 4,674

1847740890_1522172476.8428.png

여기 보시면 이건 제 연혁 게시판인데요!

똑같은 스킨을 적용한 분의 연혁게시판을 보니

1847740890_1522172574.1958.png

저렇게 수정된게 멋있더라구요..

1.일단 저 틀을 어떻게 저렇게 뭉툭하게 수정하는지도 궁금하구요!

2.연도를 크고 굵게 바꾸는법도 궁금합니다.

3. 지금 월 옆에 예를 들면 2월이다 그러면 2월. 이 아니고 2. 이렇게 되는데 (이건 제꺼나 저분꺼나 동일)

   혹시 출력될때 12 옆에 월. 이렇게 자동으로 나오게끔 어떻게 하나요?

list.skin.php 파일을 건드려야 할 것 같아서

복사해드립니다!

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
include_once $board_skin_path."/board_head.skin.php";
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/css/style.css">', 20);
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/css/lightbox.css">', 21);
?>

<div class="sub_con widthfix">

 <div class="history_div mt55">
    <form name="fboardlist"  id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
    <input type="hidden" name="sw" value="">

  <!-- 게시판 목록 시작 -->
  <?
  $sql = "SELECT * FROM $write_table ORDER BY wr_subject $board[bo_4], wr_1, wr_2 ";

  $result=sql_query($sql);
  //$num_rows = mysql_num_rows($result);
  $count = 0;
  while($data=sql_fetch_array($result)) {
   
   $count++;
   $hList[]=$data; 

   if($preYear != $data[wr_subject]) {
    $preYear = $data[wr_subject];

     if($count > 1) {
      $cicle_img = '<div class="year_body"><span>'.$data[wr_subject].'</span></div>';
     }elseif($count == 1){
      $cicle_img = '<div class="year_body first"><span>'.$data[wr_subject].'</span></div>';
     }

    echo '    <div class="p_box '.$margin_top.'">';
    echo '     <div class="history_img">'.$cicle_img.'</div>';
    echo '     <div class="history_txt">';


    $tmp_write_table = $g5['write_prefix'] . $board['bo_table']; // 게시판 테이블 전체이름
    $sql_detail = " select * from {$tmp_write_table} where wr_subject = {$data[wr_subject]} order by wr_subject $board[bo_4], wr_1, wr_2 ";
    $result_detail = sql_query($sql_detail);
    $history_icon = '';
    
    for ($i=0; $hList = sql_fetch_array($result_detail); $i++) {
     if($i == 0) {
       if($i > -1) $margin_top = "mt30";
      echo '<div class="tit">';
      echo ' <h4>'.$hList[wr_subject].'</h4>';
      echo ' <div class="bar"></div>';
      echo '</div>';
     }
     $disp_month = $hList[wr_1];
     $disp_day = $hList[wr_2];
     if($board[bo_3]=="d") {
      $display = $disp_month.".".$disp_day." ";
     }else{
      $display = $disp_month.". ";
     }

     echo '<p class="mt5">';
     if($is_admin || $is_checkbox) echo '<input type="checkbox" name="chk_wr_id[]" value="'.$hList[wr_id].'" title="'.$hList[wr_subject].'"> ';

     if($is_admin) {
      echo ' <a href="'.G5_BBS_URL.'/write.php?bo_table='.$bo_table.'&w=u&wr_id='.$hList[wr_id].'">';
     }

     echo $display.rtrim(nl2br($hList[wr_content]));

     if ($is_admin)
     {
      set_session("ss_delete_token", $token = uniqid(time()));
      $delete_href ='./delete_all.php?bo_table='.$bo_table.'&amp;wr_id='.$hList[wr_id];
      echo ' </a> ';
      echo '<a href="javascript:del(\''.$delete_href.'\');"><img src="'.$board_skin_url.'/img/btn_close.gif" alt="Delete" width="15px" height="14px" /></a>';
     } 
     echo '</p>';

     $thumb = get_list_thumbnail($bo_table, $hList['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
     $sql = " select bf_file, bf_content from {$g5['board_file_table']}
        where bo_table = '$bo_table' and wr_id = '$hList[wr_id]' and bf_type between '1' and '3' order by bf_no limit 0, 1 ";
     $row = sql_fetch($sql);

     if($thumb['src']) {
      $history_icon .= '<div class="history_icon">';
      $history_icon .= '<strong>'.$hList[wr_subject].'</strong>';
      $history_icon .= '<p class="tit">'.$thumb['alt'].'</p>';
      $history_icon .= '<p class="mt5"><a href="'.G5_DATA_URL.'/file/'.$bo_table.'/'.$row['bf_file'].'" data-lightbox="history-image-set" class="light-box-image"><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></a></p>';
      $history_icon .= '</div>';
     }

    }
    echo '     </div>';
    echo $history_icon;
    echo '    </div>';
   }
  }

  ?>
  <div class="p_box">
   <div class="history_img"><img src="<?=$board_skin_url?>/img/history_start.gif" style="position:absolute;bottom:0;left:83px;" alt="history_start"></div>
   <div class="history_txt">
   </div>
  </div>


 </div>

 <div class="mt40"></div>


    <?php if ($is_admin || $list_href || $is_checkbox || $write_href) { ?>
    <div class="bo_fx">
        <?php if ($is_checkbox) { ?>
        <ul class="btn_bo_adm">
            <li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"></li>
            <li><input type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value"></li>
            <li><input type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value"></li>
        </ul>
        <?php } ?>

        <?php if ($list_href || $rss_href || $write_href) { ?>
        <ul class="btn_bo_user">
            <?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01">RSS</a></li><?php } ?>
            <?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin">관리자</a></li><?php } ?>
            <?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
        </ul>
        <?php } ?>
    </div>
    <?php } ?>
 </form>

<!-- 페이지 -->
<?php //echo $write_pages;  ?>

</div>


 <script type="text/javascript">
var num = 0;
    jQuery(document).ready(function(){
        jQuery(".history_img");
        jQuery(".history_txt");
            $(".history_icon");
    })
    jQuery(window).load(function(){
        jQuery(".history_img").each(function(index){
            jQuery.easing.def = "easeOutQuart";
            num++;
            jQuery(".history_img").eq(index).delay().animate({opacity:100, marginTop:"0px"}, 900);
            jQuery(".history_txt").eq(index).delay().animate({opacity:100, marginTop:"0px"}, 900);
                $(".history_icon").eq(index).delay().animate({opacity:100, marginTop:"0px"}, 600);
        })
    })
</script>


<script type="text/javascript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
/*
if ('<?=$stx?>') {
    document.fsearch.sfl.value = '<?=$sfl?>';

    if ('<?=$sop?>' == 'and')
        document.fsearch.sop[0].checked = true;

    if ('<?=$sop?>' == 'or')
        document.fsearch.sop[1].checked = true;
} else {
    document.fsearch.sop[0].checked = true;
}
*/
</script>

<?php if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function fboardlist_submit(f) {
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }

    if(document.pressed == "선택복사") {
        select_copy("copy");
        return;
    }

    if(document.pressed == "선택이동") {
        select_copy("move");
        return;
    }

    if(document.pressed == "선택삭제") {
        if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
            return false;
    }

    return true;
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";

    var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<?php } ?>
<!-- } 게시판 목록 끝 -->
<script type="text/javascript" src="<?php echo $board_skin_url ?>/js/lightbox-2.6.min.js"></script>
 

|

답변 1개 / 댓글 5개

채택된 답변
+20 포인트

둥글고 각지게 만든 모양은 CSS에서

Copy
border-radius:10px;

border-top-right-radius:0;

border-bottom-left-radius:0;

이렇게 하시면 됩니다.

둥근 정도는 질문자님이 알아서 잘 조절하시면 되구요.

그리고 코드에 sir 게시판에서 제공하는 하이라이터도 적용 안되어있고 특정 부분만 짧게 올려주셨으면

답변이 더 쉽게 달리지 않았을까 싶네요^^

답변에 대한 댓글 5개

2018-03-28 (수) 02:59:03
헉 정말 감사하고 하이라이터 이런건 생각못했네요ㅠㅠ 제가 다시한번 수정해서 올리도록하겠습니다...
혹시 2번째 3번째 질문도 해결가능하신지 여쭈어봐도될까요?
익플, 크롬 기준으로 개발자도구(F12) 여셔서 화살표 모양 누르시고
해당하는 부분 클릭하시면 연도에 쓰인 폰트 등 스타일을 알 수 있습니다.

3번은 올려주신 스킨 코드에서 '월'을 나타내는 코드 뒤에 '월'이라는 단어를 추가해주면 되겠죠?

그리고.. 질문 제목이 바꼈네요.

(왕초보주의)(쉬움주의) 이런 단어를 질문게시판에서 쓰시면 더욱 더 답변 받기는
힘드실 것 같습니다.

쉽다면 질문자님이 충분한 검색을 통해서 쉽게 해결할 수 있었을텐데요.
2018-03-28 (수) 09:30:24
오해하시게끔 질문글 올려 죄송합니다. 이건 너무 기초적인건데 왜 이런질문을 하냐는 생각이 들까봐서 저런 표현을 쓴건데 주의하고 지우도록 하겠습니다. 실제로 님께서 알려주신.. 코드에 월이라는 단어를 쓰면되겠죠? 라는 것도 무슨뜻인지 어떻게하는건지 몰라서 당황할정도입니다ㅠ 일단 글 수정할게요.. 오해 없으셨으면 좋겠습니다
2018-03-28 (수) 09:30:47
아 답변이 있어 수정이 안되네요...
12 라는 숫자를 띄우는 코드가 있을 거 아닙니까.
그 뒤에 "월"이라는 문구를 넣어주라는 뜻 입니다.

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