current_connect.php 에서 특정게시판 링크 없애기 .. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

current_connect.php 에서 특정게시판 링크 없애기 .. 정보

current_connect.php 에서 특정게시판 링크 없애기 ..

본문

current_connect.php
를 보면 현재접소자가 어디를  보고 있는지 나오고
그 게시판 링크가 나오잖아요
거기서 특정게시판 링크는 안나오게 하려면 어떻게 해야 하나요? ㅜ.ㅜ
  • 복사

댓글 전체

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 값을 하나만 넣어세요.
게시판 이름은 나오고 링크가 안 나오게 하는 것은 basic 스킨에서는 이미 되어 있는데요.

if ($list[$i][lo_url] && $is_admin == "super")
        echo "<td colspan=2>&nbsp;<a href='{$list[$i][lo_url]}'>{$location}</a></td>";
    else
        echo "<td colspan=2>&nbsp;{$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 인데요 도데체  어느 부분을 말씀하시는 건지 ..
링크($href)와 url($location)을 혼동하고 계신가 보네요.

질문내용이 링크의 출력제어를 말씀하시는 건가요?
url의 출력제어를 말씀하시는 건가요?
아마도 특정 url의 출력제어(예 : 특정 게시판인 경우 출력을 시키지 않음) 방법이 궁금하신 듯 합니다만...

전자라면 이미 basic스킨에서 is_admin이라는 조건에 따라 제어가 되어 있고,
후자라면 'rolo'님이 기재하신 소스코드를 /bbs/current_connect.php에 추가해서 사용하시길...
게시판 이름은 나오고 링크가 안 나오게 하는 것은 basic 스킨에서는 이미 되어 것에서

if ($list[$i][lo_url] && $is_admin == "super")
        echo "<td colspan=2>&nbsp;<a href='{$list[$i][lo_url]}'>{$location}</a></td>";
    else
        echo "<td colspan=2>&nbsp;{$location}</td>";

이거를

if( strstr( $list[$i][lo_url], '특정게시판_id') && $is_admin != "super")
        echo "<td colspan=2>&nbsp;{$location}</td>";
    else
        echo "<td colspan=2>&nbsp;<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
요 애러요 줄이 잘못 되었다는데
© SIRSOFT
현재 페이지 제일 처음으로