화일 첨부
# 업그레이드 내용 #
==========================================================
1.12월로 고정되어있던 버그 수정..(2.33)
2.쪽지보내기 버그 수정 Thank by 0369 (2.32)
3.생일날짜 오름차순으로 정렬 Thank by 박천호 (2.31)
4.이름을 클릭하면 쪽지보내기 Thank By Juny. (2.3)
5.생일자목록이 없을경우 스킨에서 [no_start],[no_end] 안에 묶인
글자들은 없어지도록 정규식 사용 (2.2)
6.속도 증가 (2.0)
7.생일자가 없을경우의 처리 (2.0)
==========================================================
# 버젼업하면서의 변경된 사용법 #
==========================================================
1.이름을 클릭하면 쪽지보내기 Thank By Juny. (2.3)
2.생일자목록이 없을경우 스킨에서 [no_start],[no_end] 안에 있는
모든 문자열은 삭제 처리됩니다.
3.$no_birth 를 수정하시면 생일자 목록이 없을때 멘트를 지정할 수
있습니다. (2.0)
4.스킨에서 [no_birth] -> 생일자목록이 없을경우의 멘트출력 (2.0)
==========================================================
# 하고싶은말 #
==========================================================
보다 많은 분들이 사용할 수 있게 홍보 많이 해주시구요^^
쪽지보내기 버그 신고해주신 0369님 감사합니다
Thank by 0369
Thank by 박천호
Thank by Juny.
==========================================================
# 소스 #
==========================================================
/*******************************************************
* 해당 월 생일자 보여주기를 위한 함수 지정
*
*========================================
* Produced By Waiting(기다림)
* mail : waiting@waitU.net
* home : http://www.waitU.net
*
* Edited By Waiting(기다림)
* lastupdate : 2003-01-02
* Version 2.32
*========================================
*
******************************************************/
// 월 생일자 출력
function print_birth($skinname, $title,$group_no = 1, $level = "10") {
global $_zb_path, $_zb_url, $connect, $t_board, $admin_table;
if(!$skinname||!$title) return;
$str = zReadFile($_zb_path."birth_skin/".$skinname."/main.htm");
if(!$str) {
echo "지정하신 $skinname 이라는 생일자목록 스킨이 존재하지 않습니다<br>";
return;
}
$to_month=date("m");
$to_day=date("d");
$_zbCheckNum=0;
$birth_query="select user_id,name,from_unixtime(birth,'%m'),from_unixtime(birth,'%d'),no FROM zetyx_member_table WHERE group_no='$group_no' and level <= '$level' and from_unixtime(birth,'%m')='$to_month' order by from_unixtime(birth,'%d')";
$result = mysql_query($birth_query, $connect) or die(mysql_error());
$tmpStr = explode("[loop]",$str);
$header = $tmpStr[0];
$tmpStr2 = explode("[/loop]",$tmpStr[1]);
$loop = $tmpStr2[0];
$footer = $tmpStr2[1];
if(!$data_row=mysql_num_rows($result))
{
$main = $loop;
$today_img=$_zb_url."birth_skin/".$skinname."/images/today_on.gif";
$main = str_replace("[name]",'',$main);
$main = str_replace("[birth]",'',$main);
$main = str_replace("[user_id]",'',$main);
$main = str_replace("[today_img]",$today_img,$main);
$no_birth=$to_month."월 생일자가 없습니다"; //생일자가 없을경우 멘트
$main = str_replace("[no_birth]",$no_birth,$main);
$main_data .= "\n".$main;
$list = $header.$main_data.$footer;
$list = str_replace("[to_month]",$to_month,$list);
$list = str_replace("[title]",$title,$list);
$list = preg_replace("@(\[no_start\]).*?(\[no_end\])@is","",$list);
$list = str_replace("[no_start]",'',$list);
$list = str_replace("[no_end]",'',$list);
$list = str_replace("[dir]",$_zb_url."birth_skin/".$skinname."/images/",$list);
}
while($data=mysql_fetch_array($result))
{
$_zbCheckNum++;
$user_month=$data[2];
$user_day=$data[3];
if($to_day==$user_day)
$today_img=$_zb_url."birth_skin/".$skinname."/images/today_on.gif";
else
$today_img=$_zb_url."birth_skin/".$skinname."/images/today_off.gif";
$name = stripslashes($data[name]);
$birth = stripslashes($user_day);
$user_id = stripslashes($data[user_id]);
$main = $loop;
$main = str_replace("[birth]",$birth,$main);
$main = str_replace("[user_id]",$user_id,$main);
$main = str_replace("[today_img]",$today_img,$main);
$main = str_replace("[no_birth]",'',$main);
$main = str_replace("[name]","<a onfocus=this.blur(); href=javascript:void(window.open('bbs/view_info.php?member_no=$data[no]','view_info','width=400,height=510,toolbar=no,scrollbars=yes'))>$name</a>",$main);
$main_data .= "\n".$main;
$list = $header.$main_data.$footer;
$list = str_replace("[to_month]",$to_month,$list);
$list = str_replace("[no_start]",'',$list);
$list = str_replace("[no_end]",'',$list);
$list = str_replace("[title]",$title,$list);
$list = str_replace("[dir]",$_zb_url."birth_skin/".$skinname."/images/",$list);
}
echo $list;
}
/***********여기까지입니다*******************/
==========================================================
# 설치법 #
==========================================================
outlogin.php 파일 맨 아랫부분에 ?> 바로 윗 라인에 추가해주세요
이미 있으신분은 기존의 부분을 삭제하신후 위 소스를 추가해주시면
됩니다
==========================================================
# 사용법 #
==========================================================
<?
$_zb_url = "홈페이지주소";
$_zb_path = "절대경로";
include $_zb_path."outlogin.php";
?>
을 마찬가지로 적어줍니다.
그리고
<? print_birth("스킨이름","타이틀명",그룹번호, 제한레벨) ?>
스킨이름을 말 그대로 스킨명 입니다.
타이틀명은 <TITLE> 도 되며
스킨의 맨 위오는 말이 되기도 합니다
그룹번호는 생일자를 뽑아올 그룹을 말하며
제한레벨은 몇 레벨 이상 되는 사람만 뽑아오는것이죠
<? print_birth("waiting","이번달 생일자 명단",2,10) ?>
이렇게 해주면
'waiting'이라는 스킨에
'이번달 생일자 명단' 이라는 타이틀로
'2'번 그룹에서 레벨이 '10'이상인 사람들의
생일리스트를 가져오는 겁니다
여기서 생략가능한 부분은
그룹번호와 제한레벨이 생략가능합니다
생략시
그룹은 '1'번 그룹
제한레벨은 '10'레벨 이 됩니다.
예>
<? print_birth("waiting","이번달 생일자 명단") ?>
그리고 생일자가 없을경우 멘트 수정은 소스의
$no_birth=$to_month."월 생일자가 없습니다";
부분을 아래의 형식대로 수정하시면 됩니다
$no_birth="멘트";
==========================================================
# 설치법 #
==========================================================
제로보드가 설치된 디렉토리 에서
birth_skin 이란 폴더를 만들고
여기다가 스킨을 설치하시면 됩니다
간단하죠~?
외부로그인이나, 최근게시물이랑 똑같습니다^^
단지 birth_skin 폴더를 하나 만들어주는것 빼구요~^^
예>
# bbs란 폴더에 제로보드를 설치했다고 가정했을경우
/bbs/admin
/birth_skin/ <-요고
/data
/icon
..
..
이렇게 되겠죠?
==========================================================
# 스킨제작법 #
==========================================================
간단합니다..
스킨파일 -> main.htm
이미지폴더 -> images
오늘생일자 -> images/today_on.gif
오늘생일아닌자 -> images/today_off.gif
[title] -> 함수호줄할때 입력된 title 값
[user_id] -> 유저ID
[birth] -> 생일날짜
[today_img] -> 오늘생일자일경우, 아닐경우 이미지 표시
[dir] -> 스킨이미지경로
[to_month] -> 이번달
/****추가된 부분******/
[name] -> 유저이름,클릭시 쪽집보내기 (2.3)
[no_birth] ->생일자가 없을경우 멘트출력 (2.0)
[no_start] ->생일자가 없을경우 삭제할 부분의 시작 (2.2)
[no_end] ->생일자가 없을경우 삭제할 부분의 끝 (2.2)
/*********************/
==========================================================
출처 : http://daromy.byus.net/zboard/view.php?id=study&page=3&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=251
'컴퓨터·IT 정복' 카테고리의 다른 글
어린왕자체 (0) | 2008.01.14 |
---|---|
편지체 (0) | 2008.01.14 |
heartache TC 폰트체 (0) | 2008.01.14 |
오른쪽 마우스 사용금지 소스 (0) | 2008.01.14 |
색상표 (0) | 2008.01.14 |