회원가입시 회원아이디로 게시판 생성하기
"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);
}
?>
댓글 13개
NTYPE
17년 전
추천을 누른 당신은 진정한 챔피온 ^.^
a233454
17년 전
그럼 난 챔피온..ㅋㅋ
17년 전
추천...
만약 탈퇴한다면 자동으로 게시판 없애는 기능도 있으면 좋을거 같다는....
만약 탈퇴한다면 자동으로 게시판 없애는 기능도 있으면 좋을거 같다는....
17년 전
특정 레벨을 체크하는 방법으로 반드시 필요한 경우에만 생성하고 회원 가입시 무조건 생성하는
방식은 불필요한 테이블이 늘어나는 등 관리적인 면에서는 비효율적 이라 보여지는데요.
방식은 불필요한 테이블이 늘어나는 등 관리적인 면에서는 비효율적 이라 보여지는데요.
NTYPE
17년 전
라때스토리처럼 만들어볼려고 ^^;
미니홈피때문에 생성했어요
미니홈피때문에 생성했어요
하나Yun
16년 전
와! 좋은 기능이군요
15년 전
게시판은 생성되는데 .. 게시판 클릭하면
아래 메시지 창이뜹니다..
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
15년 전
회원가입시 회원아이디로 게시판 생성하기
14년 전
대단하세요 +_+ 굿
14년 전
aa
14년 전
회원가입시 회원아이디로 게시판 생성하기
14년 전
감사합니다
13년 전
회원가입시 회원아이디로 게시판 생성하기
추천~
추천~
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3309 | 3년 전 | 1798 | ||
| 3308 | 11년 전 | 2087 | ||
| 3307 |
uPAmJ903
|
6년 전 | 4742 | |
| 3306 |
바른사나이
|
6년 전 | 3269 | |
| 3305 | 6년 전 | 12297 | ||
| 3304 | 7년 전 | 3699 | ||
| 3303 | 7년 전 | 3737 | ||
| 3302 |
지리산초보
|
7년 전 | 13589 | |
| 3301 |
sozet
|
8년 전 | 4897 | |
| 3300 |
sozet
|
8년 전 | 5963 | |
| 3299 |
sozet
|
8년 전 | 10856 | |
| 3298 | 8년 전 | 4008 | ||
| 3297 |
또치하우스
|
8년 전 | 4434 | |
| 3296 | 8년 전 | 11961 | ||
| 3295 |
또치하우스
|
8년 전 | 14978 | |
| 3294 | 8년 전 | 6016 | ||
| 3293 | 8년 전 | 5583 | ||
| 3292 |
|
9년 전 | 5309 | |
| 3291 | 9년 전 | 13673 | ||
| 3290 | 9년 전 | 5043 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기