연도 표시하기

· 2020-02-18 (화) 10:38:35 · 5126

2009578055_1581989797.6204.png

 

2009578055_1581990026.8432.png

 

2009578055_1581990034.9315.png

 

https://sir.kr/g5_tip/7999

 

위 팁에 내용을 조금 더 추가했습니다.

 

bbs/new.php
이 파일의 수정은 별 의미가 없다 생각하여 생략.

 


lib/common.lib.php
399-405 Line
[code]// 당일인 경우 시간으로 표시함
$list['datetime'] = substr($list['wr_datetime'],0,10);
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == G5_TIME_YMD)
    $list['datetime2'] = substr($list['datetime2'],11,5);
elseif (substr($list['datetime'],0,4) == substr(G5_TIME_YMD,0,4))
    $list['datetime2'] = substr($list['datetime2'],5,5);
else
    $list['datetime2'] = str_replace('.', '-', substr($list['datetime2'],0,10));[/code]

 


보드 'basic' 스킨을 수정합니다.
'gallery' 스킨도 동일하게 수정하면 됩니다.

 

theme/basic/skin/board/basic/list.skin.php
91-92 Line
[code]<!-- <?php if ($is_good) { ?><th scope="col"><?php echo subject_sort_link('wr_good', $qstr2, 1) ?>추천 </a></th><?php } ?> -->
<!-- <?php if ($is_nogood) { ?><th scope="col"><?php echo subject_sort_link('wr_nogood', $qstr2, 1) ?>비추천 </a></th><?php } ?> -->[/code]

 

149-150 Line
[code]<!-- <?php if ($is_good) { ?><td class="td_num"><?php echo $list[$i]['wr_good'] ?></td><?php } ?> -->
<!-- <?php if ($is_nogood) { ?><td class="td_num"><?php echo $list[$i]['wr_nogood'] ?></td><?php } ?> -->[/code]

숨김.

 

theme/basic/skin/board/basic/style.css
93 Line
[code]#bo_list .td_datetime {width:100px;text-align:center} /* M width */[/code]
연도까지 출력하면 폭이 좁기 때문에 늘리고, 추천 비추천도 숨긴 것입니다.
Sir처럼 '추천'만 출력하는 방법을 사용해도 되겠지요.

 

theme/basic/skin/board/basic/view.skin.php
34 Line
[code]<strong class="if_date"><span class="sound_only">작성일</span><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo date("Y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>[/code]'y'를 'Y'로 수정.

 

theme/basic/skin/board/basic/view_comment.skin.php
44 Line
[code]<span class="bo_vc_hdinfo"><i class="fa fa-clock-o" aria-hidden="true"></i> <time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['wr_datetime'] ?></time></span>[/code]'datetime'를 'wr_datetime'로 수정.

 

 

모바일은...
theme/basic/mobile/skin/board/basic/view.skin.php
theme/basic/mobile/skin/board/basic/view_comment.skin.php
두 파일만 동일한 부분 수정.

|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

2,788건
+
제목 글쓴이 날짜 조회
20-03-11 조회 6,547
20-03-09 조회 6,958
20-03-09 조회 5,060
20-03-05 조회 4,764
20-03-05 조회 5,580
20-03-03 조회 8,942
20-03-02 조회 5,726
20-03-02 조회 6,759
20-03-01 조회 2.8만
20-02-28 조회 5,307
20-02-26 조회 5,645
20-02-26 조회 5,390
20-02-24 조회 6,217
20-02-23 조회 4,963
20-02-20 조회 6,103
20-02-18 조회 6,293
20-02-18 조회 5,127
20-02-12 조회 5,888
20-02-11 조회 8,717
20-02-10 조회 6,881
20-02-09 조회 5,367
20-02-09 조회 8,375
20-02-08 조회 4,864
20-02-08 조회 6,590
20-02-08 조회 7,009
20-02-07 조회 6,969
20-02-06 조회 5,898
20-02-05 조회 5,256
20-02-04 조회 6,110
20-02-03 조회 1.8만