게시글의 이미지/무비 아이콘 변경 및 위치도 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2720 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-10-10 06:48:28 +00:00
parent c922dc5b20
commit c36aa645d6
3 changed files with 14 additions and 13 deletions

View file

@ -363,21 +363,11 @@
* @brief 새글, 최신 업데이트글, 비밀글, 이미지/동영상/첨부파일등의 아이콘 출력용 함수
* $time_interval 지정된 시간() 새글/최신 업데이트글의 판별
**/
function getExtraImages($time_interval = 7200) {
function getExtraImages($time_interval = 43200) {
// 아이콘 목록을 담을 변수 미리 설정
$buffs = array();
// 최신 시간 설정
$time_check = date("YmdHis", time()-$time_interval);
// 새글 체크
if($this->get('regdate')>$time_check) $buffs[] = "new";
else if($this->get('last_update')>$time_check) $buffs[] = "update";
// 비밀글 체크
if($this->isSecret()) $buffs[] = "secret";
$check_files = false;
// 사진 이미지 체크
@ -395,13 +385,24 @@
// 첨부파일 체크
if(!$check_files && $this->hasUploadedFiles()) $buffs[] = "file";
// 비밀글 체크
if($this->isSecret()) $buffs[] = "secret";
// 최신 시간 설정
$time_check = date("YmdHis", time()-$time_interval);
// 새글 체크
if($this->get('regdate')>$time_check) $buffs[] = "new";
else if($this->get('last_update')>$time_check) $buffs[] = "update";
return $buffs;
}
/**
* @brief getExtraImages로 구한 값을 이미지 태그를 씌워서 리턴
**/
function printExtraImages($time_check = 7200) {
function printExtraImages($time_check = 43200) {
// 아이콘 디렉토리 구함
$path = sprintf('%s%s',getUrl(), 'modules/document/tpl/icons/');
@ -410,7 +411,7 @@
$buff = null;
foreach($buffs as $key => $val) {
$buff .= sprintf('<img src="%s%s.gif" alt="%s" title="%s" width="13" height="13" align="absmiddle"/>', $path, $val, $val, $val);
$buff .= sprintf('<img src="%s%s.gif" alt="%s" title="%s" align="absmiddle"/>', $path, $val, $val, $val);
}
return $buff;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 211 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 343 B

Before After
Before After