2026, 새로운 도약을 시작합니다.

연도 표시하기

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 팁자료실

번호 제목 글쓴이 날짜 조회
공지 3년 전 조회 4,599
2741 4일 전 조회 130
2740 5일 전 조회 113
2739 1주 전 조회 217
2738 1주 전 조회 221
2737 1주 전 조회 185
2736 2주 전 조회 285
2735 3주 전 조회 290
2734 3주 전 조회 265
2733 1개월 전 조회 267
2732 1개월 전 조회 303
2731 1개월 전 조회 270
2730 1개월 전 조회 229
2729 1개월 전 조회 362
2728 1개월 전 조회 248
2727 1개월 전 조회 422
2726 1개월 전 조회 260
2725 1개월 전 조회 332
2724 1개월 전 조회 364
2723 1개월 전 조회 267
2722 1개월 전 조회 301
2721 1개월 전 조회 214
2720 2개월 전 조회 304
2719 2개월 전 조회 314
2718 2개월 전 조회 203
2717 2개월 전 조회 337
2716 2개월 전 조회 204
2715 2개월 전 조회 315
2714 2개월 전 조회 273
2713 2개월 전 조회 378
2712 2개월 전 조회 292
🐛 버그신고