同心聲氣默猶通
알림: 본 블로그는 'Clear Type'이 적용된 '맑은 고딕'글꼴을 사용합니다. 링크를 클릭하여 글꼴을 설치하시고 CT을 적용하세요.
개인적 필요로 D-day 출력 코드를 만들어봤습니다. (사실 전에 만들어 놓구서, 오늘 이곳에 붙이는거죠 ^-^)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | function print_dday($dh=0,$dmin=0,$ds=0,$dm,$dd,$dy,$sg=false,$cl='red',$ds=true,$ad=true) { $dtime = floor((time()+32400)/86400); $dtemp = floor(mktime(0,0,0,$dm,$dd,$dy)/86400); $dday = $dtime - $dtemp - 1; if($dday > 0) { if($ad) $dday++; if($sg) $dday = "+".$dday; } else if($dday == 0) { if($ds) { $dday = D; } else { $dday = 0; } } if($dday%100 == 0 or (-5 < = $dday and $dday <= 0)) { $dday = "<font color='".$cl."'>".$dday.""; } echo $dday; } |
$dh=0,$dmin=0,$ds=0 - 순서대로 D-day의 시, 분, 초를 입력
$dm,$dd,$dy - D-day의 월, 일, 년
$sg=false - 지난 D-day 표시시 true면 +부호를 포함
$cl=’red’ - D-day강조 색상. rgb코드 사용가능
$ds=true - true일 경우 D-day를 ‘D’로 표현하고, false이면 ‘0′으로 표현
$ad=true - 지난 D-day에 대해 표시하는 방법. true일 경우 D-day를 1일로 계산하고, false이면 D-day 다음날을 1일로 계산 (관련글: D데이 계산의 심오함)
저 코드 그대로 플러그인에다 넣어서 쓰고 있습니다. 워낙 간단하고 허접스런 암것도 아닌 코드라 플러그인이라고 부르기도 뭣해서 걍 코드만 올립니다. 남들은 AJAX에 effect에 다들 멋진것만 하는데, 전 주로 저런 자잘한 것들만 손댑니다. 그럼 ^-^
too bad i dont understand much of what you’re saying. but i got this: 파라미터 - 쓸데 없이 많습니다 equals “lots of useless parameters” kekeke. ^_^
i hope you speak english? i suppose you’d have to. php is english…
Sayuri// do i know php code? (what is *gasp*?) me? no way…. that(d-day code)’s not even a code. i feel everybody that knows just *echo* function will easily make that shit.
well, my english? poor… poor… poor… (happily, not *suck* level.) however, if you say *korean-english a.k.a 콩글리쉬*? i’m sure i’m genius, kekeke.
ps. you said *korean blogger like myself* and that means you’re korean, right? but your name ’sayuri’ sounds like japanese… is that a just nickname? and also, why don’t you tell me ur blog url?
whenever you put a verb in between asteriks, it means that i’m doing that thing.. so *gasp* = i gasped… AOL lingo~
konglish!!
and yep, sayuri’s not my real name. i have a weird thing for keeping my identity secret… and i chose the name sayuri from memoirs of a geish ;D but since you’re korean… 내 이름은 오수연 입니다. haha my korean sucks..
my blog’s not open yet, that’s why!
Sayuri// thanx for comming again and AOL lingo.
i hoped you’re japanese when i saw your name, sayuri, cuz i feel more comfortable when i say in japanese than english, kkk.
ok… yep, i’ve just known your korean real name. (keeping ur identity? weired but ok cuz we’re in the web. and, also, in that point of view, i’m weird too.)
anyway, welcome to my world…