diff --git a/bbs/register_form.php b/bbs/register_form.php index 5e996d4c3..150396459 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -1,7 +1,7 @@ lib) include_once($captcha->lib); // 불법접근을 막도록 토큰생성 $token = md5(uniqid(rand(), true)); @@ -102,7 +102,6 @@ if ($w == "") { // 회원아이콘 경로 $mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif'; $member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin']; -$g4['js_file'][] = "{$g4['path']}/plugin/captcha/captcha.js"; include_once('./_head.php'); diff --git a/config.php b/config.php index cad60347a..780bdbdea 100644 --- a/config.php +++ b/config.php @@ -13,6 +13,10 @@ $g4['bbs_path'] = $g4['path'] . '/' . $g4['bbs']; $g4['bbs_img'] = 'img'; $g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img']; +$g4['data_dir'] = 'data'; +$g4['cache_dir'] = 'cache'; +$g4['captcha_dir'] = 'captcha'; + $g4['admin'] = 'adm'; $g4['admin_path'] = $g4['path'] . '/' . $g4['admin']; diff --git a/extend/captcha.extend.php b/extend/captcha.extend.php index c70a26aef..c09359805 100644 --- a/extend/captcha.extend.php +++ b/extend/captcha.extend.php @@ -2,12 +2,17 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (defined('_CAPTCHA_')) { - $captcha = (object)array( - 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", - 'js' => $g4['path']."/plugin/captcha/captcha.js" + $captcha = (object)Array( + 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", + 'js' => $g4['path']."/plugin/captcha/captcha.js", + 'fonts' => $g4['path']."/plugin/captcha/fonts" ); include_once($captcha->lib); + $g4['js_file'][] = $captcha->js; + + $captcha_obj = new captcha(); + $captcha_obj->run(); } else { unset($_SESSION['ss_captcha_use']); } diff --git a/head.sub.php b/head.sub.php index fc3584c1e..997f9c794 100644 --- a/head.sub.php +++ b/head.sub.php @@ -79,9 +79,6 @@ if (defined('_EDITOR_')) { $g4['js_file'][] = $editor->js; $g4['js_file'][] = $editor->config_js; } -if (defined('_CAPTCHA_')) { - $g4['js_file'][] = $captcha->js; -} ?>