current_connect.php 에서 특정게시판 링크 없애기 .. 정보
current_connect.php 에서 특정게시판 링크 없애기 ..본문
current_connect.php
를 보면 현재접소자가 어디를 보고 있는지 나오고
그 게시판 링크가 나오잖아요
거기서 특정게시판 링크는 안나오게 하려면 어떻게 해야 하나요? ㅜ.ㅜ
댓글 전체
-. 간략답변 : 조건절 추가
게시물의 하이퍼링크를 추출하는 구문에서,
where bo_table <> '제어할 게시판' and bo_table <> '제어 게시판 두번째';
게시물의 하이퍼링크를 추출하는 구문에서,
where bo_table <> '제어할 게시판' and bo_table <> '제어 게시판 두번째';
나스카님 조금만 더 쉽게 설명 안될까요? 그러니까 저걸 어떻게 해야 하는건지 ?
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if( ! $is_admin) if( strstr( $row['lo_url'], =====bo_table_id==== ) continue;
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
else
{
if ($is_admin)
$list[$i][name] = $row[lo_ip];
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);
}
=====bo_table_id==== 이거 대신 bo_table 값을 하나만 넣어세요.
{
if( ! $is_admin) if( strstr( $row['lo_url'], =====bo_table_id==== ) continue;
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
else
{
if ($is_admin)
$list[$i][name] = $row[lo_ip];
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);
}
=====bo_table_id==== 이거 대신 bo_table 값을 하나만 넣어세요.
게시판 이름은 나오고 링크가 안 나오게 하는 것은 basic 스킨에서는 이미 되어 있는데요.
if ($list[$i][lo_url] && $is_admin == "super")
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
else
echo "<td colspan=2> {$location}</td>";
if ($list[$i][lo_url] && $is_admin == "super")
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
else
echo "<td colspan=2> {$location}</td>";
<?
include_once("./_common.php");
$g4[title] = "현재접속자";
include_once("../head1.php");
$list = array();
$sql = " select a.mb_id, 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]'
order by a.lo_datetime desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
else
{
if ($is_admin)
$list[$i][name] = $row[lo_ip];
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);
}
$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&page=");
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
$connect_skin_path = "$g4[path]/skin/connect/$config[cf_connect_skin]";
include_once("$connect_skin_path/current_connect.skin.php");
include_once("../tail1.php");
?>
제 current_connect.php 인데요 도데체 어느 부분을 말씀하시는 건지 ..
include_once("./_common.php");
$g4[title] = "현재접속자";
include_once("../head1.php");
$list = array();
$sql = " select a.mb_id, 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]'
order by a.lo_datetime desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
else
{
if ($is_admin)
$list[$i][name] = $row[lo_ip];
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);
}
$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&page=");
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
$connect_skin_path = "$g4[path]/skin/connect/$config[cf_connect_skin]";
include_once("$connect_skin_path/current_connect.skin.php");
include_once("../tail1.php");
?>
제 current_connect.php 인데요 도데체 어느 부분을 말씀하시는 건지 ..
로로님 베이직 스킨인데 저는 왜 링크가 걸려 있는거죠 ....
관리자는 링크가 보입니다.
아 최신접속자 스킨은 목진철님 스킨을 쓰고 있어서 그런건가요 ..
링크($href)와 url($location)을 혼동하고 계신가 보네요.
질문내용이 링크의 출력제어를 말씀하시는 건가요?
url의 출력제어를 말씀하시는 건가요?
아마도 특정 url의 출력제어(예 : 특정 게시판인 경우 출력을 시키지 않음) 방법이 궁금하신 듯 합니다만...
전자라면 이미 basic스킨에서 is_admin이라는 조건에 따라 제어가 되어 있고,
후자라면 'rolo'님이 기재하신 소스코드를 /bbs/current_connect.php에 추가해서 사용하시길...
질문내용이 링크의 출력제어를 말씀하시는 건가요?
url의 출력제어를 말씀하시는 건가요?
아마도 특정 url의 출력제어(예 : 특정 게시판인 경우 출력을 시키지 않음) 방법이 궁금하신 듯 합니다만...
전자라면 이미 basic스킨에서 is_admin이라는 조건에 따라 제어가 되어 있고,
후자라면 'rolo'님이 기재하신 소스코드를 /bbs/current_connect.php에 추가해서 사용하시길...
url출력제어 를 말하는 거에요
게시판 이름은 나오고 링크가 안 나오게 하는 것은 basic 스킨에서는 이미 되어 것에서
if ($list[$i][lo_url] && $is_admin == "super")
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
else
echo "<td colspan=2> {$location}</td>";
이거를
if( strstr( $list[$i][lo_url], '특정게시판_id') && $is_admin != "super")
echo "<td colspan=2> {$location}</td>";
else
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
if ($list[$i][lo_url] && $is_admin == "super")
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
else
echo "<td colspan=2> {$location}</td>";
이거를
if( strstr( $list[$i][lo_url], '특정게시판_id') && $is_admin != "super")
echo "<td colspan=2> {$location}</td>";
else
echo "<td colspan=2> <a href='{$list[$i][lo_url]}'>{$location}</a></td>";
로로님 말씀대로
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if( ! $is_admin) if( strstr( $row['lo_url'], bo_table_cb_id ) continue;
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
이렇게 바꿨더니 애러가 나와요 ㅜ.ㅜ
Parse error: parse error, unexpected T_CONTINUE in /home/fhgjhh/public_html/gnuboard4/bbs/current_connect.php on line 17
요 애러요 줄이 잘못 되었다는데
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if( ! $is_admin) if( strstr( $row['lo_url'], bo_table_cb_id ) continue;
$list[$i] = $row;
if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
이렇게 바꿨더니 애러가 나와요 ㅜ.ㅜ
Parse error: parse error, unexpected T_CONTINUE in /home/fhgjhh/public_html/gnuboard4/bbs/current_connect.php on line 17
요 애러요 줄이 잘못 되었다는데