클럽 - 현재 접속자 정보
클럽 - 현재 접속자본문
알라뷰님의 스킨을 자르고 붙여서 급하게 만들었습니다. 감솨^^
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=38118
아래 함수를 /club/club.lib.php에 넣고 스킨은 별도로 만들어 넣으면 됩니다.
클럽의 위치는 lo_location에서 찾게 했습니다.
// 현재 접속자
//$lo_location = get_text($g4[title]);
//$lo_location = $g4[title];
// 게시판 제목에 ' 포함되면 오류 발생
$lo_location = addslashes($g4[title]);
if (!$lo_location)
$lo_location = $_SERVER[REQUEST_URI];
//$lo_url = $g4[url] . $_SERVER[REQUEST_URI];
$lo_url = $_SERVER[REQUEST_URI];
ajax로 하는 것은 해당 함수를 파일로 만들어서 올리는 수준에서 간단히 해결되기 때문에
그냥 쉽게 가기로 했습니다. ajax는 굳이 필요없는거 같아서 지금은 pass~! 합니다.
수정 파일은 /club/club_main.php, club.lib.php, skin/connect/*/* 입니다.
// 현재 접속자수
function cb_current_connect($cb_name, $skin_dir="")
{
global $config, $g4, $member, $is_admin, $nc;
if ($cb_name == "")
alert("cb_name이 전달되지 않았습니다.");
// 회원, 방문객 카운트
$sql = " select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt
from $g4[login_table]
where mb_id <> '$config[cf_admin]' and lo_location like '$cb_name - 클럽%' ";
$row2 = sql_fetch($sql);
$list = array();
//회원 이름 정보출력
$sql2 = " select a.mb_id, mb_sex, b.mb_level, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, a.lo_ip, a.lo_location, a.lo_url
from $g4[login_table] a left join $g4[member_table] b on (a.mb_id = b.mb_id)
where a.mb_id <> '$config[cf_admin]' and lo_location like '$cb_name - 클럽%' order by a.lo_datetime desc";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = "<b>"."$row[mb_nick]"."</b>"." "."$level_icon"." "."$sex_icon";
else
$list[$i][name] = "손님 "."(".preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[lo_ip]).")";
$list[$i][num] = sprintf("%03d",$i+1);
}
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
if ($skin_dir)
$connect_skin_path = "$nc[cb_path]/skin/connect/$skin_dir";
else
$connect_skin_path = "$nc[cb_path]/skin/connect/default";
// $connect_skin_path = "$nc[cb_path]/skin/connect/$config[cf_connect_skin]";
include ("$connect_skin_path/current_connect.skin.php");
}
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=38118
아래 함수를 /club/club.lib.php에 넣고 스킨은 별도로 만들어 넣으면 됩니다.
클럽의 위치는 lo_location에서 찾게 했습니다.
// 현재 접속자
//$lo_location = get_text($g4[title]);
//$lo_location = $g4[title];
// 게시판 제목에 ' 포함되면 오류 발생
$lo_location = addslashes($g4[title]);
if (!$lo_location)
$lo_location = $_SERVER[REQUEST_URI];
//$lo_url = $g4[url] . $_SERVER[REQUEST_URI];
$lo_url = $_SERVER[REQUEST_URI];
ajax로 하는 것은 해당 함수를 파일로 만들어서 올리는 수준에서 간단히 해결되기 때문에
그냥 쉽게 가기로 했습니다. ajax는 굳이 필요없는거 같아서 지금은 pass~! 합니다.
수정 파일은 /club/club_main.php, club.lib.php, skin/connect/*/* 입니다.
// 현재 접속자수
function cb_current_connect($cb_name, $skin_dir="")
{
global $config, $g4, $member, $is_admin, $nc;
if ($cb_name == "")
alert("cb_name이 전달되지 않았습니다.");
// 회원, 방문객 카운트
$sql = " select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt
from $g4[login_table]
where mb_id <> '$config[cf_admin]' and lo_location like '$cb_name - 클럽%' ";
$row2 = sql_fetch($sql);
$list = array();
//회원 이름 정보출력
$sql2 = " select a.mb_id, mb_sex, b.mb_level, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, a.lo_ip, a.lo_location, a.lo_url
from $g4[login_table] a left join $g4[member_table] b on (a.mb_id = b.mb_id)
where a.mb_id <> '$config[cf_admin]' and lo_location like '$cb_name - 클럽%' order by a.lo_datetime desc";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = "<b>"."$row[mb_nick]"."</b>"." "."$level_icon"." "."$sex_icon";
else
$list[$i][name] = "손님 "."(".preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[lo_ip]).")";
$list[$i][num] = sprintf("%03d",$i+1);
}
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
if ($skin_dir)
$connect_skin_path = "$nc[cb_path]/skin/connect/$skin_dir";
else
$connect_skin_path = "$nc[cb_path]/skin/connect/default";
// $connect_skin_path = "$nc[cb_path]/skin/connect/$config[cf_connect_skin]";
include ("$connect_skin_path/current_connect.skin.php");
}
추천
0
0
댓글 전체
열정이 대단하시네요~~ 화이팅입니다..
그누 4의 접속자 스킨을 쓸 수 있게 최종 수정후 release 할 예정 입니다.
현재접속자..에러나는데 왜일까요? 저만그런가요? 에궁 정말 어렵네요..ㅎㅎㅎ
Warning: cb_current_connect(./skin/connect//current_connect.skin.php): failed to open stream: No such file or directory in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
Warning: cb_current_connect(./skin/connect//current_connect.skin.php): failed to open stream: No such file or directory in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
Warning: cb_current_connect(): Failed opening './skin/connect//current_connect.skin.php' for inclusion (include_path='.:/usr/share/pear') in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
today 2 | total 16
Warning: cb_current_connect(./skin/connect//current_connect.skin.php): failed to open stream: No such file or directory in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
Warning: cb_current_connect(./skin/connect//current_connect.skin.php): failed to open stream: No such file or directory in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
Warning: cb_current_connect(): Failed opening './skin/connect//current_connect.skin.php' for inclusion (include_path='.:/usr/share/pear') in /home/duihrad/public_html/gnuboard4/club/club.lib.php on line 415
today 2 | total 16
아~ 이거는 db를 변경하면서 connect 디렉토리를 지정하게 되어 있어서 그래요.
제가 지금 설치파일을 새로 만들고 있는데... 그걸로 재설치를 하셔야 할 것 같아요.
워낙 많은 파일들이 바뀌어서요. ㅠ..ㅠ
제가 지금 설치파일을 새로 만들고 있는데... 그걸로 재설치를 하셔야 할 것 같아요.
워낙 많은 파일들이 바뀌어서요. ㅠ..ㅠ