회원가입시 회원아이디로 게시판 생성하기 정보
회원가입시 회원아이디로 게시판 생성하기본문
"member" 라는 그룹이 생성되어 있어야 합니다.
skin/member/basic/register_update.skin.php [소스추가]
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
$sql_common = " gr_id = 'member',
bo_subject = '$mb_id',
bo_admin = '',
bo_list_level = '2',
bo_read_level = '2',
bo_write_level = '2',
bo_reply_level = '2',
bo_comment_level = '2',
bo_html_level = '1',
bo_link_level = '1',
bo_trackback_level = '1',
bo_count_modify = '1',
bo_count_delete = '1',
bo_upload_level = '1',
bo_download_level = '1',
bo_read_point = '',
bo_write_point = '',
bo_comment_point = '',
bo_download_point = '',
bo_use_category = '',
bo_category_list = '',
bo_disable_tags = '1',
bo_use_sideview = '0',
bo_use_file_content = '',
bo_use_secret = '',
bo_use_dhtml_editor = '',
bo_use_rss_view = '',
bo_use_comment = '',
bo_use_good = '',
bo_use_nogood = '',
bo_use_name = '',
bo_use_signature = '',
bo_use_ip_view = '',
bo_use_trackback = '',
bo_use_list_view = '',
bo_use_list_content = '',
bo_use_email = '1',
bo_table_width = '97',
bo_subject_len = '50',
bo_page_rows = '10',
bo_new = '14',
bo_hot = '14',
bo_image_width = '300',
bo_skin = 'basic',
bo_include_head = '../member_head.php',
bo_include_tail = '../member_head.php',
bo_content_head = '',
bo_content_tail = '',
bo_insert_content = '',
bo_gallery_cols = '3',
bo_upload_count = '0',
bo_upload_size = '1048576',
bo_reply_order = '1',
bo_use_search = '1',
bo_order_search = '0',
bo_write_min = '0',
bo_write_max = '0',
bo_comment_min = '0',
bo_comment_max = '0',
bo_sort_field = '',
bo_1_subj = '',
bo_2_subj = '',
bo_3_subj = '',
bo_4_subj = '',
bo_5_subj = '',
bo_6_subj = '',
bo_7_subj = '',
bo_8_subj = '',
bo_9_subj = '',
bo_10_subj = '',
bo_1 = '',
bo_2 = '',
bo_3 = '',
bo_4 = '',
bo_5 = '',
bo_6 = '',
bo_7 = '',
bo_8 = '',
bo_9 = '',
bo_10 = ''";
if ($bo_image_head_del) {
@unlink("$board_path/$bo_image_head_del");
$sql_common .= " , bo_image_head = '' ";
}
if ($bo_image_tail_del) {
@unlink("$board_path/$bo_image_tail_del");
$sql_common .= " , bo_image_tail = '' ";
}
if ($_FILES[bo_image_head][name]) {
//$bo_image_head_urlencode = urlencode($_FILES[bo_image_head][name]);
$bo_image_head_urlencode = $bo_table."_head_".time();
$sql_common .= " , bo_image_head = '$bo_image_head_urlencode' ";
}
if ($_FILES[bo_image_tail][name]) {
//$bo_image_tail_urlencode = urlencode($_FILES[bo_image_tail][name]);
$bo_image_tail_urlencode = $bo_table."_tail_".time();
$sql_common .= " , bo_image_tail = '$bo_image_tail_urlencode' ";
}
if ($w == "") {
$row = sql_fetch(" select count(*) as cnt from $g4[board_table] where bo_table = '$bo_table' ");
if ($row[cnt])
alert("{$bo_table} 은(는) 이미 존재하는 TABLE 입니다.");
$sql = " insert into $g4[board_table]
set bo_table = '$mb_id',
bo_count_write = '0',
bo_count_comment = '0',
$sql_common ";
sql_query($sql);
// 게시판 테이블 생성
$file = file("./sql_write.sql");
$sql = implode($file, "\n");
$create_table = $g4[write_prefix] . $mb_id;
// sql_board.sql 파일의 테이블명을 변환
$source = array("/__TABLE_NAME__/", "/;/");
$target = array($create_table, "");
$sql = preg_replace($source, $target, $sql);
sql_query($sql, FALSE);
}
?>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
$sql_common = " gr_id = 'member',
bo_subject = '$mb_id',
bo_admin = '',
bo_list_level = '2',
bo_read_level = '2',
bo_write_level = '2',
bo_reply_level = '2',
bo_comment_level = '2',
bo_html_level = '1',
bo_link_level = '1',
bo_trackback_level = '1',
bo_count_modify = '1',
bo_count_delete = '1',
bo_upload_level = '1',
bo_download_level = '1',
bo_read_point = '',
bo_write_point = '',
bo_comment_point = '',
bo_download_point = '',
bo_use_category = '',
bo_category_list = '',
bo_disable_tags = '1',
bo_use_sideview = '0',
bo_use_file_content = '',
bo_use_secret = '',
bo_use_dhtml_editor = '',
bo_use_rss_view = '',
bo_use_comment = '',
bo_use_good = '',
bo_use_nogood = '',
bo_use_name = '',
bo_use_signature = '',
bo_use_ip_view = '',
bo_use_trackback = '',
bo_use_list_view = '',
bo_use_list_content = '',
bo_use_email = '1',
bo_table_width = '97',
bo_subject_len = '50',
bo_page_rows = '10',
bo_new = '14',
bo_hot = '14',
bo_image_width = '300',
bo_skin = 'basic',
bo_include_head = '../member_head.php',
bo_include_tail = '../member_head.php',
bo_content_head = '',
bo_content_tail = '',
bo_insert_content = '',
bo_gallery_cols = '3',
bo_upload_count = '0',
bo_upload_size = '1048576',
bo_reply_order = '1',
bo_use_search = '1',
bo_order_search = '0',
bo_write_min = '0',
bo_write_max = '0',
bo_comment_min = '0',
bo_comment_max = '0',
bo_sort_field = '',
bo_1_subj = '',
bo_2_subj = '',
bo_3_subj = '',
bo_4_subj = '',
bo_5_subj = '',
bo_6_subj = '',
bo_7_subj = '',
bo_8_subj = '',
bo_9_subj = '',
bo_10_subj = '',
bo_1 = '',
bo_2 = '',
bo_3 = '',
bo_4 = '',
bo_5 = '',
bo_6 = '',
bo_7 = '',
bo_8 = '',
bo_9 = '',
bo_10 = ''";
if ($bo_image_head_del) {
@unlink("$board_path/$bo_image_head_del");
$sql_common .= " , bo_image_head = '' ";
}
if ($bo_image_tail_del) {
@unlink("$board_path/$bo_image_tail_del");
$sql_common .= " , bo_image_tail = '' ";
}
if ($_FILES[bo_image_head][name]) {
//$bo_image_head_urlencode = urlencode($_FILES[bo_image_head][name]);
$bo_image_head_urlencode = $bo_table."_head_".time();
$sql_common .= " , bo_image_head = '$bo_image_head_urlencode' ";
}
if ($_FILES[bo_image_tail][name]) {
//$bo_image_tail_urlencode = urlencode($_FILES[bo_image_tail][name]);
$bo_image_tail_urlencode = $bo_table."_tail_".time();
$sql_common .= " , bo_image_tail = '$bo_image_tail_urlencode' ";
}
if ($w == "") {
$row = sql_fetch(" select count(*) as cnt from $g4[board_table] where bo_table = '$bo_table' ");
if ($row[cnt])
alert("{$bo_table} 은(는) 이미 존재하는 TABLE 입니다.");
$sql = " insert into $g4[board_table]
set bo_table = '$mb_id',
bo_count_write = '0',
bo_count_comment = '0',
$sql_common ";
sql_query($sql);
// 게시판 테이블 생성
$file = file("./sql_write.sql");
$sql = implode($file, "\n");
$create_table = $g4[write_prefix] . $mb_id;
// sql_board.sql 파일의 테이블명을 변환
$source = array("/__TABLE_NAME__/", "/;/");
$target = array($create_table, "");
$sql = preg_replace($source, $target, $sql);
sql_query($sql, FALSE);
}
?>
추천
10
10
댓글 13개
추천을 누른 당신은 진정한 챔피온 ^.^
그럼 난 챔피온..ㅋㅋ
추천...
만약 탈퇴한다면 자동으로 게시판 없애는 기능도 있으면 좋을거 같다는....
만약 탈퇴한다면 자동으로 게시판 없애는 기능도 있으면 좋을거 같다는....
특정 레벨을 체크하는 방법으로 반드시 필요한 경우에만 생성하고 회원 가입시 무조건 생성하는
방식은 불필요한 테이블이 늘어나는 등 관리적인 면에서는 비효율적 이라 보여지는데요.
방식은 불필요한 테이블이 늘어나는 등 관리적인 면에서는 비효율적 이라 보여지는데요.
라때스토리처럼 만들어볼려고 ^^;
미니홈피때문에 생성했어요
미니홈피때문에 생성했어요
와! 좋은 기능이군요
게시판은 생성되는데 .. 게시판 클릭하면
아래 메시지 창이뜹니다..
select * from g4_write_psm7676 where wr_is_comment = 0 order by wr_num, wr_reply limit 0, 10
1146 : Table 'sk1004.g4_write_psm7676' doesn't exist
error file : /gnuboard4/bbs/board.php
아래 메시지 창이뜹니다..
select * from g4_write_psm7676 where wr_is_comment = 0 order by wr_num, wr_reply limit 0, 10
1146 : Table 'sk1004.g4_write_psm7676' doesn't exist
error file : /gnuboard4/bbs/board.php
회원가입시 회원아이디로 게시판 생성하기
대단하세요 +_+ 굿
aa
회원가입시 회원아이디로 게시판 생성하기
감사합니다
회원가입시 회원아이디로 게시판 생성하기
추천~
추천~