Changeset 1373


Ignore:
Timestamp:
2009년 01월 19일 23시 56분 00초 (3 years ago)
Author:
yupmin
Message:

#225 Captcha 분리완료

Location:
trunk/metabbs
Files:
10 added
3 deleted
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/metabbs/app/controllers/account/signup.php

    r1367 r1373  
    1010} 
    1111 
    12 $captcha = $config->get('captcha_name', false) != "none" && $guest  
    13         ? new Captcha($config->get('captcha_name', false), $captcha_arg) : null; 
    14  
    1512if (is_post()) { 
    1613        $info = $_POST['user']; 
    17         apply_filters('BeforeAccountSignup', $info); 
     14        apply_filters('ValidateAccountSignup', $_POST, $error_messages); 
    1815 
    1916        if (strlen($info['password']) < 5) 
     
    2825        if (!empty($info['url']) && strlen($info['url']) > 255) 
    2926                $error_messages->add('Please enter a homepage address shorter than 255 characters', 'url'); 
    30  
    31         if (!(isset($captcha) && $captcha->ready() && $captcha->is_valid($_POST)  
    32                 || isset($captcha) && !$captcha->ready()  
    33                 || !isset($captcha))) 
    34                 $error_messages->add($captcha->error, 'captcha'); 
    3527 
    3628        $account = new User($info); 
  • trunk/metabbs/app/controllers/admin/settings.php

    r1364 r1373  
    1313        Timezone::set($settings['timezone']); 
    1414        $config->set('force_fancy_url', $settings['force_fancy_url']); 
    15         $config->set('captcha_name', $settings['captcha_name']); 
    16         switch($settings['captcha_name']) { 
    17                 case "phpcaptcha": 
    18                         $config->set('flite_path', $settings['flite_path']); 
    19                         break; 
    20                 case "recaptcha": 
    21                         $config->set('captcha_privatekey', $settings['captcha_privatekey']); 
    22                         $config->set('captcha_publickey', $settings['captcha_publickey']); 
    23                         break; 
    24                 default: 
    25                         break; 
    26         } 
    2715        $config->write_to_file(); 
    28         $flash = i('Setting saved.'); 
    29         $flash_class = 'pass'; 
     16        Flash::set('Setting saved'); 
     17        redirect_to(url_for('admin', 'settings'));       
     18//      $flash = i('Setting saved.'); 
     19//      $flash_class = 'pass'; 
    3020} 
    3121 
     
    3424$current_theme = get_current_theme(); 
    3525$themes = get_themes(); 
    36 //$captcha = new Captcha($config->get('captcha_name', false), null); 
    3726?> 
  • trunk/metabbs/app/controllers/board/edit.php

    r1351 r1373  
    3030                $_board = new Board($_POST['board']); 
    3131                if (empty($_board->name)) { 
    32                         $flash = 'Board name is empty.'; 
     32                        $error_messages->add("Board name is empty"); 
    3333                } else if ($_board->name != $board->name && !$_board->validate()) { 
    34                         $flash = "Board '$_board->name' already exists."; 
     34                        $error_messages->add("Board '$_board->name' already exists"); 
    3535                } 
    3636                $board->set_attribute('use_tag', $_POST['board']['use_tag']); 
    37                 $board->set_attribute('use_captcha', $_POST['board']['use_captcha']); 
    3837                $sorting_changed = $_board->order_by != $board->order_by; 
    39                 if (isset($flash)) { 
     38                if ($error_messages->exists()) { 
    4039                        $view = ADMIN_VIEW; 
    4140                        return; 
  • trunk/metabbs/app/controllers/board/post.php

    r1277 r1373  
    11<?php 
    22permission_required('write', $board); 
    3  
    4 $captcha = $config->get('captcha_name', false) != "none" && $board->use_captcha() && $guest  
    5         ? new Captcha($config->get('captcha_name', false), $captcha_arg) : null; 
    63 
    74if (is_post()) { 
     
    118                unset($_POST['post']['notice']); 
    129        } 
    13          
     10 
    1411        if (!isset($_POST['post'])) { 
    1512                $_POST['post'] = array( 
     
    4037        } 
    4138 
    42         if (isset($captcha) && $captcha->ready() && $captcha->is_valid($_POST)  
    43                 || isset($captcha) && !$captcha->ready()  
    44                 || !isset($captcha)) { 
     39        apply_filters('ValidatePostCreate', $_POST, $error_messages); 
     40 
     41        if (empty($post->name)) 
     42                $error_messages->add('Please enter the name', 'author'); 
     43 
     44        if (empty($post->title)) 
     45                $error_messages->add('Please enter the title', 'title'); 
     46 
     47        if (empty($post->body)) 
     48                $error_messages->add('Please enter the body', 'body'); 
     49 
     50        if ($account->is_guest() && strlen($post->password) < 5) 
     51                $error_messages->add('Password length must be longer than 5', 'password'); 
     52 
     53        if(!$error_messages->exists()) { 
    4554                if ($_POST['action'] == 'preview') { 
    4655                        if (version_compare(phpversion(), '5.0.0', '<')) { 
  • trunk/metabbs/app/controllers/comment/reply.php

    r1362 r1373  
    99        ); 
    1010} 
    11  
    12 $captcha = $config->get('captcha_name', false) != "none" && $board->use_captcha() && $guest 
    13         ? new Captcha($config->get('captcha_name', false), $captcha_arg) : null; 
    1411 
    1512if (is_post()) { 
     
    2623                cookie_register('name', $_comment->name); 
    2724        } 
     25        $post = $comment->get_post(); 
     26        apply_filters('PostComment', $_comment, array('reply' => TRUE)); 
     27        apply_filters('ValidateCommentReply', $_POST, $error_messages); 
    2828 
    29         apply_filters('PostComment', $_comment, array('reply' => TRUE)); 
     29        if (empty($post->name)) 
     30                $error_messages->add('Please enter the name', 'author'); 
    3031 
    31         $post = $comment->get_post(); 
    32         if (isset($captcha) && $captcha->ready() && $captcha->is_valid($_POST)  
    33                 || isset($captcha) && !$captcha->ready()  
    34                 || !isset($captcha)) { 
     32        if (empty($post->body)) 
     33                $error_messages->add('Please enter the body', 'body'); 
     34 
     35        if ($account->is_guest() && strlen($post->password) < 5) 
     36                        $error_messages->add('Password length must be longer than 5', 'password'); 
     37 
     38        if(!$error_messages->exists()) { 
    3539                $post->add_comment($_comment); 
    3640 
     
    4145                        $template = get_template($board, '_comment'); 
    4246                        $template->set('board', $board); 
     47                        $template->set('error_messages', $error_messages); 
    4348                        $template->set('comment', $_comment); 
    4449                        $template->render_partial(); 
     
    5358        $template = get_template($board, 'reply'); 
    5459        $template->set('board', $board); 
    55         $template->set('captcha', $captcha); 
     60        $template->set('error_messages', $error_messages); 
    5661        $template->set('comment', $comment); 
    5762        $template->set('name', cookie_get('name')); 
  • trunk/metabbs/app/controllers/post/comment.php

    r1362 r1373  
    2323 
    2424apply_filters('PostComment', $comment, array('reply' => false)); 
     25apply_filters('ValidateCommentCreate', $_POST, $error_messages); 
    2526 
    26 $captcha = $config->get('captcha_name', false) != "none" && $board->use_captcha() && $guest 
    27         ? new Captcha($config->get('captcha_name', false), $captcha_arg) : null; 
     27if (empty($post->name)) 
     28        $error_messages->add('Please enter the name', 'author'); 
    2829 
    29 if (isset($captcha) && $captcha->ready() && $captcha->is_valid($_POST)  
    30         || isset($captcha) && !$captcha->ready()  
    31         || !isset($captcha)) { 
     30if (empty($post->body)) 
     31        $error_messages->add('Please enter the body', 'body'); 
     32 
     33if ($account->is_guest() && strlen($post->password) < 5) 
     34                $error_messages->add('Password length must be longer than 5', 'password'); 
     35 
     36if(!$error_messages->exists()) { 
    3237        $post->add_comment($comment); 
    3338 
  • trunk/metabbs/app/controllers/post/edit.php

    r1277 r1373  
    3232permission_required('edit', $post); 
    3333 
    34 if (is_post() && isset($_POST['post']) && (!$account->is_guest() || $post->password == md5($_POST['post']['password']))) { 
     34if (is_post()) { 
     35        $post_password = $_POST['post']['password']; 
    3536        unset($_POST['post']['password']); 
    3637        $post->import($_POST['post']); 
    3738        $post->edited_at = time(); 
    3839        $post->edited_by = $account->id; 
    39         if ($board->use_attachment && isset($_POST['delete'])) { 
    40                 foreach ($_POST['delete'] as $id) { 
    41                         $attachment = Attachment::find($id); 
    42                         $attachment->delete(); 
    43                         @unlink('data/uploads/'.$id); 
     40 
     41        apply_filters('ValidatePostModify', $_POST, $error_messages); 
     42 
     43        if (empty($post->name)) 
     44                $error_messages->add('Please enter the name', 'author'); 
     45 
     46        if (empty($post->title)) 
     47                $error_messages->add('Please enter the title', 'title'); 
     48 
     49        if (empty($post->body)) 
     50                $error_messages->add('Please enter the body', 'body'); 
     51 
     52        if ($account->is_guest() && strlen($post->password) < 5) 
     53                $error_messages->add('Password length must be longer than 5', 'password'); 
     54 
     55        if ($account->is_guest() && $post->password != md5($post_password)) 
     56                $error_messages->add('Password fields\' content is not matched', 'password'); 
     57 
     58        if(!$error_messages->exists()) {         
     59                if ($_POST['action'] == 'preview') { 
     60                        if (version_compare(phpversion(), '5.0.0', '<')) { 
     61                                $preview = $post; 
     62                        } else { 
     63                                eval('$preview = clone $post;'); 
     64                        } 
     65 
     66                        apply_filters('PostSave', $preview); 
     67                        apply_filters('PostView', $preview); 
     68                } else { 
     69                        if ($board->use_attachment && isset($_POST['delete'])) { 
     70                                foreach ($_POST['delete'] as $id) { 
     71                                        $attachment = Attachment::find($id); 
     72                                        $attachment->delete(); 
     73                                        @unlink('data/uploads/'.$id); 
     74                                } 
     75                        } 
     76 
     77                        define('SECURITY', 1); 
     78                        include 'app/controllers/post/save.php'; 
    4479                } 
    4580        } 
    46         if ($_POST['action'] == 'preview') { 
    47                 if (version_compare(phpversion(), '5.0.0', '<')) { 
    48                         $preview = $post; 
    49                 } else { 
    50                         eval('$preview = clone $post;'); 
    51                 } 
    52  
    53                 apply_filters('PostSave', $preview); 
    54                 apply_filters('PostView', $preview); 
    55         } else { 
    56                 define('SECURITY', 1); 
    57                 include 'app/controllers/post/save.php'; 
    58         } 
    5981} 
  • trunk/metabbs/app/controllers/post/index.php

    r1268 r1373  
    2424$style = $board->get_style(); 
    2525 
    26 $captcha = $config->get('captcha_name', false) != "none" && $board->use_captcha() && $guest 
    27         ? new Captcha($config->get('captcha_name', false), $captcha_arg) : null; 
    28  
    2926if ($post->user_id) { 
    3027        $user = $post->get_user(); 
     
    3936$comments = $post->get_comments($style->skin->get_option('build_comment_tree', true)); 
    4037apply_filters_array('PostViewComment', $comments); 
     38?> 
  • trunk/metabbs/app/models/board.php

    r1293 r1373  
    140140                return $this->get_attribute('use_tag', false); 
    141141        } 
    142         function use_captcha() { 
    143                 return $this->get_attribute('use_captcha', false); 
    144         } 
    145142        function reset_sort_keys() { 
    146143                if (!$this->order_by) $this->order_by = 'id DESC'; 
  • trunk/metabbs/app/models/plugin.php

    r1372 r1373  
    2222                $plugin->name = $name; 
    2323                return $plugin; 
     24        } 
     25        function is_enabled($name){ 
     26                $plugin = find_by('plugin', 'name', $name); 
     27                return $plugin->exists() && $plugin->enabled; 
    2428        } 
    2529        function get_id() { 
  • trunk/metabbs/app/views/admin/settings.php

    r1364 r1373  
    4444<h2>고급 설정</h2> 
    4545<p><?=check_box('settings', 'force_fancy_url', $config->get('force_fancy_url', false))?> <?=label_tag('Fancy URL 강제 적용', 'settings', 'force_fancy_url')?></p> 
    46  
    47 <h2><?=i('CAPTCHA Setting')?></h2> 
    48 <dl> 
    49         <dt><?=label_tag("Name", "settings", "captcha_name")?></dt> 
    50         <dd> 
    51                 <select name="settings[captcha_name]"> 
    52                 <?=option_tag('none', '사용안합니다.', false)?> 
    53                 <? foreach($external_libs['captcha'] as $name => $lib) { ?> 
    54                 <?=option_tag($name, $lib["title"], $config->get('captcha_name', false) == $name)?> 
    55                 <? } ?> 
    56                 </select> 
    57         </dd> 
    58 </dl> 
    59 <? switch ($config->get('captcha_name', false)) { ?> 
    60 <?              case "phpcaptcha": ?> 
    61 <dl> 
    62         <dt><?=label_tag('Flite Path', 'settings', 'flite_path')?></dt> 
    63         <dd><?=text_field('settings', 'flite_path', $config->get('flite_path', false), 50)?></dd> 
    64 </dl> 
    65 <h3>Notice</h3> 
    66 <ol> 
    67         <li>Download 'php-captcha.inc.php' and TrueType fonts(english) on <a href="http://www.ejeliot.com/pages/2" onclick="window.open(this.href);return false;">http://www.ejeliot.com/pages/2</a></li> 
    68         <li>Comment out 'session_start()'(ex: // session_start()) on 'php-captcha.inc.php' line 46</li> 
    69         <li>Copy 'php-captcha.inc.php' to '/core/external/phpcaptcha' </li> 
    70         <li>Copy TrueType fonts to '/core/external/phpcaptcha/fonts' </li> 
    71         <li>Insert this line 'RewriteRule captcha/(visual|audio) core/external/phpcaptcha/$1-captcha.php' to file '.htaccess'</li> 
    72 </ol> 
    73 <?              break; ?> 
    74 <?              case "recaptcha": ?> 
    75 <dl> 
    76         <dt><?=label_tag('Public Key', 'settings', 'captcha_publickey')?></dt> 
    77         <dd><?=text_field('settings', 'captcha_publickey', $config->get('captcha_publickey', false), 50)?></dd> 
    78         <dt><?=label_tag('Private Key', 'settings', 'captcha_privatekey')?></dt> 
    79         <dd><?=text_field('settings', 'captcha_privatekey', $config->get('captcha_privatekey', false), 50)?></dd> 
    80 </dl> 
    81 <h3>Notice</h3> 
    82 <ol> 
    83         <li>Download 'recaptchalib.php' on <a href="http://recaptcha.net/plugins/php/" onclick="window.open(this.href);return false;">http://recaptcha.net/plugins/php/</a></li> 
    84         <li>Copy 'recaptchalib.php' to '/core/external/recaptcha' </li> 
    85         <li>Get Public Key and Private Key on <a href="http://recaptcha.net/whyrecaptcha.html" onclick="window.open(this.href);return false;">http://recaptcha.net/whyrecaptcha.html</a> </li> 
    86 <?              break; ?> 
    87 <? } ?> 
    88 </dl> 
    8946<p><input type="submit" value="OK" /></p> 
    9047</form> 
  • trunk/metabbs/app/views/board/edit_general.php

    r1287 r1373  
    2121        <dt><?=label_tag("Use Tag", "board", "use_tag")?></dt> 
    2222        <dd><?=check_box('board', 'use_tag', $board->use_tag())?></dd> 
    23 <? if($config->get('captcha_name', false) != "none") { ?> 
    24         <dt><?=label_tag("Use CAPTCHA", "captcha", "use_captcha")?></dt> 
    25         <dd><?=check_box('board', 'use_captcha', $board->use_captcha())?></dd> 
    26 <? } ?> 
    2723</dl> 
    2824<dl> 
  • trunk/metabbs/app/views/board/post.php

    r1302 r1373  
    33$template->set('board', $board); 
    44$template->set('post', $post); 
    5 $template->set('captcha', $captcha); 
     5$template->set('error_messages', $error_messages); 
    66$template->set('preview', isset($preview) ? $preview : null); 
    77$template->set('extra_attributes', $extra_attributes); 
  • trunk/metabbs/app/views/post/edit.php

    r1302 r1373  
    33$template->set('board', $board); 
    44$template->set('post', $post); 
     5$template->set('error_messages', $error_messages); 
    56$template->set('extra_attributes', $extra_attributes); 
    67$params = get_search_params(); 
  • trunk/metabbs/app/views/post/index.php

    r1302 r1373  
    1010$template->set('board', $board); 
    1111$template->set('post', $post); 
    12 $template->set('captcha', $captcha); 
    1312$template->set('older_post', $older_post); 
    1413$template->set('newer_post', $newer_post); 
    1514$template->set('comments', $comments); 
     15$template->set('error_messages', $error_messages); 
    1616 
    1717$params = get_search_params(); 
  • trunk/metabbs/core/common.php

    r1355 r1373  
    3333require METABBS_DIR . '/core/trackback.php'; 
    3434require METABBS_DIR . '/core/theme.php'; 
    35 require METABBS_DIR . '/core/captcha.php'; 
    3635require METABBS_DIR . '/core/feed.php'; 
    3736require METABBS_DIR . '/core/validate.php'; 
  • trunk/metabbs/core/external.php

    r1351 r1373  
    11<?php  
    2 $external_libs = array( 
    3         'captcha' => array( 
    4                 'phpcaptcha' => array( 
    5                         'title' =>'PHP CAPTCHA',  
    6                         'src'=>'core/external/phpcaptcha/php-captcha.inc.php' 
    7                 ) 
    8 /*              "recaptcha" => array( 
    9                         "title" =>"ReCAPTCHA",  
    10                         "src"=>"core/external/recaptcha/recaptchalib.php" 
    11                 ),*/ 
    12         ) 
    13 ) 
     2 
    143?> 
  • trunk/metabbs/core/language/ko.php

    r1368 r1373  
    159159$lang['Table Prefix'] = '테이블 식별자'; 
    160160$lang['More options'] = '추가 옵션'; 
    161 $lang['CAPTCHA Setting'] = 'CAPTCHA 설정'; 
    162 $lang['Public Key'] = '공개키'; 
    163 $lang['Private Key'] = '개인키'; 
    164 $lang['Use CAPTCHA'] = 'CAPTCHA 사용'; 
    165161$lang['The CAPTCHA solution was incorrect'] = '입력하신 CAPTCHA정보가 일치하지 않습니다'; 
    166162$lang['Can\'t see the image? Click for audible version'] = '오디오로 듣기'; 
     
    170166$lang['Your account does not exist'] = '해당 계정이 존재하지 않습니다'; 
    171167$lang['Your e-mail account is empty'] = '전자 우편 주소를 입력하세요.'; 
    172 $lang['Please enter a valid E-Mail address'] = '입력하신 전자 우편 주소가 잘못된 형식입니다.'; 
    173 $lang['Please enter a homepage address shorter than 255 characters'] = '홈페이지 주소는 255글자보다 짧아야 합니다.'; 
     168$lang['Please enter a valid E-Mail address'] = '입력하신 전자 우편 주소가 잘못된 형식입니다'; 
     169$lang['Please enter a homepage address shorter than 255 characters'] = '홈페이지 주소는 255글자보다 짧아야 합니다'; 
    174170$lang['Your account\'s Name is incorrect'] = '입력하신 계정의 이름이 맞지 않습니다'; 
    175171$lang['Reset password was sent by e-mail'] = '암호 초기화 메일을 보냈습니다'; 
  • trunk/metabbs/media/admin_header.php

    r1358 r1373  
    3030 
    3131<div id="content"> 
    32 <? if (isset($flash)) { ?> 
    33 <div class="flash <?=$flash_class?>"> 
    34 <p><?=$flash?></p> 
    35 </div> 
    36 <? } ?> 
     32<?=flash_message_box()?> 
     33<?=error_message_box($error_messages)?> 
  • trunk/metabbs/skins/blog-default/comment_form.php

    r1264 r1373  
    1111        <? endif; ?> 
    1212        <p><textarea name="body" cols="40" rows="5"><?=$comment_body?></textarea></p> 
    13 <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    14         <p> 
    15                 <label for="recaptcha_challenge_field">CAPTCHA</label> 
    16                 <?= $captcha->get_html() ?> 
    17                 <? if (!empty($captcha->error)): ?> 
    18                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    19                 <? endif; ?> 
    20     </p> 
    21 <? endif; ?> 
     13 
    2214        <div class="buttons"><input type="submit" value="댓글 달기" class="button" /> 
    2315        <? if ($link_cancel): ?><a href="<?=$link_cancel?>" class="button dialog-close">취소</a><? endif; ?></div> 
  • trunk/metabbs/skins/blog-default/write.php

    r1365 r1373  
    3737        <td colspan="4" class="body"><textarea name="body" id="post_body" cols="40" rows="15"><?=$post->body?></textarea></td> 
    3838</tr> 
    39 <? if ($guest): ?> 
    40         <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    41 <tr> 
    42         <th>CAPTCHA</th> 
    43         <td class="captcha" colspan="3"><?= $captcha->get_html() ?> 
    44                 <? if (!empty($captcha->error)): ?> 
    45                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    46                 <? endif; ?> 
    47         </td> 
    48 </tr> 
    49         <? endif; ?> 
    50 <? endif; ?> 
    5139<? if ($preview): ?> 
    5240        <tr> 
  • trunk/metabbs/skins/board-default/comment_form.php

    r1264 r1373  
    1111        <? endif; ?> 
    1212        <p><textarea name="body" cols="40" rows="5"><?=$comment_body?></textarea></p> 
    13 <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    14         <p> 
    15                 <label for="recaptcha_challenge_field">CAPTCHA</label> 
    16                 <?= $captcha->get_html() ?> 
    17                 <? if (!empty($captcha->error)): ?> 
    18                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    19                 <? endif; ?> 
    20     </p> 
    21 <? endif; ?> 
     13 
    2214        <div class="buttons"><input type="submit" value="댓글 달기" class="button" /> 
    2315        <? if ($link_cancel): ?><a href="<?=$link_cancel?>" class="button dialog-close">취소</a><? endif; ?></div> 
  • trunk/metabbs/skins/board-default/write.php

    r1365 r1373  
     1<?=flash_message_box()?> 
     2<?=error_message_box($error_messages)?> 
     3 
    14<form method="post" enctype="multipart/form-data" action=""> 
    25<div id="post-form"> 
     
    69<tr> 
    710        <th>이름</th> 
    8         <td class="name"><input type="text" name="author" value="<?=$post->author?>" /></td> 
     11        <td class="name"><input type="text" name="author" value="<?=$post->author?>" class="<?=marked_by_error_message('author', $error_messages)?>"/></td> 
    912 
    1013        <th>암호</th> 
    11         <td class="password"><input type="password" name="password" /></td> 
     14        <td class="password"><input type="password" name="password" class="<?=marked_by_error_message('password', $error_messages)?>"/></td> 
    1215</tr> 
    1316<? endif; ?> 
    1417<tr> 
    1518        <th>제목</th> 
    16         <td colspan="3"><input type="text" name="title" size="50" value="<?=$post->title?>" id="post_title" /></td> 
     19        <td colspan="3"><input type="text" name="title" size="50" value="<?=$post->title?>" id="post_title" class="<?=marked_by_error_message('title', $error_messages)?>"/></td> 
    1720</tr> 
    1821 
     
    3437 
    3538<tr> 
    36         <td colspan="4" class="body"><textarea name="body" id="post_body" cols="40" rows="12"><?=$post->body?></textarea></td> 
     39        <td colspan="4" class="body"><textarea name="body" id="post_body" cols="40" rows="12" class="<?=marked_by_error_message('body', $error_messages)?>"><?=$post->body?></textarea></td> 
    3740</tr> 
    38 <? if ($guest): ?> 
    39         <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    40 <tr> 
    41         <th>CAPTCHA</th> 
    42         <td class="captcha" colspan="3"><?= $captcha->get_html() ?> 
    43                 <? if (!empty($captcha->error)): ?> 
    44                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    45                 <? endif; ?> 
    46         </td> 
    47 </tr> 
    48         <? endif; ?> 
    49 <? endif; ?> 
     41 
    5042<? if ($preview): ?> 
    5143<tr> 
  • trunk/metabbs/skins/gallery-default/comment_form.php

    r1264 r1373  
    1111        <? endif; ?> 
    1212        <p><textarea name="body" cols="40" rows="5"><?=$comment_body?></textarea></p> 
    13 <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    14         <p> 
    15                 <label for="recaptcha_challenge_field">CAPTCHA</label> 
    16                 <?= $captcha->get_html() ?> 
    17                 <? if (!empty($captcha->error)): ?> 
    18                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    19                 <? endif; ?> 
    20     </p> 
    21 <? endif; ?> 
     13 
    2214        <div><input type="submit" value="댓글 달기" class="button" /> 
    2315        <? if ($link_cancel): ?><a href="<?=$link_cancel?>" class="button dialog-close">취소</a><? endif; ?></div> 
  • trunk/metabbs/skins/gallery-default/write.php

    r1365 r1373  
    3636        <td colspan="4" class="body"><textarea name="body" id="post_body" cols="40" rows="12"><?=$post->body?></textarea></td> 
    3737</tr> 
    38 <? if ($guest): ?> 
    39         <? if ($board->use_captcha() && isset($captcha) && $captcha->ready()): ?> 
    40 <tr> 
    41         <th>CAPTCHA</th> 
    42         <td class="captcha" colspan="3"><?= $captcha->get_html() ?> 
    43                 <? if (!empty($captcha->error)): ?> 
    44                 <span style="captcha notice"><?=i($captcha->error)?></p> 
    45                 <? endif; ?> 
    46         </td> 
    47 </tr> 
    48         <? endif; ?> 
    49 <? endif; ?> 
    5038 
    5139<? if ($taggable): ?> 
  • trunk/metabbs/themes/default/signup.php

    r1347 r1373  
    2828        <input type="text" name="user[email]" size="50" class="<?=marked_by_error_message('email', $error_messages)?>" value="<?=$account->email?>" /> 
    2929</p> 
    30 <? if (isset($captcha) && $captcha->ready()) { ?> 
    31 <p> 
    32         <label><?=i('CAPTCHA')?><span class="star">*</span></label> 
    33         <?= $captcha->get_html() ?> 
    34 </p> 
    35 <? } ?> 
    3630</fieldset> 
    3731<fieldset> 
  • trunk/metabbs/themes/default/style.css

    r1347 r1373  
    6565        padding: 5px 5px 5px 15px; 
    6666        font-size: 12px; 
    67 /*      margin: -7px;*/ 
     67        margin: 0; 
    6868        background-color: #c00; 
    6969        color: #fff; 
     70 
    7071} 
    7172#meta.theme-only #error_messages ul { 
Note: See TracChangeset for help on using the changeset viewer.