Homepage

그누보드 기반 셋팅방법

Naan 2011. 6. 23. 16:18
반응형

그누보드 기반

index.php 에 게시판 최근게시물 안보이게 하는 방법

변경전
<?
$sql = "select * from $g4[board_table] order by bo_order_search";
$qry = sql_query($sql);
for ($i=0; $row=sql_fetch_array($qry); $i++) {
?>

변경후
<?
$sql = "select * from $g4[board_table] where bo_table != '게시판이름' and bo_table != '게시판이름' order by bo_order_search";
$qry = sql_query($sql);
for ($i=0; $row=sql_fetch_array($qry); $i++) {

head.php 에 게시판 안보이게
변경전
<?
$sql2 = "select * from $g4[board_table] where gr_id = '$row[gr_id]' order by bo_order_search asc";
$qry2 = sql_query($sql2);
for ($j=0; $row2=sql_fetch_array($qry2); $j++) {
if ($row2[bo_table] == $bo_table) $class = "sm_sub selected"; else $class = "sm_sub";
?>

변경후
<?
$sql2 = "select * from $g4[board_table] where gr_id = '$row[gr_id]' and bo_table != '게시판이름' and bo_table != '게시판이름' order by bo_order_search asc";
$qry2 = sql_query($sql2);
for ($j=0; $row2=sql_fetch_array($qry2); $j++) {
if ($row2[bo_table] == $bo_table) $class = "sm_sub selected"; else $class = "sm_sub";
?>

로그인 로그아웃 관련 설정
skin/outlogin
outlogin.skin.1.php / outlogin.skin.2.php

게시판 관리자 여러명 설정
extend 폴더에
임의의 admin.php 생성후 아래 코드 입력후 저장
<?
if ($bo_table == '게시판이름')
{
    if ($member[mb_id] == '사용할아이디') $is_admin = 'board';

    if ($is_admin == 'board') $board[bo_admin] = $member[mb_id];
}
?>

admin 암호를 잃어버렸을경우
임의의 pass.php 생성후 아래 코드 입력후 저장후 실행
<?
include_once "_common.php";

$sql="update g4_member set mb_password = password('변경할암호') where mb_id = 'admin'";
sql_query($sql);

?>


mysql 정보가 들어있는 파일
dbconfig.php






반응형